1 // ***********************************************************************
2 // Copyright (c) 2010 Charlie Poole
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 // ***********************************************************************
25 #define NUNIT_FRAMEWORK
30 using System.Collections.Generic;
32 namespace NUnit.Framework.Interfaces
35 /// The ITestResult interface represents the result of a test.
37 public interface ITestResult : IXmlNodeBuilder
40 /// Gets the ResultState of the test result, which
41 /// indicates the success or failure of the test.
43 ResultState ResultState
49 /// Gets the name of the test result
57 /// Gets the full name of the test result
65 /// Gets the elapsed time for running the test in seconds
73 /// Gets or sets the time the test started running.
81 /// Gets or sets the time the test finished running.
89 /// Gets the message associated with a test
90 /// failure or with not running the test
98 /// Gets any stacktrace associated with an
99 /// error or failure. Not available in
100 /// the Compact Framework 1.0.
108 /// Gets the number of asserts executed
109 /// when running the test and all its children.
118 /// Gets the number of test cases that failed
119 /// when running the test and all its children.
127 /// Gets the number of test cases that passed
128 /// when running the test and all its children.
136 /// Gets the number of test cases that were skipped
137 /// when running the test and all its children.
145 /// Gets the number of test cases that were inconclusive
146 /// when running the test and all its children.
148 int InconclusiveCount
154 /// Indicates whether this result has any child results.
155 /// Accessing HasChildren should not force creation of the
156 /// Children collection in classes implementing this interface.
164 /// Gets the the collection of child results.
166 IEnumerable<ITestResult> Children
172 /// Gets the Test to which this result applies.
180 /// Gets any text output written to this result.