docs » cp.spec.Report
The results of a test run.
- Constructors - API calls which return an object, typically one that offers API methods
- Report
- Fields - Variables which can only be accessed from an object returned by a constructor
- aborts
- failures
- passes
- run
- startTime
- stopTime
- totalTime
- Methods - API calls which can only be made on an object returned by a constructor
- aborted
- add
- failed
- passed
- start
- stop
- summary
- waiting
| Signature | cp.spec.Report(run) -> cp.spec.Report |
|---|---|
| Type | Constructor |
| Description | Creates a new test report. |
| 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. |
| Signature | cp.spec.Report:aborted(message) |
|---|---|
| Type | Method |
| Description | Records an abort, with the specified message. |
| Parameters |
|
| Signature | cp.spec.Report:add(otherReport) -> nil |
|---|---|
| Type | Method |
| Description | Adds the passes/failures/aborts from the other report into this one. |
| Parameters |
|
| Signature | cp.spec.Report:failed(message) |
|---|---|
| Type | Method |
| Description | Records a fail, with the specified message. |
| Parameters |
|
| Signature | cp.spec.Report:passed([message]) |
|---|---|
| Type | Method |
| Description | Records a pass, with the specified message. |
| Parameters |
|
| 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 |
|