<!-- HILSTER htf 4.3.1 -->
**htf 4.3.1** · [HTML](../dryrun.html) · [Complete PDF manual](../_downloads/htf-4.3.1.pdf)

<a id="dry-run"></a>

# 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()

[`htf.dryrun`](#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`](main.md#htf.main) and [`htf.run`](main.md#htf.run) do and so it can easily be substituted.

### htf.dryrun(title: [str](https://docs.python.org/3/builtins/stdtypes.html#str) = 'Testreport', tests: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[Any](https://docs.python.org/3/library/typing.html#typing.Any)] = '_\_main_\_', tags: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [None](https://docs.python.org/3/builtins/constants.html#None) = None, fixture_tags: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [None](https://docs.python.org/3/builtins/constants.html#None) = None, html_report: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, junit_xml_report: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, json_report: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, yaml_report: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, report_server: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, extra_report: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[Any](https://docs.python.org/3/library/typing.html#typing.Any)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, create_drafts: [bool](https://docs.python.org/3/builtins/functions.html#bool) = False, open_report: [bool](https://docs.python.org/3/builtins/functions.html#bool) = False, pattern: [str](https://docs.python.org/3/builtins/stdtypes.html#str) = 'test\*.py', metadata: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, parameters: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [str](https://docs.python.org/3/builtins/stdtypes.html#str)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, exit: [bool](https://docs.python.org/3/builtins/functions.html#bool) = True, fail_fast: [bool](https://docs.python.org/3/builtins/functions.html#bool) = False, minimize_report_size: [bool](https://docs.python.org/3/builtins/functions.html#bool) = False, interactive: [bool](https://docs.python.org/3/builtins/functions.html#bool) = False, interactive_address: [str](https://docs.python.org/3/builtins/stdtypes.html#str) = '0.0.0.0', interactive_port: [int](https://docs.python.org/3/builtins/functions.html#int) = 8080, open_browser: [bool](https://docs.python.org/3/builtins/functions.html#bool) = True, shuffle: [bool](https://docs.python.org/3/builtins/functions.html#bool) = False, shuffle_seed: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [int](https://docs.python.org/3/builtins/functions.html#int) | [None](https://docs.python.org/3/builtins/constants.html#None) = None) → [int](https://docs.python.org/3/builtins/functions.html#int)

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

* **Parameters:**
  * **title** – the test’s title
  * **tests=None** – a
    test-specifier or a list of test-specifiers
    (folder, file, test-case, test-case-method, module)
  * **ags=None** – test filter expression
  * **fixture_tags=None** – fixture filter expression
  * **html_report=None** – HTML-report filename(s)
  * **junit_xml_report=None** – JUnit-XML-report
    filename(s)
  * **json_report=None** – JSON-report
    filename(s)
  * **yaml_report=None** – YAML-report
    filename(s)
  * **report_server=None** – Url or list of urls to report server
  * **extra_report=None** – Extra reports
    that support instance.render(data). This is useful for
    [`htf.DOORSTestReport`](testreports.md#htf.DOORSTestReport) for example that needs
    additional parameters.
  * **create_drafts=False** – if set to `True` draft reports are created after each test
  * **open_report=False** – if set to `True` the HTML test report is opened after the test run
  * **pattern="test\*.py"** – the pattern to be used when searching for
    python files in folders
  * **metadata=None** – a dictionary that contains metadata about the test run
  * **parameters=None** – a dictionary that contains parameters for the test run
  * **exit=True** – if set to `True` the exit() is called at the
    end of the tests
  * **fail_fast=False** – if set to `True` the test run ends after
    the first failing test
  * **minimize_report_size=False** – if set to `True` the report size is minimized.
  * **interactive=False** – if set to `True` the tests are run interactively
  * **interactive_address="0.0.0.0"** – the ip address the interaction server listens on.
  * **interactive_port=8080** – the port the interaction server listens on.
  * **open_browser=True** – if set to `False` browser is not opened automatically
  * **shuffle=False** – set to `True` to shuffle tests
  * **shuffle_seed=None** – the shuffle seed or ‘last’ to use the last shuffle seed
* **Returns:**
  `0` if the run was successful or the number of failed tests in case or errors and failures.
* **Return type:**
  [int](https://docs.python.org/3/builtins/functions.html#int)

## 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.
