Пример #1
0
 private void subUI(TestSuite obj)
 {
     openDivCount = 2;
     foreach (var TCaseObject in obj.Results.TCase)
     {
         result += "<h3><a href='#'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + TCaseObject.Name;
         if (TCaseObject.Result.Equals("Success"))
         {
             result += "<img src='images/success.png' ";
         }
         else if (TCaseObject.Result.Equals("NotRunnable"))
         {
             result += "<img src='images/notrunnable.png' ";
         }
         else
         {
             result += "<img src='images/failure.png' ";
         }
         result += "style='position: absolute; left: .5em; top: 50%; margin-top: -8px;'/></a></h3><div>";
         result += "<table width='100%'>";
         result += "<tr>";
         result += "<td width='20%' align='center'><b>Executed</b></td>";
         result += "<td width='20%' align='center'><b>Result</b></td>";
         result += "<td width='20%' align='center'><b>Success</b></td>";
         result += "<td width='20%' align='center'><b>Asserts</b></td>";
         result += "<td width='20%' align='center'><b>Time</b></td>";
         result += "</tr>";
         result += "<tr>";
         result += "<td width='20%' align='center'>" + TCaseObject.Executed + "</td>";
         result += "<td width='20%' align='center'>" + TCaseObject.Result + "</td>";
         result += "<td width='20%' align='center'>" + TCaseObject.Success + "</td>";
         result += "<td width='20%' align='center'>" + TCaseObject.Asserts + "</td>";
         result += "<td width='20%' align='center'>" + TCaseObject.Time + "</td>";
         result += "</tr>";
         result += "</table>";
         if (TCaseObject.Result.Equals("Error"))
         {
             result += "<br/>";
             result += "<table width='100%'>";
             result += "<tr>";
             result += "<td width='20%' align='center'><b>Message</b></td>";
             result += "<td width='80%'>" + TCaseObject.Failure.Message + "</td>";
             result += "</tr>";
             result += "<tr>";
             result += "<td width='20%' align='center'><b>Stack Trace</b></td>";
             result += "<td width='80%'>" + TCaseObject.Failure.StackTrace + "</td>";
             result += "</tr>";
             result += "</table>";
         }
         result += "</div>";
     }
 }
Пример #2
0
 private void mainUI(TestSuite obj)
 {
     numOfTestFixtures++;
     if (openDivCount != 0)
     {
         result += "</div></div>";
         openDivCount = 0;
     }
     acc_name = "accordion" + acc_num;
     acc_num++;
     result += "<h3><a href='#'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + obj.Name;
     if (obj.Result.Equals("Success"))
     {
         result += "<img src='images/success.png' ";
     }
     else
     {
         result += "<img src='images/failure.png' ";
     }
     result += "style='position: absolute; left: .5em; top: 50%; margin-top: -8px;'/></a></h3><div>";
     result += "<script>$(document).ready(function (){$('#" + acc_name + "').accordion({ clearStyle: true, autoHeight: false, collapsible: true, active: false });});</script>";
     result += "<div id='" + acc_name + "'>";
 }