/// <summary>
        /// Saves test results.
        /// </summary>
        /// <param name="filename">Path to the file to write.</param>
        public void SaveTestResults(string filename)
        {
            Utils.PdfReportGenerator reportGenerator = new PdfReportGenerator();
            reportGenerator.OnException   += reportGenerator_OnException;
            reportGenerator.OnReportSaved += reportGenerator_OnReportSaved;

            Data.TestLogFull testLog = new TestLogFull();
            Data.TestLog     log     = ContextController.GetTestLog();
            testLog.TestResults = log.TestResults;
            testLog.Tests       = log.Tests;
            if (log.TestExecutionTime != DateTime.MinValue)
            {
                testLog.TestExecutionTime = log.TestExecutionTime;
            }
            else
            {
                testLog.TestExecutionTime = DateTime.Now;
            }
            SetupInfo info = ContextController.GetSetupInfo();

            testLog.TesterInfo       = info.TesterInfo;
            testLog.Application      = ContextController.GetApplicationInfo();
            testLog.DeviceInfo       = info.DevInfo;
            testLog.OtherInformation = info.OtherInfo;

            testLog.DeviceEnvironment = ContextController.GetDeviceEnvironment();

            reportGenerator.CreateReport(filename, testLog);
        }
        /// <summary>
        /// Colllects log data.
        /// </summary>
        /// <returns></returns>
        private Data.TestLogFull GetFullTestData()
        {
            Data.TestLogFull testLog = new TestLogFull();
            Data.TestLog     log     = ContextController.GetTestLog();
            testLog.TestResults           = log.TestResults;
            testLog.Features              = log.Features;
            testLog.InitializationData    = log.InitializationData;
            testLog.FeaturesDefinitionLog = log.FeaturesDefinitionLog;

            testLog.DeviceInformation = _conformanceTestingInfo;

            if (log.TestExecutionTime != DateTime.MinValue)
            {
                testLog.TestExecutionTime = log.TestExecutionTime;
            }
            else
            {
                testLog.TestExecutionTime = DateTime.Now;
            }

            SetupInfo info = ContextController.GetSetupInfo();

            testLog.TesterInfo       = info.TesterInfo;
            testLog.Application      = ContextController.GetApplicationInfo();
            testLog.DeviceInfo       = info.DevInfo;
            testLog.OtherInformation = info.OtherInfo;
            testLog.MemberInfo       = info.MemberInfo;

            testLog.DeviceEnvironment = ContextController.GetDeviceEnvironment();
            return(testLog);
        }
Beispiel #3
0
 /// <summary>
 /// Returns application info
 /// </summary>
 /// <returns>Application info</returns>
 public ApplicationInfo GetApplicationInfo()
 {
     return(ContextController.GetApplicationInfo());
 }