@@ -21,14 +21,6 @@ public class TxtToJSON
2121 // Initialize the maximum length of JSON output to 32M
2222 private JavaScriptSerializer serializer = new JavaScriptSerializer ( ) { MaxJsonLength = 32 * 1024 * 1024 } ;
2323
24- private enum LogType
25- {
26- None = - 1 ,
27- ErrorStackTrace = 1 ,
28- ErrorMessage = 2 ,
29- StandardOut = 3
30- } ;
31-
3224 /// <summary>
3325 /// Translates List<DataType.TestCase> to DataType.TestCasesSummary string
3426 /// </summary>
@@ -62,35 +54,6 @@ public string ConstructCaseDetail(DataType.TestCaseDetail caseDetail, string cap
6254 return ( serializer . Serialize ( caseDetail ) ) ;
6355 }
6456
65- /// <summary>
66- /// Gets the statistical information
67- /// </summary>
68- /// <param name="totalCasesNum">The number of total cases</param>
69- /// <param name="passedNum">The number of passed cases</param>
70- /// <param name="failedNum">The number of failed cases</param>
71- /// <param name="testRunStartTime">The start time of the run</param>
72- /// <param name="testRunEndTime">The end time of the run</param>
73- /// <returns>Return statistical information about this test</returns>
74- public string SummaryTable ( long totalCasesNum ,
75- long passedNum ,
76- long failedNum ,
77- DateTimeOffset testRunStartTime ,
78- DateTimeOffset testRunEndTime )
79- {
80- DataType . RunSummary sry = new DataType . RunSummary ( )
81- {
82- TotalCount = totalCasesNum ,
83- FailedCount = failedNum ,
84- PassedCount = passedNum ,
85- InconclusiveCount = totalCasesNum - passedNum - failedNum ,
86- PassRate = totalCasesNum == 0 ? 0 : ( float ) passedNum * 100 / totalCasesNum ,
87- StartTime = testRunStartTime . ToLocalTime ( ) . ToString ( "MM/dd/yyyy HH:mm:ss" ) ,
88- EndTime = testRunEndTime . ToLocalTime ( ) . ToString ( "MM/dd/yyyy HH:mm:ss" ) ,
89- Duration = testRunEndTime . Subtract ( testRunStartTime ) . ToString ( @"hh\:mm\:ss" )
90- } ;
91- return ( serializer . Serialize ( sry ) ) ;
92- }
93-
9457 /// <summary>
9558 /// Gets the test case list with basic information
9659 /// </summary>
0 commit comments