HomeDocs
DocsCommunityTestimonialsUsersGitHubTwitterBlogJobsTermsPrivacyCookies
TermsPrivacyCookies
Hey! These docs are for version 2.11, which is no longer officially supported. Click here for the latest version, 2.18!
./pants test [args]

Run tests.

Backend: pants.core
Config section: [test]

Basic options

debug

--[no-]test-debug
PANTS_TEST_DEBUG
default: False

Run tests sequentially in an interactive process. This is necessary, for example, when you add breakpoints to your code.


force

--[no-]test-force
PANTS_TEST_FORCE
default: False

Force the tests to run, even if they could be satisfied from cache.


output

--test-output=<ShowOutput>
PANTS_TEST_OUTPUT
one of: all, failed, none
default: failed

Show stdout/stderr for these tests.


use_coverage

--[no-]test-use-coverage
PANTS_TEST_USE_COVERAGE
default: False

Generate a coverage report if the test runner supports it.


open_coverage

--[no-]test-open-coverage
PANTS_TEST_OPEN_COVERAGE
default: False

If a coverage report file is generated, open it on the local system if the system supports this.


extra_env_vars

--test-extra-env-vars="['<str>', '<str>', ...]"
PANTS_TEST_EXTRA_ENV_VARS
default: []

Additional environment variables to include in test processes. Entries are strings in the form ENV_VAR=value to use explicitly; or just ENV_VAR to copy the value of a variable in Pants's own environment.


Advanced options

xml_dir

--test-xml-dir=<DIR>
PANTS_TEST_XML_DIR
default: None

Specifying a directory causes Junit XML result files to be emitted under that dir for each test run that supports producing them.


Deprecated options

None