1

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!

Anu7
  • 77
  • 1
  • 17
  • Are you working at driver-level to detect disconnects or only based on timeouts? What protocol are you using for your connections? – toadflakz Feb 11 '16 at 08:56
  • Are you asking about MTM's verification of disconnects ? – Anu7 Feb 11 '16 at 09:06
  • No, your code's verification of disconnects. – toadflakz Feb 11 '16 at 09:13
  • I'm using WebClient class and its method OpenRead to verify if net is connected. Once its verified that there is net available, i go ahead and disconnect the net (ive tried both WAN/ LAN seperately), then i do some stuff and then connect back the LAN/WAN. The code is somewhat similar to this: http://stackoverflow.com/questions/209779/how-can-you-change-network-settings-ip-address-dns-wins-host-name-with-code – Anu7 Feb 11 '16 at 09:20

0 Answers0