コード例 #1
0
        /// <summary>
        /// Updates context.
        /// </summary>
        public override void UpdateContext()
        {
            TestOptions options = new TestOptions();

            options.InteractiveFirst = View.InteractiveFirst;

            List <TestInfo> selectedTests = View.SelectedTests;

            foreach (TestInfo info in selectedTests)
            {
                options.Tests.Add(info.Order);
            }

            options.Groups.AddRange(View.SelectedGroups);

            ContextController.UpdateTestOptions(options);

            TestLog log = new TestLog();

            log.TestResults       = _testResults;
            log.Tests             = _testInfos;
            log.TestExecutionTime = _testExecutionTime;

            ContextController.UpdateTestLog(log);
        }
コード例 #2
0
 void UpdateTestLog()
 {
     TestTool.GUI.Data.TestLog log = new TestTool.GUI.Data.TestLog();
     log.TestResults           = _testResults;
     log.Features              = _td.Features;
     log.TestExecutionTime     = _testExecutionTime;
     log.InitializationData    = _initializationData;
     log.FeaturesDefinitionLog = _featureDefinitionLog;
     ContextController.UpdateTestLog(log);
 }
コード例 #3
0
        private TestLogFull GetTestLog(TestSuiteParameters testSuiteParameters,
                                       SerializableTestingParameters parameters,
                                       TestController controller)
        {
            controller.UpdateTestLog();

            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 = controller.DeviceInformation;

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

            testLog.Application = new ApplicationInfo();

            testLog.DeviceEnvironment                      = new DeviceEnvironment();
            testLog.DeviceEnvironment.Credentials          = new Credentials();
            testLog.DeviceEnvironment.Credentials.UserName = testSuiteParameters.UserName;
            // password not used for REPORTS
            testLog.DeviceEnvironment.TestSettings = new TestSettings();
            // only two values are user for log
            testLog.DeviceEnvironment.TestSettings.OperationDelay = testSuiteParameters.OperationDelay;
            testLog.DeviceEnvironment.TestSettings.RecoveryDelay  = testSuiteParameters.RecoveryDelay;
            testLog.DeviceEnvironment.Timeouts.InterTests         = testSuiteParameters.TimeBetweenTests;
            testLog.DeviceEnvironment.Timeouts.Message            = testSuiteParameters.MessageTimeout;
            testLog.DeviceEnvironment.Timeouts.Reboot             = testSuiteParameters.RebootTimeout;

            if (parameters.Device != null)
            {
                testLog.ProductName = parameters.Device.Model;
            }

            if (parameters.SessionInfo != null)
            {
                testLog.TesterInfo       = parameters.SessionInfo.TesterInfo;
                testLog.OtherInformation = parameters.SessionInfo.OtherInformation;
                testLog.MemberInfo       = parameters.SessionInfo.MemberInfo;
            }

            return(testLog);
        }