How to create Pytest report in html format

0 votes

Hi Guys,

I have created one Pytest program. I want to create one report of this code in HTML format. How can I do this?

Jun 24, 2020 in Python by akhtar
• 38,210 points
2,982 views

1 answer to this question.

0 votes

Hi@akhtar,

You can create a Pytest report in HTML format using the pytest-html module. You can use the below-given command.

$ pytest -v --html=basic.html

You will get one file named basic.html in the same folder. Browse that file and you can able to see report card.

I hope this will help you.

answered Jun 24, 2020 by MD
• 95,300 points

Related Questions In Python

+1 vote
1 answer

How to create plots using python matplotlib in IPython notebook?

I think you should try: I used %matplotlib inline in ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 58,140 points
586 views
0 votes
1 answer

How to create transaction in GnuCash in response to an email?

Here's a template, along with a couple ...READ MORE

answered Sep 5, 2018 in Python by Priyaj
• 58,140 points
334 views
0 votes
1 answer

How to format strings in python?

To answer your first question... .format just seems more ...READ MORE

answered Oct 1, 2018 in Python by aryya
• 7,440 points
175 views
0 votes
1 answer

How to create and read from a temporary file in Python?

Hi, there is a very simple solution ...READ MORE

answered Jan 29, 2019 in Python by Nymeria
• 3,520 points
673 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,422 views
0 votes
0 answers
0 votes
1 answer

pytest: error: unrecognized arguments: --html=basic.html

Hi@akhtar, You have to install one module named ...READ MORE

answered Jun 24, 2020 in Python by MD
• 95,300 points
2,745 views
0 votes
1 answer

How to create one Pytest program?

Hi@akhtar, You need to create a file named test_*.py and ...READ MORE

answered Jun 24, 2020 in Python by MD
• 95,300 points
148 views
0 votes
1 answer

How to create lambda function inside a list in Python?

Hi@akhtar, The lambda statement can appear in places ...READ MORE

answered Jun 25, 2020 in Python by MD
• 95,300 points
187 views