Clean unused functions and data structures
This commit is contained in:
Родитель
707e61ccbd
Коммит
9ecb8db4c9
|
@ -165,51 +165,5 @@ namespace Microsoft.Protocols.TestTools
|
|||
this.CapturePath = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the summary for all test cases
|
||||
/// </summary>
|
||||
public class RunSummary
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of total test cases
|
||||
/// </summary>
|
||||
public long TotalCount;
|
||||
|
||||
/// <summary>
|
||||
/// The number of passed test cases
|
||||
/// </summary>
|
||||
public long PassedCount;
|
||||
|
||||
/// <summary>
|
||||
/// The number of failed test cases
|
||||
/// </summary>
|
||||
public long FailedCount;
|
||||
|
||||
/// <summary>
|
||||
/// The number of inconclusive test cases
|
||||
/// </summary>
|
||||
public long InconclusiveCount;
|
||||
|
||||
/// <summary>
|
||||
/// The pass rate of this run
|
||||
/// </summary>
|
||||
public float PassRate;
|
||||
|
||||
/// <summary>
|
||||
/// The start time of this run
|
||||
/// </summary>
|
||||
public string StartTime;
|
||||
|
||||
/// <summary>
|
||||
/// The end time to of this run
|
||||
/// </summary>
|
||||
public string EndTime;
|
||||
|
||||
/// <summary>
|
||||
/// The duration of this run
|
||||
/// </summary>
|
||||
public string Duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,14 +21,6 @@ namespace Microsoft.Protocols.TestTools
|
|||
// Initialize the maximum length of JSON output to 32M
|
||||
private JavaScriptSerializer serializer = new JavaScriptSerializer() { MaxJsonLength = 32 * 1024 * 1024 };
|
||||
|
||||
private enum LogType
|
||||
{
|
||||
None = -1,
|
||||
ErrorStackTrace = 1,
|
||||
ErrorMessage = 2,
|
||||
StandardOut = 3
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Translates List<DataType.TestCase> to DataType.TestCasesSummary string
|
||||
/// </summary>
|
||||
|
@ -62,35 +54,6 @@ namespace Microsoft.Protocols.TestTools
|
|||
return (serializer.Serialize(caseDetail));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the statistical information
|
||||
/// </summary>
|
||||
/// <param name="totalCasesNum">The number of total cases</param>
|
||||
/// <param name="passedNum">The number of passed cases</param>
|
||||
/// <param name="failedNum">The number of failed cases</param>
|
||||
/// <param name="testRunStartTime">The start time of the run</param>
|
||||
/// <param name="testRunEndTime">The end time of the run</param>
|
||||
/// <returns>Return statistical information about this test</returns>
|
||||
public string SummaryTable(long totalCasesNum,
|
||||
long passedNum,
|
||||
long failedNum,
|
||||
DateTimeOffset testRunStartTime,
|
||||
DateTimeOffset testRunEndTime)
|
||||
{
|
||||
DataType.RunSummary sry = new DataType.RunSummary()
|
||||
{
|
||||
TotalCount = totalCasesNum,
|
||||
FailedCount = failedNum,
|
||||
PassedCount = passedNum,
|
||||
InconclusiveCount = totalCasesNum - passedNum - failedNum,
|
||||
PassRate = totalCasesNum == 0 ? 0 : (float)passedNum * 100 / totalCasesNum,
|
||||
StartTime = testRunStartTime.ToLocalTime().ToString("MM/dd/yyyy HH:mm:ss"),
|
||||
EndTime = testRunEndTime.ToLocalTime().ToString("MM/dd/yyyy HH:mm:ss"),
|
||||
Duration = testRunEndTime.Subtract(testRunStartTime).ToString(@"hh\:mm\:ss")
|
||||
};
|
||||
return (serializer.Serialize(sry));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the test case list with basic information
|
||||
/// </summary>
|
||||
|
|
Загрузка…
Ссылка в новой задаче