TestCase
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.
Methods
ok
Added in: v1.10Whether the test is considered running fine. Non-ok tests fail the test run with non-zero exit code.
Usage
testCase.ok();
Returns
outcome
Added in: v1.10Testing outcome for this test. Note that outcome is not the same as testResult.status:
- Test that is expected to fail and actually fails is
'expected'. - Test that passes on a second retry is
'flaky'.
Usage
testCase.outcome();
Returns
- "skipped" | "expected" | "unexpected" | "flaky"#
titlePath
Added in: v1.10Returns a list of titles from the root down to this test.
Usage
testCase.titlePath();
Returns
Properties
annotations
Added in: v1.10testResult.annotations of the last test run.
Usage