Skip to main content
Version: 1.15

TestResult

A result of a single TestCase run.

testResult.attachments#

  • type: <Array<Object>>
    • 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 <void|string> Optional path on the filesystem to the attached file.
    • body <void|Buffer> Optional attachment body used instead of a file.

The list of files or buffers attached during the test execution through testInfo.attachments.

testResult.duration#

Running time in milliseconds.

testResult.error#

An error thrown during the test execution, if any.

testResult.retry#

When test is retries multiple times, each retry attempt is given a sequential number.

Learn more about test retries.

testResult.startTime#

  • type: <[Date]>

Start time of this particular test run.

testResult.status#

  • type: <"passed"|"failed"|"timedOut"|"skipped">

The status of this test result. See also testCase.expectedStatus.

testResult.stderr#

Anything written to the standard error during the test run.

testResult.stdout#

Anything written to the standard output during the test run.

testResult.steps#

List of steps inside this test run.

testResult.workerIndex#

Index of the worker where the test was run.

Learn more about parallelism and sharding with Playwright Test.