コード例 #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_PACSServiceTest"] != null)
            {
                m_PACSServiceTest = (PACSServiceTest)Application["m_PACSServiceTest"];
            }
            else
            {
                m_PACSServiceTest = new PACSServiceTest(m_TestCommon);
                Application["m_PACSServiceTest"] = m_PACSServiceTest;
            }
        }