diff --git a/DistTestCore/DistTest.cs b/DistTestCore/DistTest.cs index 9f4dc1e..3560d5d 100644 --- a/DistTestCore/DistTest.cs +++ b/DistTestCore/DistTest.cs @@ -200,8 +200,10 @@ namespace DistTestCore private void DisposeTestLifecycle() { var lifecycle = Get(); - fixtureLog.Log($"{GetCurrentTestName()} = {GetTestResult()} ({lifecycle.GetTestDuration()})"); - statusLog.ConcludeTest(GetTestResult()); + var testResult = GetTestResult(); + var testDuration = lifecycle.GetTestDuration(); + fixtureLog.Log($"{GetCurrentTestName()} = {testResult} ({testDuration})"); + statusLog.ConcludeTest(testResult, testDuration); Stopwatch.Measure(fixtureLog, $"Teardown for {GetCurrentTestName()}", () => { lifecycle.Log.EndTest(); diff --git a/Logging/StatusLog.cs b/Logging/StatusLog.cs index 0913023..740a564 100644 --- a/Logging/StatusLog.cs +++ b/Logging/StatusLog.cs @@ -16,7 +16,7 @@ namespace Logging this.codexId = codexId; } - public void ConcludeTest(string resultStatus) + public void ConcludeTest(string resultStatus, string testDuration) { Write(new StatusLogJson { @@ -27,7 +27,8 @@ namespace Logging codexid = codexId, category = NameUtils.GetCategoryName(), fixturename = fixtureName, - testname = NameUtils.GetTestMethodName() + testname = NameUtils.GetTestMethodName(), + testduration = testDuration }); } @@ -57,5 +58,6 @@ namespace Logging public string category { get; set; } = string.Empty; public string fixturename { get; set; } = string.Empty; public string testname { get; set; } = string.Empty; + public string testduration { get; set;} = string.Empty; } }