示例#1
0
 private string GetLogFileName(TestRecord testRecord)
 {
     if (testRecord != null)
     {
         string path     = ConfigurationManager.AppSettings["Report_Path"];
         string fileName = testRecord.RunDateTime.ToString("yyyyMMddHHmmss") + ".csv";
         string filePath = path + "_" + fileName;
         return(filePath);
     }
     else
     {
         return("testresultlog.csv");
     }
 }
示例#2
0
        private void LogSummaryResult(TestRecord testRecord)
        {
            string headerstyle    = " style='font-family: Calibri, sans-serif;'";
            string summaryheader  = "<p" + headerstyle + "> *** SUMMARY ***</p>";
            string summary        = testRecord.StoreSummaryResults();
            string failures       = testRecord.GetAllSuiteResults();
            string failureheading = "";

            if (failures != String.Empty)
            {
                failureheading = "<p" + headerstyle + "> *** FAILURES / ERRORS *** </p>";
            }

            string msg = summaryheader + summary + failureheading + failures;

            testRecord.SendMail(msg);
        }
示例#3
0
        private void LogTestResult(string logFileName, TestRecord testRecord)
        {
            string message = testRecord.StoreTestResults();

            LogMessageToCSV(logFileName, message);
        }
示例#4
0
        private void LogHeader(string logFileName, TestRecord testRecord)
        {
            string message = testRecord.GetHeader();

            LogMessageToCSV(logFileName, message);
        }
 private string GetLogFileName(TestRecord testRecord)
 {
     if (testRecord != null)
     {
         string path = ConfigurationManager.AppSettings["Report_Path"];
         string fileName = testRecord.RunDateTime.ToString("yyyyMMddHHmmss") + ".csv";
         string filePath = path + "_" + fileName;
         return filePath;
     }
     else
     {
         return "testresultlog.csv";
     }
 }
 private void LogTestResult(string logFileName, TestRecord testRecord)
 {
     string message = testRecord.StoreTestResults();
     LogMessageToCSV(logFileName, message);
 }
        private void LogSummaryResult(TestRecord testRecord)
        {
            string headerstyle = " style='font-family: Calibri, sans-serif;'";
            string summaryheader = "<p" + headerstyle + "> *** SUMMARY ***</p>";
            string summary = testRecord.StoreSummaryResults();
            string failures = testRecord.GetAllSuiteResults();
            string failureheading = "";

            if (failures != String.Empty)
                failureheading = "<p" + headerstyle + "> *** FAILURES / ERRORS *** </p>";

            string msg = summaryheader + summary + failureheading + failures;

            testRecord.SendMail(msg);
        }
 private void LogHeader(string logFileName, TestRecord testRecord)
 {
     string message = testRecord.GetHeader();
     LogMessageToCSV(logFileName, message);
 }