new TestResult()

Description

Accumulated results from running a TestCase.

Details

Members


errors :Array.<NexusHoratio.xunit~TestResult~MethodResult>

Description

Unexpected exceptions.


failures :Array.<NexusHoratio.xunit~TestResult~MethodResult>

Description

Explicit test failures.


skipped :Array.<NexusHoratio.xunit~TestResult~MethodResult>

Description

Skipped tests.


successes :Array.<NexusHoratio.xunit~TestResult~MethodResult>

Description

Successes.


tests :Map.<string, NexusHoratio.xunit~TestExecution>

Description

All test executions.

Details

Methods


addError( methodName, exception )

Description

Record an unexpected exception from a execution.

Parameters
Name Type Description
methodName string

Name of the associated NexusHoratio.xunit.TestCase method.

exception Error

Exception caught.

Details

addFailure( methodName, message )

Description

Record a test failure.

Parameters
Name Type Description
methodName string

Name of the associated NexusHoratio.xunit.TestCase method.

message string

Message from the test or framework.

Details

addSkip( methodName, message )

Description

Record a test skipped.

Parameters
Name Type Description
methodName string

Name of the associated NexusHoratio.xunit.TestCase method.

message string

Reason the test was skipped.

Details

addSuccess( methodName )

Description

Record a successful execution.

Parameters
Name Type Description
methodName string

Name of the associated NexusHoratio.xunit.TestCase method.

Details

startTest( methodName )

Description

Record the start of a test execution.

Parameters
Name Type Description
methodName string

Name of the associated NexusHoratio.xunit.TestCase method.

Details

stopTest( methodName )

Description

Record the stop of a test execution.

Parameters
Name Type Description
methodName string

Name of the associated NexusHoratio.xunit.TestCase method.

Details

wasSuccessful() → {boolean}

Returns

Indicates success so far.

Details

summary( [ formatted ] ) → {Array.<string>}

Description

Text summary of the results.

Useful for test runners.

Parameters
Name Type Attributes Default Description
formatted boolean <optional>
false

Try to line things up in columns.

Returns

Summary, one line per entry in the array.

Details

Type Definitions


MethodResult

Properties
Name Type Attributes Description
methodName string

Name of the associated NexusHoratio.xunit.TestCase method.

error string <nullable>

Name of caught exception.

message string

Message from the test or framework.

Details
object