mirror of
https://github.com/codex-storage/cs-codex-dist-tests.git
synced 2025-02-04 16:24:22 +00:00
Adds test duration to status log
This commit is contained in:
parent
bbf66bb0f0
commit
344c004299
@ -200,8 +200,10 @@ namespace DistTestCore
|
|||||||
private void DisposeTestLifecycle()
|
private void DisposeTestLifecycle()
|
||||||
{
|
{
|
||||||
var lifecycle = Get();
|
var lifecycle = Get();
|
||||||
fixtureLog.Log($"{GetCurrentTestName()} = {GetTestResult()} ({lifecycle.GetTestDuration()})");
|
var testResult = GetTestResult();
|
||||||
statusLog.ConcludeTest(GetTestResult());
|
var testDuration = lifecycle.GetTestDuration();
|
||||||
|
fixtureLog.Log($"{GetCurrentTestName()} = {testResult} ({testDuration})");
|
||||||
|
statusLog.ConcludeTest(testResult, testDuration);
|
||||||
Stopwatch.Measure(fixtureLog, $"Teardown for {GetCurrentTestName()}", () =>
|
Stopwatch.Measure(fixtureLog, $"Teardown for {GetCurrentTestName()}", () =>
|
||||||
{
|
{
|
||||||
lifecycle.Log.EndTest();
|
lifecycle.Log.EndTest();
|
||||||
|
@ -16,7 +16,7 @@ namespace Logging
|
|||||||
this.codexId = codexId;
|
this.codexId = codexId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ConcludeTest(string resultStatus)
|
public void ConcludeTest(string resultStatus, string testDuration)
|
||||||
{
|
{
|
||||||
Write(new StatusLogJson
|
Write(new StatusLogJson
|
||||||
{
|
{
|
||||||
@ -27,7 +27,8 @@ namespace Logging
|
|||||||
codexid = codexId,
|
codexid = codexId,
|
||||||
category = NameUtils.GetCategoryName(),
|
category = NameUtils.GetCategoryName(),
|
||||||
fixturename = fixtureName,
|
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 category { get; set; } = string.Empty;
|
||||||
public string fixturename { get; set; } = string.Empty;
|
public string fixturename { get; set; } = string.Empty;
|
||||||
public string testname { get; set; } = string.Empty;
|
public string testname { get; set; } = string.Empty;
|
||||||
|
public string testduration { get; set;} = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user