The PyTest action in Continua is a wrapper around the pytest.exe command line. If you're having trouble using the PyTest action, please refer to the Command Line Reference.
PyTest action is a test framework for Python applications and libraries.
The working directory for the pip command line. Leave blank to default to the workspace folder.
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.
Install packages from the given requirements files. One file path per line. [--requirement]
The path to the root directory for tests. [--rootdir]
The path to store JUnit-XML style report. [--junit-xml]
If this is ticked and exists, the pytest executable in the virtual environment scripts folder will be used instead.
If this is ticked, PyTest is installed on the agent using Pip. A new tab appears for entering Pip settings.
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".
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 "PyTest".
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.
If this is ticked, PyPI is not used as a source to install PyTest.
The PyTest package source to use for the install.
If this is ticked, the project is installed in editable mode.
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”.
If this is ticked, pip will also find pre-release and development versions. By default, pip only finds stable versions. [--pre]
If this is ticked, the cache is disabled. [--no-cache-dir]
The amount of information detail to display in the build log. [-qqq | -qq | -q | -v]
If this is ticked and exists, the pip executable in the virtual environment scripts folder will be used instead.
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.
Run tests which contain names that match the given string expression. [-k]
Run tests which match the given mark expression. [-m]
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]
Maximum number of errors or failures before exiting. Leave zero for continue on all errors and failures. [--maxfail]
Prefix to prepend to classnames in junit-xml output. [--junit-prefix]
Select whether to prepend or append to sys.path when importing test modules. Default is to 'prepend'. [--import-mode]
The base temporary directory for this test run. Note that this directory is removed if it exists. [--basetemp]
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 or set INI options with 'option=value' style. One per line. [-o]
If this is ticked, markers not registered in the 'markers' section of the configuration file will raise errors. [--strict-markers]
The path to the alternate CA bundle. [–cert]
If this is ticked, no conftest.py files are loaded. [--noconftest]
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]
Specify paths to ignore during collection of tests to run. One path per line. [--ignore]
Specify path patterns to ignore during collection of tests to run. Globbing patterns are allowed. One path per line. [--ignore-glob]
Specify items by node id to deselect during collection. One per line. [--deselect]
If this is ticked, tests are collected even if they are duplicates. [--keep-duplicates]
If this is ticked, tests in a local virtualenv directory are collected. [--collect-in-virtualenv]
If this is ticked, tests are executed even if collection errors occur. [--continue-collection-errors]
If this is ticked, doctests are run in all python (.py) modules [--doctest-modules]
Include doctests in files matching globbing pattern. Leave empty to default to test*.txt. One path per line. [--doctest-glob]
The output report format for diffs on doctest failure. [--doctest-report]
If this is ticked, doctest import errors are ignored. [--doctest-ignore-import-errors]
If this is ticked, continue to run after the first failure for a given doctest. [--doctest-continue-on-failure]
The path to the file to write the log to. [--log-file]
Specify the amount of information to be written to the log file. [--log-level]
Specify the format as used by the logging module. [--log-format]
Specify the log date format as used by the logging module. [--log-date-format]
Specify the number of slowest durations to output. Leave 0 for all. [--durations]
If this is ticked, the setup of fixtures is shown wile executing tests. [--setup-show]
If this is ticked, the results of 'xfail' tests are reported as if they were not marked. [--runxfail]
Enter one or more characters which represent extra test summary info to output to log. [-r]
Extra arguments to be supplied to the command line. One per line.
The amount of information detail to display in the build log. [-q | -v | -vv]
If this is ticked, all cache contents are removed at the start of the test run.
If this is ticked, warnings are disabled. [–disable-warnings]
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:
The full form of argument is: action:message:category:module:line
For more information, please refer to the warnings module in the python documentation.
Tick this to cause the build to fail if any tests fail.
Tick this to cause the build to fail if an error occurred while running any test.
Tick this to cause the build to fail if any tests are inconclusive.
How long to wait for the action to finish running before timing out. Leaving this blank (or zero) will default to 86400 seconds (24 hours).
Tick to continue build on failure marking the action with a warning status.
If this is ticked, any warnings logged will not mark the action with a warning status.
Multiple environment variables can be defined - one per line. These are set before the command line is run.
If this is ticked, environment variable values are written to the build log.
Tick this checkbox to set up a list of new environment variables prefixed with 'ContinuaCI.' for all current system expression objects and variables.
This checkbox is visible only if the 'Generate system environment variables' checkbox is ticked.
If this is ticked, the values of any variables marked as sensitive will be masked with **** when setting system environment variables. Clear this to expose the values.