TestCase corresponds to every test() call in a test file. When a single test() is running in multiple projects or repeated multiple times, it will have multiple
TestCase objects in corresponding projects' suites.
okAdded in: v1.10
Whether the test is considered running fine. Non-ok tests fail the test run with non-zero exit code.
outcomeAdded in: v1.10
Testing outcome for this test. Note that outcome is not the same as testResult.status:
- Test that is expected to fail and actually fails is
- Test that passes on a second retry is
titlePathAdded in: v1.10
Returns a list of titles from the root down to this test.
annotationsAdded in: v1.10
The list of annotations applicable to the current test. Includes annotations from the test, annotations from all test.describe() groups the test belongs to and file-level annotations for the test file.
Annotations are available during test execution through testInfo.annotations.
Learn more about test annotations.
expectedStatusAdded in: v1.10
Expected test status.
- Tests marked as test.skip() or test.fixme() are expected to be
- Tests marked as test.fail() are expected to be
- Other tests are expected to be
See also testResult.status for the actual status.
idAdded in: v1.25
Unique test ID that is computed based on the test file name, test title and project name. Test ID can be used as a history ID.
locationAdded in: v1.10
Location in the source where the test is defined.
parentAdded in: v1.10
Suite this test case belongs to.
repeatEachIndexAdded in: v1.10
Contains the repeat index when running in "repeat each" mode. This mode is enabled by passing
--repeat-each to the command line.
resultsAdded in: v1.10
Results for each run of this test.
retriesAdded in: v1.10
The maximum number of retries given to this test in the configuration.
Learn more about test retries.
timeoutAdded in: v1.10
titleAdded in: v1.10
Test title as passed to the test() call.