Exemplo n.º 1
0
def export_pdf(filename, tests, results, configs, naming):
    """Export tests results to PDF file.

    :param filename: The PDF filename.
    :param tests:    The ran test case(s).
    :param results:  The test result(s).
    :param configs:   The report's suite and scenario configs.
    """
    logger.info("Results will be exported as PDF...")
    report = ReportGenerator(tests, results, filename, configs, naming)
    report.save()
Exemplo n.º 2
0
 def test_generates_report_without_error(self):
     """Check a report can be generated."""
     suite, _ = wetest.command_line.new_suite_from(
         scenario_file="wetest/tests/acceptance-demo.yaml", skip_all=True
     )
     _, results, _ = wetest.command_line.Runner(suite).run()
     ReportGenerator(
         suite, results, ".test-report.pdf", title="ReportGenerator Test"
     ).save()
 def test_generates_unit_testing_report_without_error(self):
     """Check a report can be generated with many commands."""
     suite, _ = wetest.command_line.new_suite_from(
         scenario_file='wetest/tests/mks946.yaml', skip_all=True)
     _, results, _ = wetest.command_line.Runner(suite).run()
     ReportGenerator(
         suite,
         results,
         '.test-report3.pdf',
         title="ReportGenerator Test with many commands").save()
 def test_generates_another_report_without_error(self):
     """Check a report can be generated with many commands."""
     suite, _ = wetest.command_line.new_suite_from(
         scenario_file='wetest/tests/source-at-0-reference.yml',
         skip_all=True)
     _, results, _ = wetest.command_line.Runner(suite).run()
     ReportGenerator(
         suite,
         results,
         '.test-report2.pdf',
         title="ReportGenerator Test with many commands").save()