Run a test that disconnects Internet on MTM without effecting MTM

126 Views Asked by At

I'm supposed to test the reaction of a page when net is disconnected while on the page. (errors get thrown). My Method does the following - the page loads, i disconnect net, verify if the right actions take place and then connect the net back up and continue the next set of actions. This method is a part of an ordered test.

I have the code that makes this possible, and works as expected while running the test on Visual Studio (VS 2013).

I tried this in two ways using C# (Coded UI) - by disconnecting the LAN(bad option) and by disconnecting the WAN(by disabling the DNS which poses an issue since MTM tries to connect with my system, but fails since theres no DNS). Both of these are not really helpful while i try to run my ordered test on MTM.

When I try and run the ordered test on MTM, it just does not work! I get the errors 'Your Team Foundation Server is currently unavailable' or 'An error occurred while communicating with Agent'.

The destination for the test run is my own system.

Is there anyway i could disconnect the internet AND not affect MTM while this happens ?

Any ideas/alternate solutions will be much appreciated !!

Thanks!

0

There are 0 best solutions below