<p>Besides "no connection", what other failure modes should I test for?  How do I simulate a high-latency link, an unreliable link, or all the other sorts of crazy stuff that will undoubtedly happen "in the wild"?  </p>

<p>How about wireless applications? How do I test the performance in a less-than-ideal WL environment?</p>

[{'answer_id': 23367, 'author': 'TimK', 'author_id': 2348, 'author_profile': 'https://Stackoverflow.com/users/2348', 'pm_score': 0, 'selected': False, 'text': '<p>You definitely want to test physically pulling the cable out.  Lots of networking code will throw different exceptions in that scenario vs when the connection has just been lost.</p>\n'}, {'answer_id': 23368, 'author': 'thelsdj', 'author_id': 163, 'author_profile': 'https://Stackoverflow.com/users/163', 'pm_score': 0, 'selected': False, 'text': "<p>To add to TimK's answer, if you have a router, test pulling the upstream link on the router, this will test a bad connection without your system knowing that you lost the physical link.</p>\n"}, {'answer_id': 23396, 'author': 'Michał Piaskowski', 'author_id': 1534, 'author_profile': 'https://Stackoverflow.com/users/1534', 'pm_score': 1, 'selected': False, 'text': "<blockquote>\n  <p>To add to TimK's answer, if you have a router, test pulling the upstream link on the router, this will test a bad connection without your system knowing that you lost the physical link.</p>\n</blockquote>\n\n<p>Also if you plug it back in after a few seconds it's possible that the connection won't be lost*. This can simulate a very high latency.</p>\n\n<p>*this depends on your ISP and your router. </p>\n"}, {'answer_id': 23491, 'author': 'Nick', 'author_id': 1490, 'author_profile': 'https://Stackoverflow.com/users/1490', 'pm_score': 0, 'selected': False, 'text': "<p>Our network/server closet is a spaghetti-mess of wires; I'm not going to walk in there and start unplugging stuff lest I hit something mission-critical.  (At least I have access to it; I'm sure many readers don't even know where their routers are.)  Similarly, both ends of the ethernet cable require a hands-and-knees adventure to reach.</p>\n\n<p>I tested enabling/disabling the network adapter, and I'm going to test from my cable internet connection from home as well.  Also, I had the idea of installing Tor to create a high latency connection.</p>\n\n<p>For wireless connections, I have a metal box to test what happens when the signal dies, but I notice that network connection behavior is very different depending on how I test:</p>\n\n<ul>\n<li>put the transmitter/reciever in a metal box</li>\n<li>go stand next to the microwave in the kitchen and turn it on</li>\n<li>go stand in a little closet which has concrete walls</li>\n</ul>\n"}, {'answer_id': 36708, 'author': 'asussex', 'author_id': 3796, 'author_profile': 'https://Stackoverflow.com/users/3796', 'pm_score': 1, 'selected': False, 'text': '<p>If you\'re using Linux, try <a href="http://vde.sourceforge.net/" rel="nofollow noreferrer">Virtual Distributed Ethermet</a> (VDE).</p>\n\n<p>VDE gives you virtualised switches/hubs and Ethernet cables. You can tune network characteristics such as latency, delay, MTU, errored bits per MB, bandwidth, duplicates, etc on individual cables - all in real time!</p>\n'}]
['https://Stackoverflow.com/questions/23205', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1490/']