English · Node.js
Appearance
English · Node.js
Appearance
TestCase corresponds to every test.(call)() call in a test file. When a single test.(call)() is running in multiple projects or repeated multiple times, it will have multiple TestCase objects in corresponding projects' suites.
Whether the test is considered running fine. Non-ok tests fail the test run with non-zero exit code.
Returns
booleanTesting outcome for this test. Note that outcome is not the same as testResult.status:
'expected'.'flaky'.Returns
"skipped" | "expected" | "unexpected" | "flaky"Returns a list of titles from the root down to this test.
Returns
Array<string>testResult.annotations of the last test run.
Type
Array<Object>Expected test status.
test.skip() or test.fixme() are expected to be 'skipped'.test.fail() are expected to be 'failed'.'passed'.See also testResult.status for the actual status.
Type
"passed" | "failed" | "timedOut" | "skipped" | "interrupted"A test ID that is computed based on the test file name, test title and project name. The ID is unique within Playwright session.
Type
stringLocation in the source where the test is defined.
Type
LocationSuite this test case belongs to.
Type
SuiteContains the repeat index when running in "repeat each" mode. This mode is enabled by passing --repeat-each to the command line.
Type
intResults for each run of this test.
Type
Array<TestResult>The maximum number of retries given to this test in the configuration. With conditional retries, this is updated after each failed attempt to the number of retries that applies to that failure.
Learn more about test retries.
Type
intThe list of tags defined on the test or suite via test.(call)() or test.describe(), as well as @-tokens extracted from test and suite titles.
Learn more about test tags.
Type
Array<string>The timeout given to the test. Affected by testConfig.timeout, testProject.timeout, test.setTimeout(), test.slow() and testInfo.setTimeout().
Type
floatTest title as passed to the test.(call)() call.
Type
stringReturns "test". Useful for detecting test cases in suite.entries().
Type
"test"