0

I am using build deploy test workflow to execute testcases on Lab environment-CodedUI. Browser IE instance remains open after test execution is over.

I am thinking if I can add something to my build workflow, which send instructions on test agent machine to close that browser instance. Is that possible?

I execute testcases in bunch. No testcase close the browser instance. They work on same browser instance to save login time. Hence I want to close browser once execution is over

Regards, Gbhavsar

user3484831
  • 107
  • 1
  • 1
  • 7
  • I think you need to handle that in your CodedUI test method. There is no in-build mechanism to do that. – digitguy Jun 12 '15 at 10:39
  • I suppose you are using VS/MTM 2010, so just for your information: starting with VS/MTM 2012 browser is closed automatically after each test. So if you want this behaviour and can update to 2012, that would be the easiest way for you. – Elena Jun 17 '15 at 10:54
  • you can add a .bat file that will close the IE process oce the tests have finished running – barakcaf Jun 23 '15 at 12:55

1 Answers1

0

You can use the inbuilt functionality of settings

browserInstance.CloseOnPlaybackCleanup = true

or use a custom .bat file to close/kill all open IE/Chrome/FireFox processes in your post test script.

See https://blogs.msdn.microsoft.com/visualstudioalm/2012/11/08/coded-ui-test-why-does-application-close-after-each-test-in-visual-studio-2012/

allen
  • 4,627
  • 1
  • 22
  • 33