Search Results for

    Show / Hide Table of Contents

    Interface ITestResult

    The ITestResult interface represents the result of a test.

    Inherited Members
    IXmlNodeBuilder.ToXml(bool)
    IXmlNodeBuilder.AddToXml(TNode, bool)
    Namespace: NUnit.Framework.Interfaces
    Assembly: nunit.framework.dll
    Syntax
    public interface ITestResult : IXmlNodeBuilder

    Properties

    View Source

    AssertCount

    Gets the number of asserts executed when running the test and all its children.

    Declaration
    int AssertCount { get; }
    Property Value
    Type Description
    int
    View Source

    AssertionResults

    Gets a list of AssertionResults associated with the test

    Declaration
    IList<AssertionResult> AssertionResults { get; }
    Property Value
    Type Description
    IList<AssertionResult>
    View Source

    Children

    Gets the collection of child results.

    Declaration
    IEnumerable<ITestResult> Children { get; }
    Property Value
    Type Description
    IEnumerable<ITestResult>
    View Source

    Duration

    Gets the elapsed time for running the test in seconds

    Declaration
    double Duration { get; }
    Property Value
    Type Description
    double
    View Source

    EndTime

    Gets or sets the time the test finished running.

    Declaration
    DateTime EndTime { get; }
    Property Value
    Type Description
    DateTime
    View Source

    FailCount

    Gets the number of test cases that failed when running the test and all its children.

    Declaration
    int FailCount { get; }
    Property Value
    Type Description
    int
    View Source

    FullName

    Gets the full name of the test result

    Declaration
    string FullName { get; }
    Property Value
    Type Description
    string
    View Source

    HasChildren

    Indicates whether this result has any child results. Accessing HasChildren should not force creation of the Children collection in classes implementing this interface.

    Declaration
    bool HasChildren { get; }
    Property Value
    Type Description
    bool
    View Source

    InconclusiveCount

    Gets the number of test cases that were inconclusive when running the test and all its children.

    Declaration
    int InconclusiveCount { get; }
    Property Value
    Type Description
    int
    View Source

    Message

    Gets the message associated with a test failure or with not running the test

    Declaration
    string Message { get; }
    Property Value
    Type Description
    string
    View Source

    Name

    Gets the name of the test result

    Declaration
    string Name { get; }
    Property Value
    Type Description
    string
    View Source

    Output

    Gets any text output written to this result.

    Declaration
    string Output { get; }
    Property Value
    Type Description
    string
    View Source

    PassCount

    Gets the number of test cases that passed when running the test and all its children.

    Declaration
    int PassCount { get; }
    Property Value
    Type Description
    int
    View Source

    ResultState

    Gets the ResultState of the test result, which indicates the success or failure of the test.

    Declaration
    ResultState ResultState { get; }
    Property Value
    Type Description
    ResultState
    View Source

    SkipCount

    Gets the number of test cases that were skipped when running the test and all its children.

    Declaration
    int SkipCount { get; }
    Property Value
    Type Description
    int
    View Source

    StackTrace

    Gets any stack trace associated with an error or failure.

    Declaration
    string? StackTrace { get; }
    Property Value
    Type Description
    string
    View Source

    StartTime

    Gets or sets the time the test started running.

    Declaration
    DateTime StartTime { get; }
    Property Value
    Type Description
    DateTime
    View Source

    Test

    Gets the Test to which this result applies.

    Declaration
    ITest Test { get; }
    Property Value
    Type Description
    ITest
    View Source

    TestAttachments

    Gets the collection of files attached to the test

    Declaration
    ICollection<TestAttachment> TestAttachments { get; }
    Property Value
    Type Description
    ICollection<TestAttachment>
    View Source

    TotalCount

    Gets the total number of tests executed when running the test and all its children.

    Declaration
    int TotalCount { get; }
    Property Value
    Type Description
    int
    View Source

    WarningCount

    Gets the number of test cases that had warnings when running the test and all its children.

    Declaration
    int WarningCount { get; }
    Property Value
    Type Description
    int
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0