How to remove skipped tests from html report (Pytest)



  • I am using pytest for automation. I have so many test cases and have one test cases as skipped test like below,

    def test_step(index, description):
    """
        Logs the start of a test step.
    """
        # code for print log
    

    Now, when any my test file executed and the report is generated, this test_step is also consider as a skipped test case in the report.

    How can i remove skipped test cases from html report??



  • By using this, i can ignore skipped tests in html report

    def pytest_html_results_table_row(report, cells):
        if report.skipped:
          del cells[:]
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2