summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs
blob: f2249f2fd133fbcb5a3ba2a4584e129a4f92205c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using System;
using System.Collections.Generic;
using NUnit.Framework.Interfaces;

namespace UnityEditor.TestTools.TestRunner.Api
{
    public interface ITestResultAdaptor
    {
        ITestAdaptor Test { get; }
        string Name { get; }

        /// <summary>Gets the full name of the test result</summary>
        string FullName { get; }

        string ResultState { get; }

        TestStatus TestStatus { get; }

        /// <summary>Gets the elapsed time for running the test in seconds</summary>
        double Duration { get; }

        /// <summary>Gets or sets the time the test started running.</summary>
        DateTime StartTime { get; }

        /// <summary>Gets or sets the time the test finished running.</summary>
        DateTime EndTime { get; }

        /// <summary>
        /// Gets the message associated with a test
        /// failure or with not running the test
        /// </summary>
        string Message { get; }

        /// <summary>
        /// Gets any stacktrace associated with an
        /// error or failure. Not available in
        /// the Compact Framework 1.0.
        /// </summary>
        string StackTrace { get; }

        /// <summary>
        /// Gets the number of asserts executed
        /// when running the test and all its children.
        /// </summary>
        int AssertCount { get; }

        /// <summary>
        /// Gets the number of test cases that failed
        /// when running the test and all its children.
        /// </summary>
        int FailCount { get; }

        /// <summary>
        /// Gets the number of test cases that passed
        /// when running the test and all its children.
        /// </summary>
        int PassCount { get; }

        /// <summary>
        /// Gets the number of test cases that were skipped
        /// when running the test and all its children.
        /// </summary>
        int SkipCount { get; }

        /// <summary>
        /// Gets the number of test cases that were inconclusive
        /// when running the test and all its children.
        /// </summary>
        int InconclusiveCount { get; }

        /// <summary>
        /// Indicates whether this result has any child results.
        /// Accessing HasChildren should not force creation of the
        /// Children collection in classes implementing this interface.
        /// </summary>
        bool HasChildren { get; }

        /// <summary>Gets the the collection of child results.</summary>
        IEnumerable<ITestResultAdaptor> Children { get; }

        /// <summary>Gets any text output written to this result.</summary>
        string Output { get; }

        TNode ToXml();
    }
}