TestResult
The TestResult class represents the result of a test.
Gets or sets the count of asserts executed
when running the test.
Gets the collection of child results.
Gets or sets the elapsed time for running the test in seconds
Gets or sets the time the test finished running.
Gets the number of test cases that failed
when running the test and all its children.
Gets the full name of the test result
Indicates whether this result has any child results.
Test HasChildren before accessing Children to avoid
the creation of an empty collection.
Gets the number of test cases that were inconclusive
when running the test and all its children.
Gets the message associated with a test
failure or with not running the test
Gets the name of the test result
Gets any text output written to this result.
Gets a TextWriter, which will write output to be included in the result.
Gets the number of test cases that passed
when running the test and all its children.
Gets the ResultState of the test result, which
indicates the success or failure of the test.
Gets the number of test cases that were skipped
when running the test and all its children.
Gets any stacktrace associated with an
error or failure.
Gets or sets the time the test started running.
Gets the test with which this result is associated.
Construct a test result given a Test
Adds a child result to this result, setting this result's
ResultState to Failure if the child result failed.
Adds the XML representation of the result as a child of the
supplied parent node..
Set the test result based on the type of exception thrown
Set the test result based on the type of exception thrown
RecordTearDownException appends the message and stacktrace
from an exception arising during teardown of the test
to any previously recorded information, so that any
earlier failure information is not lost. Note that
calling Assert.Ignore, Assert.Inconclusive, etc. during
teardown is treated as an error. If the current result
represents a suite, it may show a teardown error even
though all contained tests passed.
Set the result of the test
Set the result of the test
Set the result of the test
Returns the Xml representation of the result.