Exemplo n.º 1
0
 public void Dispose()
 {
     if (_app != null)
     {
         _app.Close();
     }
 }
Exemplo n.º 2
0
 public void TestCleanup()
 {
     if (testContextInstance.CurrentTestOutcome != UnitTestOutcome.Passed)
     {
         testApp.Close();
     }
 }
Exemplo n.º 3
0
 public void TestCleanup()
 {
     // If test failed, then close the app. The next test will restart it
     if (testContextInstance.CurrentTestOutcome != UnitTestOutcome.Passed)
     {
         testApp.Close();
     }
 }
Exemplo n.º 4
0
        public static void ClassCleanup()
        {
            // Close the app after all tests are finished
            Playback.Initialize();
            try
            {
                Process[] processes = Process.GetProcessesByName(TestProcess);

                foreach (Process process in processes)
                {
                    ApplicationUnderTest app = ApplicationUnderTest.FromProcess(process);
                    app.Close();
                }
            }
            finally
            {
                Playback.Cleanup();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 关闭测试用的UI进程
        /// </summary>
        public void CloseApp(ApplicationUnderTest app)
        {
            try
            {
                app.Close();
            }
            catch
            {

            }
            if (!app.WaitForControlNotExist(5000))
            {
                try
                {
                    app.Process.Kill();
                }
                catch
                {

                }
            }
        }
        /// <summary>
        /// Dispose the dependent objects of data import job
        /// </summary>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                Playback.PlaybackError -= OnPlaybackError;

                if (!ReuseExistingApplicationUnderTest)
                {
                    if (_applicationUnderTest != null)
                    {
                        _applicationUnderTest.Close();
                        _applicationUnderTest.Dispose();
                    }
                    else if (ApplicationUnderTestProcess != null)
                    {
                        ApplicationUnderTestProcess.CloseAllInstances();
                    }
                }

                _applicationUnderTest       = null;
                ApplicationUnderTestProcess = null;
            }
        }
 /// <summary>
 /// Cleans up.
 /// </summary>
 public static void CleanUp()
 {
     _cache.Clear();
     _root = null;
     _aut.Close();
 }
Exemplo n.º 8
0
 public void MyTestCleanup()
 {
     App.Close();
 }
Exemplo n.º 9
0
 public void MyTestCleanup()
 {
     _uut.Close();
 }
Exemplo n.º 10
0
 public void MyTestCleanup()
 {
     // To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items.
     _app.Close();
 }
Exemplo n.º 11
0
 public void MyTestCleanup()
 {
     appToTest.Close();
 }
Exemplo n.º 12
0
 public void MyTestCleanup()
 {
     test.Close();
 }
Exemplo n.º 13
0
 public void AfterScenario()
 {
     //TODO: implement logic that has to run after executing each scenario
     _app.Close();
 }
Exemplo n.º 14
0
 public void MyTestCleanup()
 {
     calc_.Close();
 }