开发者

Testing Network/Internet connection issues

What methods are there to test how well a C# desktop application handles various network/internet failures, and which, if any, fai开发者_如何学Golures it doesn't handle?

Thanks in advance.


Not an official test but still useful is the good old "yank the cat5e from the wall" test. You'd be surprised how many applications simply crash.


I recommend at least the following:

1) As Peter recommended, yank the cable. This should be done on both server and client machines.

2) A more subtle test is to yank the cable on an intermediate router, so both computers still "see" the cable is connected. This often results in a half-open connection.

3) Another test is to crash one side but leave the OS connected (e.g., Task Manager's End Process). This should also be done on both server and client machines.

These all test different errors and are pretty simple to do.

In addition, you could write an "error simulator" that acts like a badly-behaved client or server implementation. Have it try to send huge messages, or violate the protocol, or send data when it's not supposed to... There are many possibilities, depending on the protocol.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜