using System; using System.Collections.Generic; using NUnit.Framework.Interfaces; namespace UnityEditor.TestTools.TestRunner.Api { /// /// The `ITestResultAdaptor` is the representation of the test results for a node in the test tree implemented as a wrapper around the [NUnit](http://www.nunit.org/) [ITest](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/ITestResults.cs) interface. /// public interface ITestResultAdaptor { /// /// The test details of the test result tree node as a /// ITestAdaptor Test { get; } /// ///The name of the test node. /// string Name { get; } /// /// Gets the full name of the test result /// /// ///The name of the test result. /// string FullName { get; } /// ///Gets the state of the result as a string. /// /// ///It returns one of these values: `Inconclusive`, `Skipped`, `Skipped:Ignored`, `Skipped:Explicit`, `Passed`, `Failed`, `Failed:Error`, `Failed:Cancelled`, `Failed:Invalid` /// string ResultState { get; } /// ///Gets the status of the test as an enum. /// /// ///It returns one of these values:`Inconclusive`, `Skipped`, `Passed`, or `Failed` /// TestStatus TestStatus { get; } /// /// Gets the elapsed time for running the test in seconds /// /// /// Time in seconds. /// double Duration { get; } /// /// Gets or sets the time the test started running. /// /// ///A DataTime object. /// DateTime StartTime { get; } /// ///Gets or sets the time the test finished running. /// /// ///A DataTime object. /// DateTime EndTime { get; } /// /// The message associated with a test failure or with not running the test /// string Message { get; } /// /// Any stacktrace associated with an error or failure. Not available in the Compact Framework 1.0. /// string StackTrace { get; } /// /// The number of asserts executed when running the test and all its children. /// int AssertCount { get; } /// /// The number of test cases that failed when running the test and all its children. /// int FailCount { get; } /// /// The number of test cases that passed when running the test and all its children. /// int PassCount { get; } /// /// The number of test cases that were skipped when running the test and all its children. /// int SkipCount { get; } /// ///The number of test cases that were inconclusive when running the test and all its children. /// int InconclusiveCount { get; } /// /// Accessing HasChildren should not force creation of the Children collection in classes implementing this interface. /// /// True if this result has any child results. bool HasChildren { get; } /// /// Gets the the collection of child results. /// IEnumerable Children { get; } /// /// Gets any text output written to this result. /// string Output { get; } /// /// Use this to save the results to an XML file /// /// /// The test results as an `NUnit` XML node. /// TNode ToXml(); } }