Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
135 lines (112 loc) · 9.82 KB

cp.spec.Report.md

File metadata and controls

135 lines (112 loc) · 9.82 KB

docs » cp.spec.Report


The results of a test run.

API Overview

API Documentation

Constructors

Signature cp.spec.Report(run) -> cp.spec.Report
Type Constructor
Description Creates a new test report.

Fields

Signature cp.spec.Report.aborts <number>
Type Field
Description The number of aborts in the run.
Signature cp.spec.Report.failures <number>
Type Field
Description The number of failures in the run.
Signature cp.spec.Report.passes <number>
Type Field
Description The number of passes in the run.
Signature cp.spec.Report.run <cp.spec.Run>
Type Field
Description The run the reports are for.
Signature cp.spec.Report.startTime <number>
Type Field
Description The number of seconds since epoch when the test started, or nil if not started yet.
Signature cp.spec.Report.stopTime <number>
Type Field
Description The number of seconds since epoch when the tests stopped, or nil if not stopped yet.
Signature cp.spec.Report.totalTime <number>
Type Field
Description The number of seconds the run took (may be decimal), or nil if the test hasn't run.

Methods

Signature cp.spec.Report:aborted(message)
Type Method
Description Records an abort, with the specified message.
Parameters
  • message - The related message to output.
Signature cp.spec.Report:add(otherReport) -> nil
Type Method
Description Adds the passes/failures/aborts from the other report into this one.
Parameters
  • otherReport - The other report to add.
Signature cp.spec.Report:failed(message)
Type Method
Description Records a fail, with the specified message.
Parameters
  • message - The related message to output.
Signature cp.spec.Report:passed([message])
Type Method
Description Records a pass, with the specified message.
Parameters
  • message - an optional additional message to output.
Signature cp.spec.Report:start() -> nil
Type Method
Description Logs the start time.
Signature cp.spec.Report:stop() -> nil
Type Method
Description Logs the end time.
Signature cp.spec.Report:summary()
Type Method
Description Summarise the reports.
Signature cp.spec.Report:waiting(timeout)
Type Method
Description Records that a run is waiting for up to the specified amount of time.
Parameters
  • timeout - The timeout to wait for, in seconds.