Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PyTest action is a test framework for Python applications and libraries.

...

PyTest

Working Folder

The working directory for the pip command line. Leave blank to default to the workspace folder.

Tests

Path the paths to files or directories containing tests to run. Run specific tests within a module by specifying its node id. One path per line.

...

The path to store JUnit-XML style report. [--junit-xml]

Use command line executable in virtual environment scripts folder if it exists.

If this is ticked and exists, the pytest executable in the virtual environment scripts folder will be used instead.

Install PyTest on agent using Pip

If this is ticked, PyTest is installed on the agent using Pip. A new tab appears for entering Pip settings.

Using 

The Using drop down is populated by any property collector properties whose namespace matches the pattern defined by the PyTest action. The pattern for this action is ^PyTest\..*. The default property collector searches the environment path for "pytest.exe".

...

Alternatively, you can select the Custom option from the Using drop down list and specify a path in the resulting input field that will be displayed. Please read Why it's a good idea to use a property collector before using this option.


Pip

Image Modified

Use an alternate source to PyPI to install PyTest

If this is ticked, PyPI is not used as a source to install PyTest.

Package Source

The PyTest package source to use for the install.

Install project in editable mode

If this is ticked, the project is installed in editable mode.

Source Directory

Visible only if the checkbox 'Install project in editable mode' is ticked.

The

...

directory to check out editable projects into. The default in a virtualenv is “<venv path>\src”. The default for global installs is “<current dir>\src”.

Install pre-release or development package version

If this is ticked, pip will also find pre-release and development versions. By default, pip only finds stable versions. [--pre]

Disable cache

If this is ticked, the cache is disabled. [--no-cache-dir]

Pip Verbosity

The amount of information detail to display in the build log. [-qqq | -qq | -q | -v]

Use command line executable in virtual environment scripts folder if it exists.

If this is ticked and exists, the pip executable in the virtual environment scripts folder will be used instead.

Using Pip

The Using drop down is populated by any property collector properties whose namespace matches the pattern defined by the Pip Install action. The pattern for this action is ^Pip\..*. The default property collector searches the environment path for "pip.exe".

If you create a property collector for this action, make sure you select the Path Finder PlugIn type and give it a name that will match the pattern above in blue. Example names listed here, search the table's Plugin column for "Pip".

For more in-depth explanations on property collectors see Property Collectors.

Alternatively, you can select the Custom option from the Using drop down list and specify a path in the resulting input field that will be displayed. Please read Why it's a good idea to use a property collector before using this option.


Settings

Non-Binary Packages

Specify any packages for which binary packages should not be used. [--no-binary]

  • All - Disable all binary packages.
  • None - Empty the set of binary packages to be disabled.
  • Custom List - The custom set of binary packages to be disabled.

Note that some packages are tricky to compile and may fail to install when this option is used on them.

Non-Binary Package Names

Visible only if the option 'Custom List' is selected.

The names of the non-binary packages. One per line.

Binary Only Packages

Specify any packages for which only binary packages should not be used. [--only-binary]

  • All - Disable all source packages.
  • None - Empty the set of source packages to be disabled.
  • Custom List - The custom set of source packages to be disabled.

Note that packages without binary distributions will fail to install when this option is used on them.

Binary Only Package Names

Visible only if the option 'Custom List' is selected.

The names of the non-binary packages. One per line.

Constraints File(s)

Constrain versions using the given constraints files. One file path per line. [--constraint]

Prefer older binary packages over newer source packages.

If this is ticked, older binary packages will be used instead of newer source packages. [--prefer-binary]

Connection

Image Removed

Proxy

Specify a proxy in the form [user:passwd@]proxy.server:port. It is recommended to use a password type variable to store the password. [--proxy]

Trusted Host

Mark this host as trusted even if it does not have valid or any HTTPS. [--trusted-host]

...

Keyword Expression

Run tests which contain names that match the given string expression. [-k]

Mark Expression

Run tests which match the given mark expression. [-m]

Try to interpret all tests as python packages

This options allows you to specify package names for tests. If the package exists, its file system location will be used to find and run tests. [--pyargs]

Max Fails

Maximum number of errors or failures before exiting. Leave zero for continue on all errors and failures. [--maxfail]

JUnit Classname Prefix

Prefix to prepend to classnames in junit-xml output. [--junit-prefix]

Import Mode

Select whether to prepend or append to sys.path when importing test modules. Default is to 'prepend'. [--import-mode]

Base Temporary Directory

The base temporary directory for this test run. Note that this directory is removed if it exists. [--basetemp]


Configuration

Image Added

Configuration File

The path to the PyTest configuration or INI file. Path can be full or relative to working directory e.g. test\pytest.ini. [-c]

Override INI Options

Override or set INI options with 'option=value' style. One per line. [-o]

Markers not registered in the 'markers' section of the configuration file will raise errors. 

If this is ticked, markers not registered in the 'markers' section of the configuration file will raise errors.  [--strict-markers]

Plugin Loading

The path to the alternate CA bundle. [--cert–cert]

Client Certificate

The path to the SSL client certificate. A single file containing the private key and the certificate in PEM format. [--client-cert]

Timeout

Set the socket timeout in seconds. Leave zero to default to 15 seconds. [--timeout]

Retires

Maximum number of retries each connection should attempt. Leave zero to default to 5 times. [--retries]

Python

Image Removed

Platform

Only use wheels compatible with specified platform (e.g. 'win32', 'linux_i386', 'linux_x86_64'). Defaults to the platform of the running system. [–platform]

Implementation

Only use wheels compatible with specified Python implementation (e.g. ‘pp’, ‘jy’, ‘cp’, or ‘ip’). Defaults to the current interpreter implementation. Use ‘py’ to force implementation-agnostic wheels. [–implementation]

Python Version

Only use wheels compatible with specified Python interpreter version. If not specified, then the current system interpreter minor version is used. Either a major version (e.g. ‘3’) can be specified to match all minor revs of that major version or a minor version (e.g. ‘34’) can also be specified. [--python-version]

Python ABI

Only use wheels compatible with specified Python ABI (e.g. ‘pypy_41’). Defaults to the current interpreter ABI tag. Generally you will need to specify --implementation, --platform and --python-version when using this option. [--abi]

Require a hash to check against each requirement for repeatable installs. This is implied when any package in a requirements file has a --hash option. 

If this is ticked, a hash is required to check against each requirement for repeatable installs. This is implied when any package in a requirements file has a --hash option.  [--require-hashes]

Include pre-release and development versions. By default, pip only finds stable versions.

If this is ticked, pip will also find pre-release and development versions. By default, pip only finds stable versions. [--pre]

Installation

Image Removed

Build

Directory to unpack packages into and build in. [--build]

Source Distribution

Select whether to use PEP 517 for building source distributions or force legacy behaviour. [--use-pep517 | --no-use-pep517]

Don't install package dependencies.

If this is ticked, package dependencies are not installed. [--no-deps]

Disable isolation when building a modern source distribution. 

If this is ticked, isolation is disabled when building a modern source distribution. [--no-build-isolation]

Don't clean up build directories.

If this is ticked, build directories are not cleaned. [--no-clean]

Package Index

Image Removed

No Index

If this is ticked, the package index is ignored. Only look at find links URLs instead.

Index URL

Visible only if the checkbox 'No Index' is NOT ticked.

The base URL of Python Package Index. Default is https://pypi.org/simple. This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format. [--index-url]

Extra Index URLs

Visible only if the checkbox 'No Index' is NOT ticked.

The extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url. [--extra-index-url]

Visible only if the checkbox 'No Index' is ticked.

If a URL or path to a HTML file is specified, then it is parsed for links to archives. If a local path or file:// URL that’s a directory is specified, then the directory listing will be searched for archives. [--find-links]

Extra Arguments

Image Removed

Global Options

Don't load any conftest.py files

If this is ticked, no conftest.py files are loaded. [--noconftest]

Root Directory For Conftest Files

Visible only if the checkbox 'Don't load any conftest.py files' is NOT ticked.

Only load conftest.py's relative to specified directory. [–confcutdir]


Collection

Image Added

Ignore Paths

Specify paths to ignore during collection of tests to run. One path per line. [--ignore]

Ignore Path Patterns

Specify path patterns to ignore during collection of tests to run. Globbing patterns are allowed. One path per line. [--ignore-glob]

Deselect By Node Id

Specify items by node id to deselect during collection. One per line. [--deselect]

keep duplicate tests.

If this is ticked, tests are collected even if they are duplicates. [--keep-duplicates]

Don't ignore tests in a local virtualenv directory.

If this is ticked, tests in a local virtualenv directory are collected. [--collect-in-virtualenv]

Force test execution even if collection errors occur. 

If this is ticked, tests are executed even if collection errors occur. [--continue-collection-errors]


Doctests

Image Added

Run doctests in all python modules.

If this is ticked, doctests are run in all python (.py) modules [--doctest-modules]

Doctests Paths

Include doctests in files matching globbing pattern. Leave empty to default to test*.txt. One path per line. [--doctest-glob]

Doctest Report Format

The output report format for diffs on doctest failure. [--doctest-report]

Ignore doctest import errors.

If this is ticked, doctest import errors are ignored. [--doctest-ignore-import-errors]

For a given doctest, continue to run after the first failure.

If this is ticked, continue to run after the first failure for a given doctest. [--doctest-continue-on-failure]


Logging

Image Added

Log File

The path to the file to write the log to. [--log-file]

Log Level

Specify the amount of information to be written to the log file. [--log-level]

Log Format

Specify the format as used by the logging module. [--log-format]

Log Date Format

Specify the log date format as used by the logging module. [--log-date-format]

Number of Slowest Durations

Specify the number of slowest durations to output. Leave 0 for all. [--durations]

Show setup of fixtures while executing tests.

If this is ticked, the setup of fixtures is shown wile executing tests. [--setup-show]

Report the results of 'xfail' tests as if they were not marked.

If this is ticked, the results of 'xfail' tests are reported as if they were not marked. [--runxfail]

Extra Test Summary

Enter one or more characters which represent extra test summary info to output to log. [-r]

  • f - failed
  • E - error
  • s - skipped
  • x - xfailed
  • X - xpassed
  • p - passed
  • P - passed with output
  • a - all except passed (p) and passed with output (P)
  • A - all


Extra Arguments

Image Added

Extra Arguments

Extra arguments to be supplied to the command line. One per line.Extra global options to be supplied to the setup.py call before the install command. One per line. [--global-option]


Options

Verbosity

The amount of information detail to display in the build log. [-qqq q | -qq v | -q | -v]

Log File

The path to a verbose appending log file. [--log]

...

vv]

Remove all cache contents at start of test run.

If this is ticked, all cache contents are removed at the start of the test run.

Disable warnings.

If this is ticked, the cache is warnings are disabled. [--no-cache-dir–disable-warnings]

Cache Directory

The path to a directory to store the cache data. [--cache-dir]

Run pip in an isolated mode, ignoring environment variables and user configuration.

If this ticked, pip is run in an isolated mode, ignoring environment variables and user configuration. [--isolated]

Exists Action

Specify what to do if path already exists. [--exists-action]

...

Warning Control

This option controls how often warnings are output to stderr. Leave blank to default to one warning for each source line where it occurs. [-W]

Multiple options may be given; when a warning matches more than one option, the action for the last matching option is performed. Invalid options are ignored (though, a warning message is printed about invalid options when the first warning is issued).

The simplest form of argument is one of the following action strings:

  • ignore - Ignore all warnings
  • default - Explicitly request the default behaviour (printing each warning once per source line)
  • all - Print a warning each time it occurs (this may generate many messages if a warning is triggered repeatedly for the same source line, such as inside a loop)
  • module - Print each warning only the first time it occurs in each module
  • once - Print each warning only the first time it occurs in the program.
  • error - Raise an exception instead of printing a warning message.

The full form of argument is: action:message:category:module:line

For more information, please refer to the warnings module in the python documentation.

Fail action if any tests fail

Tick this to cause the build to fail if any tests fail.

Fail action if any tests error

Tick this to cause the build to fail if an error occurred while running any test.

Fail action if any tests are inconclusive

Tick this to cause the build to fail if any tests are inconclusive

...

.

Timeout (in seconds) 

How many seconds long to wait for the action to finish running before timing out. The default is Leaving this blank (or zero) will default to 86400 seconds (24 hours).

Treat failure as warning

Tick to continue build on failure marking the action with a warning status.

Ignore warnings

If this is ticked, any warnings logged will not mark the action with a warning status.

...