docs/src/test-reporter-api/class-testresult.md
A result of a single [TestCase] run.
name <[string]> Attachment name.contentType <[string]> Content type of this attachment to properly present in the report, for example 'application/json' or 'image/png'.path ?<[string]> Optional path on the filesystem to the attached file.body ?<[Buffer]> Optional attachment body used instead of a file.The list of files or buffers attached during the test execution through [property: TestInfo.attachments].
type <[string]> Annotation type, for example 'skip' or 'fail'.description ?<[string]> Optional description.location ?<[Location]> Optional location in the source where the annotation is added.The list of annotations applicable to the current test. Includes:
method: Test.(call)] and [method: Test.describe];method: Test.skip], [method: Test.fixme] and [method: Test.fail];property: TestInfo.annotations] during the test execution.Annotations are available during test execution through [property: TestInfo.annotations].
Learn more about test annotations.
Running time in milliseconds.
First error thrown during test execution, if any. This is equal to the first
element in [property: TestResult.errors].
Errors thrown during the test execution.
When test is retried multiple times, each retry attempt is given a sequential number.
Learn more about test retries.
Start time of this particular test run.
The status of this test result. See also [property: TestCase.expectedStatus].
Anything written to the standard error during the test run.
Anything written to the standard output during the test run.
List of steps inside this test run.
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.
The index of the worker between 0 and workers - 1. It is guaranteed that workers running at the same time have a different parallelIndex.