TestResult
A result of a single TestCase run.
- testResult.attachments
- testResult.duration
- testResult.error
- testResult.errors
- testResult.retry
- testResult.startTime
- testResult.status
- testResult.stderr
- testResult.stdout
- testResult.steps
- testResult.workerIndex
testResult.attachments
Added in: v1.10The list of files or buffers attached during the test execution through testInfo.attachments.
testResult.duration
Added in: v1.10- type: <number>
Running time in milliseconds.
testResult.error
Added in: v1.10- type: <TestError>
First error thrown during test execution, if any. This is equal to the first element in testResult.errors.
testResult.errors
Added in: v1.10Errors thrown during the test execution.
testResult.retry
Added in: v1.10- type: <number>
When test is retries multiple times, each retry attempt is given a sequential number.
Learn more about test retries.
testResult.startTime
Added in: v1.10- type: <[Date]>
Start time of this particular test run.
testResult.status
Added in: v1.10- type: <"passed"|"failed"|"timedOut"|"skipped"|"interrupted">
The status of this test result. See also testCase.expectedStatus.
testResult.stderr
Added in: v1.10Anything written to the standard error during the test run.
testResult.stdout
Added in: v1.10Anything written to the standard output during the test run.
testResult.steps
Added in: v1.10List of steps inside this test run.
testResult.workerIndex
Added in: v1.10- type: <number>
Index of the worker where the test was run. If the test was not run a single time, for example when the user interrupted testing, the only result will have a workerIndex
equal to -1
.
Learn more about parallelism and sharding with Playwright Test.