< Summary

Class:GDX.Developer.Reports.NUnit.TestRun
Assembly:GDX
File(s):D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Developer/Reports/NUnit/TestRun.cs
Covered lines:27
Uncovered lines:0
Coverable lines:27
Total lines:50
Line coverage:100% (27 of 27)
Covered branches:0
Total branches:0
Covered methods:31
Total methods:31
Method coverage:100% (31 of 31)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
TestRun()0%110100%
Process(...)0%440100%

File(s)

D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Developer/Reports/NUnit/TestRun.cs

#LineLine coverage
 1// Copyright (c) 2020-2022 dotBunny Inc.
 2// dotBunny licenses this file to you under the BSL-1.0 license.
 3// See the LICENSE file in the project root for more information.
 4
 5namespace GDX.Developer.Reports.NUnit
 6{
 7    public class TestRun
 8    {
 29        public int Id { get; set; }
 810        public int TestCaseCount { get; set; }
 1911        public string Result { get; private set; } = "Incomplete";
 912        public int Total { get; private set; }
 1013        public int Passed { get; private set; }
 1414        public int Failed { get; private set; }
 1015        public int Inconclusive { get; private set; }
 1016        public int Skipped { get; private set; }
 617        public int Asserts { get; private set; }
 618        public string EngineVersion { get; set; }
 19#pragma warning disable IDE1006
 20        // ReSharper disable once InconsistentNaming
 221        public string CLRVersion { get; set; }
 22#pragma warning restore IDE1006
 223        public string StartTime { get; set; }
 224        public string EndTime { get; set; }
 225        public float Duration { get; set; }
 10026        public TestSuite TestSuite { get; } = new TestSuite();
 27
 28        public void Process(string passedResult = "Passed", string failedResult = "Failed",
 29            string inconclusiveResult = "Inconclusive", string skippedResult = "Skipped")
 430        {
 31#if !UNITY_DOTSRUNTIME
 432            EngineVersion = UnityEngine.Application.unityVersion;
 33#endif
 34
 35            // Process the underlying suite of tests
 436            TestSuite.Process(passedResult, failedResult, inconclusiveResult, skippedResult);
 37
 438            Passed = TestSuite.Passed;
 439            Failed = TestSuite.Failed;
 440            Inconclusive = TestSuite.Inconclusive;
 441            Skipped = TestSuite.Skipped;
 442            Total = Passed + Failed + Inconclusive + Skipped;
 43
 444            TestCaseCount = TestSuite.TestCaseCount;
 45
 446            Asserts = TestSuite.Asserts;
 447            Result = Failed > 0 || Total <= 0 ? failedResult : passedResult;
 448        }
 49    }
 50}