new TestResult()
Members
-
errors :Array.<module:xunit~TestResult~MethodResult>
-
Unexpected exceptions.
-
failures :Array.<module:xunit~TestResult~MethodResult>
-
Explicit test failures.
-
skipped :Array.<module:xunit~TestResult~MethodResult>
-
Skipped tests.
-
successes :Array.<module:xunit~TestResult~MethodResult>
-
Successes.
-
tests :Map.<string, module:xunit~TestExecution>
-
All test executions.
Methods
-
addError(methodName, exception)
-
Record an unexpected exception from a execution.
Parameters:
Name Type Description methodNamestring Name of the associated
module:xunit.TestCasemethod.exceptionError Exception caught.
-
addFailure(methodName, message)
-
Record a test failure.
Parameters:
Name Type Description methodNamestring Name of the associated
module:xunit.TestCasemethod.messagestring Message from the test or framework.
-
addSkip(methodName, message)
-
Record a test skipped.
Parameters:
Name Type Description methodNamestring Name of the associated
module:xunit.TestCasemethod.messagestring Reason the test was skipped.
-
addSuccess(methodName)
-
Record a successful execution.
Parameters:
Name Type Description methodNamestring Name of the associated
module:xunit.TestCasemethod. -
startTest(methodName)
-
Record the start of a test execution.
Parameters:
Name Type Description methodNamestring Name of the associated
module:xunit.TestCasemethod. -
stopTest(methodName)
-
Record the stop of a test execution.
Parameters:
Name Type Description methodNamestring Name of the associated
module:xunit.TestCasemethod. -
summary(formattedopt) → {Array.<string>}
-
Text summary of the results.
Useful for test runners.
Parameters:
Name Type Attributes Default Description formattedboolean <optional>
false Try to line things up in columns.
Returns:
Array.<string> -Summary, one line per entry in the array.
-
wasSuccessful() → {boolean}
-
Returns:
boolean -Indicates success so far.
Type Definitions
-
MethodResult
-
Properties:
Name Type Attributes Description methodNamestring Name of the associated
module:xunit.TestCasemethod.errorstring <nullable>
Name of caught exception.
messagestring Message from the test or framework.