Dry Run

The dry run feature is supported by the HILSTER Testing Framework since version htf-1.2.

The dry run feature works like a normal test run but marks all tests to be skipped and is fast as a result.

This is useful feature if you want check your test selection with or without tagging. It can also be used to easily create a test specification if your test specifications are included in the docstring of your tests.

The test specification can be read within an HTML-report or you can use a JSON-report to create another document using the contained data.


htf.dryrun can be used to do a dry run of a test suite from a Python script. It accepts the same parameters as htf.main and htf.run do and so it can easily be substituted.

htf.dryrun(title='Testreport', tests='__main__', tags=None, fixture_tags=None, html_report=None, junit_xml_report=None, json_report=None, yaml_report=None, report_server=None, extra_report=None, create_drafts=False, open_report=False, pattern='test*.py', metadata=None, exit=True, failfast=None, minimize_report_size=False, interactive=False, interactive_address='', interactive_port=8080, shuffle=False, shuffle_seed=None)

Test runner for a dry run to watch the test suite.

  • title (str) – the test’s title

  • tests=None (test-specifier or list of test-specifiers) – a test-specifier ora list of test-specifiers (folder, file, test-case, test-case-method, module)

  • ags=None (str) – test filter expression

  • fixture_tags=None (str) – fixture filter expression

  • html_report=None (str or list of str) – HTML-report filename(s)

  • junit_xml_report=None (str or list of str) – JUnit-XML-report filename(s)

  • json_report=None (str or list of str) – JSON-report filename(s)

  • yaml_report=None (str or list of str) – YAML-report filename(s)

  • report_server=None (url or list of urls) – Url or list of urls to report server

  • extra_report=None (instance or list of instances) – Extra reports that support instance.render(data). This is useful for htf.DOORSTestReport for example that needs additional parameters.

  • create_drafts=False (bool) – if set to True draft reports are created after each test

  • open_report=False (bool) – if set to True the HTML test report is opened after the test run

  • pattern="test*.py" (str) – the pattern to be used when searching for python files in folders

  • metadata=None (dict) – a dictionary that contains metadata about the test run

  • exit=True (bool) – if set to True the exit() is called at the end of the tests

  • failfast=None (bool) – if set to True the test run ends after the first failing test

  • minimize_report_size=False (bool) – if set to True the report size is minimized.

  • interactive=False (bool) – if set to True the tests are run interactively

  • interactive_address="" (str) – the ip address the interaction server listens on.

  • interactive_port=8080 (int) – the port the interaction server listens on.

  • shuffle=False (bool) – set to True to shuffle tests

  • shuffle_seed=None (str) – the shuffle seed or ‘last’ to use the last shuffle seed


0 if the run was successful or the number of failed tests in case or errors and failures.

Return type


htf dryrun

To dry run from command line use htf dryrun .... It accepts the same parameters as htf run does and so it can easily be substituted.