コード例 #1
0
        protected void OnLoadTestSuite(object sender, CommandEventArgs e)
        {
            LabelError.Visible = false;
            try
            {
                if (!string.IsNullOrEmpty(TestSuiteFile.FileName))
                {
                    TestCommon = new TestCommon();
                    //TestCommon.testID = TextTestCase.Text;
                    TestCommon.Title = TestSuiteFile.FileName;
                    TestCommon.LoadTestSuit(TestSuiteFile.FileContent);

                    DeviceServiceTest                = new Device10.DeviceServiceTest(TestCommon);
                    DeviceIO10ServiceTest            = new DeviceIO10.DeviceIO10ServiceTest(TestCommon);
                    EventServiceTest                 = new Events10.EventServiceTest(TestCommon);
                    MediaServiceTest                 = new Media10.MediaServiceTest(TestCommon);
                    ImagingService10Test             = new Imaging10.ImagingService10Test(TestCommon);
                    ImagingService20Test             = new Imaging20.ImagingService20Test(TestCommon);
                    PTZServiceTest                   = new PTZ20.PTZServiceTest(TestCommon);
                    Search10ServiceTest              = new Search10.SearchServiceTest(TestCommon);
                    Recording10ServiceTest           = new Recording10.RecordingServiceTest(TestCommon);
                    Replay10ServiceTest              = new Replay10.ReplayServiceTest(TestCommon);
                    Receiver10ServiceTest            = new DUT.CameraWebService.Receiver10.ReceiverServiceTest(TestCommon);
                    PACS10ServiceTest                = new PACS10.PACSServiceTest(TestCommon);
                    Door10ServiceTest                = new Door10.DoorServiceTest(TestCommon);
                    PACS11ServiceTest                = new PACS11.PACSServiceTest(TestCommon);
                    Door11ServiceTest                = new Door11.DoorServiceTest(TestCommon);
                    Door12ServiceTest                = new DUT.CameraWebService.Door12.DoorServiceTest(TestCommon);
                    PACS12ServiceTest                = new PACS12.PACSServiceTest(TestCommon);
                    AdvancedSecurity10ServiceTest    = new AdvancedSecurity10.AdvancedSecurityServiceTest(TestCommon);
                    PullPointSubscriptionServiceTest = new Events10.PullPointSubscriptionServiceTest(TestCommon);
                    CredentialServiceTest            = new ServiceCredential10.CredentialServiceTest(TestCommon);
                    AccessRulesServiceTest           = new ServiceAccessRules10.AccessRulesServiceTest(TestCommon);
                    ScheduleServiceTest              = new ServiceSchedule10.ScheduleServiceTest(TestCommon);
                    Media2ServiceTest                = new Media210.Media2ServiceTest(TestCommon);
                    Media2SVCServiceTest             = new Media2SVC.Media2SVCServiceTest(TestCommon);
                    AnalyticsEngineServiceTest       = new ServiceAnalytics20.AnalyticsEngineServiceTest(TestCommon);
                    ProvisioningServiceTest          = new Provisioning10.ProvisioningServiceTest(TestCommon);
                    ThermalServiceTest               = new Thermal10.ThermalServiceTest(TestCommon);

                    Reset();

                    //List<string> tests = GetTests(TestCommon.m_testSuitXML);
                    ListTestCases.DataSource = TestCommon.TestList2;
                    ListTestCases.DataBind();
                }
            }
            catch (System.Exception ex)
            {
                ShowError(ex);
                TestCommon = null;
            }
            TestCommon.testResult         = "";
            TestCommon.testSummaryResult  = true;
            TestCommon.testStepsCompleted = false;
            TestCommon.previousStepNumber = 0;
        }
コード例 #2
0
        public void TestSuitInit()
        {
            if (Application["m_TestCommon"] != null)
            {
                m_TestCommon = (TestCommon)Application["m_TestCommon"];
            }
            else
            {
                m_TestCommon = new TestCommon();
                m_TestCommon.LoadTestSuit();
                Application["m_TestCommon"] = m_TestCommon;
            }

            if (Application["m_EventServiceTest"] != null)
            {
                m_EventServiceTest = (EventServiceTest)Application["m_EventServiceTest"];
            }
            else
            {
                m_EventServiceTest = new EventServiceTest(m_TestCommon);
                Application["m_EventServiceTest"] = m_EventServiceTest;
            }
        }
コード例 #3
0
        private void TestInit()
        {
            if (Application["m_TestCommon"] != null)
            {
                m_TestCommon = (TestCommon)Application["m_TestCommon"];
            }
            else
            {
                m_TestCommon = new TestCommon();
                m_TestCommon.LoadTestSuit();
                Application["m_TestCommon"] = m_TestCommon;
            }

            if (Application["m_DeviceServiceTest"] != null)
            {
                m_DeviceServiceTest = (Device10.DeviceServiceTest)Application["m_DeviceServiceTest"];
            }
            else
            {
                m_DeviceServiceTest = new Device10.DeviceServiceTest(m_TestCommon);
                Application["m_DeviceServiceTest"] = m_DeviceServiceTest;
            }

            if (Application[Base.AppVars.REPLAYSERVICE] != null)
            {
                m_ReplayServiceTest = (Replay10.ReplayServiceTest)Application[Base.AppVars.REPLAYSERVICE];
            }
            else
            {
                m_ReplayServiceTest = new Replay10.ReplayServiceTest(m_TestCommon);
                Application[Base.AppVars.REPLAYSERVICE] = m_ReplayServiceTest;
            }

            if (Application["m_DeviceIO10ServiceTest"] != null)
            {
                m_DeviceIO10ServiceTest = (DeviceIO10.DeviceIO10ServiceTest)Application["m_DeviceIO10ServiceTest"];
            }
            else
            {
                m_DeviceIO10ServiceTest = new DeviceIO10.DeviceIO10ServiceTest(m_TestCommon);
                Application["m_DeviceIO10ServiceTest"] = m_DeviceIO10ServiceTest;
            }

            if (Application["m_EventServiceTest"] != null)
            {
                m_EventServiceTest = (Events10.EventServiceTest)Application["m_EventServiceTest"];
            }
            else
            {
                m_EventServiceTest = new Events10.EventServiceTest(m_TestCommon);
                Application["m_EventServiceTest"] = m_EventServiceTest;
            }

            if (Application["m_MediaServiceTest"] != null)
            {
                m_MediaServiceTest = (Media10.MediaServiceTest)Application["m_MediaServiceTest"];
            }
            else
            {
                m_MediaServiceTest = new Media10.MediaServiceTest(m_TestCommon);
                Application["m_MediaServiceTest"] = m_MediaServiceTest;
            }

            if (Application["m_ImagingService10Test"] != null)
            {
                m_ImagingService10Test = (Imaging10.ImagingService10Test)Application["m_ImagingService10Test"];
            }
            else
            {
                m_ImagingService10Test = new Imaging10.ImagingService10Test(m_TestCommon);
                Application["m_ImagingService10Test"] = m_ImagingService10Test;
            }

            if (Application["m_ImagingService20Test"] != null)
            {
                m_ImagingService20Test = (Imaging20.ImagingService20Test)Application["m_ImagingService20Test"];
            }
            else
            {
                m_ImagingService20Test = new Imaging20.ImagingService20Test(m_TestCommon);
                Application["m_ImagingService20Test"] = m_ImagingService20Test;
            }

            if (Application["m_PTZServiceTest"] != null)
            {
                m_PTZServiceTest = (PTZ20.PTZServiceTest)Application["m_PTZServiceTest"];
            }
            else
            {
                m_PTZServiceTest = new PTZ20.PTZServiceTest(m_TestCommon);
                Application["m_PTZServiceTest"] = m_PTZServiceTest;
            }
            if (Application["m_PTZServiceTest"] != null)
            {
                m_PTZServiceTest = (PTZ20.PTZServiceTest)Application["m_PTZServiceTest"];
            }
            else
            {
                m_PTZServiceTest = new PTZ20.PTZServiceTest(m_TestCommon);
                Application["m_PTZServiceTest"] = m_PTZServiceTest;
            }
            if (Application["m_RecordingServiceTest"] != null)
            {
                m_RecordingServiceTest = (Recording10.RecordingServiceTest)Application["m_RecordingServiceTest"];
            }
            else
            {
                m_RecordingServiceTest = new Recording10.RecordingServiceTest(m_TestCommon);
                Application["m_RecordingServiceTest"] = m_RecordingServiceTest;
            }
            if (Application["m_ReceiverServiceTest"] != null)
            {
                m_ReceiverServiceTest = (Receiver10.ReceiverServiceTest)Application["m_ReceiverServiceTest"];
            }
            else
            {
                m_ReceiverServiceTest = new Receiver10.ReceiverServiceTest(m_TestCommon);
                Application["m_ReceiverServiceTest"] = m_ReceiverServiceTest;
            }
            if (Application["m_SearchServiceTest"] != null)
            {
                m_SearchServiceTest = (Search10.SearchServiceTest)Application["m_SearchServiceTest"];
            }
            else
            {
                m_SearchServiceTest = new Search10.SearchServiceTest(m_TestCommon);
                Application["m_SearchServiceTest"] = m_SearchServiceTest;
            }

            if (Application[Base.AppVars.DOORSERVICE] != null)
            {
                m_DoorServiceTest = (Door12.DoorServiceTest)Application[Base.AppVars.DOORSERVICE];
            }
            else
            {
                m_DoorServiceTest = new Door12.DoorServiceTest(m_TestCommon);
                Application[Base.AppVars.DOORSERVICE] = m_DoorServiceTest;
            }

            if (Application[Base.AppVars.PACSSERVICE] != null)
            {
                m_PacsServiceTest = (PACS12.PACSServiceTest)Application[Base.AppVars.PACSSERVICE];
            }
            else
            {
                m_PacsServiceTest = new PACS12.PACSServiceTest(m_TestCommon);
                Application[Base.AppVars.PACSSERVICE] = m_PacsServiceTest;
            }

            if (Application[Base.AppVars.ADVSECSERVICE] != null)
            {
                m_AdvancedSecurityServiceTest = (AdvancedSecurity10.AdvancedSecurityServiceTest)Application[Base.AppVars.ADVSECSERVICE];
            }
            else
            {
                m_AdvancedSecurityServiceTest           = new AdvancedSecurity10.AdvancedSecurityServiceTest(m_TestCommon);
                Application[Base.AppVars.ADVSECSERVICE] = m_AdvancedSecurityServiceTest;
            }
            if (Application[Base.AppVars.MEDIA2SERVICE] != null)
            {
                m_Media2ServiceTest = (Media210.Media2ServiceTest)Application[Base.AppVars.MEDIA2SERVICE];
            }
            else
            {
                m_Media2ServiceTest = new Media210.Media2ServiceTest(m_TestCommon);
                Application[Base.AppVars.MEDIA2SERVICE] = m_Media2ServiceTest;
            }

            if (Application[Base.AppVars.EVENTPULLPOINTSERVICE] != null)
            {
                m_PullPointSubscriptionService2Test = (Events10.PullPointSubscriptionServiceTest)Application[Base.AppVars.EVENTPULLPOINTSERVICE];
            }
            else
            {
                m_PullPointSubscriptionService2Test             = new Events10.PullPointSubscriptionServiceTest(m_TestCommon);
                Application[Base.AppVars.EVENTPULLPOINTSERVICE] = m_PullPointSubscriptionService2Test;
            }

            if (Application[Base.AppVars.CREDENTIALSERVICE] != null)
            {
                m_CredentialServiceTest = (ServiceCredential10.CredentialServiceTest)Application[Base.AppVars.CREDENTIALSERVICE];
            }
            else
            {
                m_CredentialServiceTest = new ServiceCredential10.CredentialServiceTest(m_TestCommon);
                Application[Base.AppVars.CREDENTIALSERVICE] = m_CredentialServiceTest;
            }

            if (Application[Base.AppVars.ACCESSRULESSERVICE] != null)
            {
                m_AccessRulesServiceTest = (ServiceAccessRules10.AccessRulesServiceTest)Application[Base.AppVars.ACCESSRULESSERVICE];
            }
            else
            {
                m_AccessRulesServiceTest = new ServiceAccessRules10.AccessRulesServiceTest(m_TestCommon);
                Application[Base.AppVars.ACCESSRULESSERVICE] = m_AccessRulesServiceTest;
            }
            if (Application[Base.AppVars.SCHEDULESERVICE] != null)
            {
                m_ScheduleServiceTest = (ServiceSchedule10.ScheduleServiceTest)Application[Base.AppVars.SCHEDULESERVICE];
            }
            else
            {
                m_ScheduleServiceTest = new ServiceSchedule10.ScheduleServiceTest(m_TestCommon);
                Application[Base.AppVars.SCHEDULESERVICE] = m_ScheduleServiceTest;
            }
            if (Application[Base.AppVars.MEDIA2SVCSERVICE] != null)
            {
                m_Media2SVCServiceTest = (Media2SVC.Media2SVCServiceTest)Application[Base.AppVars.MEDIA2SVCSERVICE];
            }
            else
            {
                m_Media2SVCServiceTest = new Media2SVC.Media2SVCServiceTest(m_TestCommon);
                Application[Base.AppVars.MEDIA2SVCSERVICE] = m_Media2SVCServiceTest;
            }
            if (Application[Base.AppVars.ANALYTSERVICE] != null)
            {
                m_AnalyticsEngineServiceTest = (ServiceAnalytics20.AnalyticsEngineServiceTest)Application[Base.AppVars.ANALYTSERVICE];
            }
            else
            {
                m_AnalyticsEngineServiceTest            = new ServiceAnalytics20.AnalyticsEngineServiceTest(m_TestCommon);
                Application[Base.AppVars.ANALYTSERVICE] = m_AnalyticsEngineServiceTest;
            }
            if (Application[Base.AppVars.PROVISIONINGSERVICE] != null)
            {
                m_ProvisioningServiceTest = (Provisioning10.ProvisioningServiceTest)Application[Base.AppVars.PROVISIONINGSERVICE];
            }
            else
            {
                m_ProvisioningServiceTest = new Provisioning10.ProvisioningServiceTest(m_TestCommon);
                Application[Base.AppVars.PROVISIONINGSERVICE] = m_ProvisioningServiceTest;
            }
            if (Application[Base.AppVars.THERMALSERVICE] != null)
            {
                m_ThermalServiceTest = (Thermal10.ThermalServiceTest)Application[Base.AppVars.THERMALSERVICE];
            }
            else
            {
                m_ThermalServiceTest = new Thermal10.ThermalServiceTest(m_TestCommon);
                Application[Base.AppVars.THERMALSERVICE] = m_ThermalServiceTest;
            }
        }