0

Say I have a backend server for my MVVM website, which needs to communicate with a data processing server. If one server goes down, the other is supposed to know how to handle that (save the files it wants to transfer, and wait until the server comes back online, for example). However, I'm obviously not going to just trust that it works; I need some sort of regression testing.

Is there any way to imitate server failure/downtime, preferably without introducing any serious security issues?

I was thinking maybe a proxy between the two servers that could be manipulated to imitate downtime or communication errors. But I wouldn't know where to start with that.

  • How about using taskmanager to kill the process in question (Windows) or `pkill -9 ` for linux based? – Tseng Jan 14 '16 at 09:15
  • I've been doing that, but the issue is in finding a solution that can be automated and included in our regression test suite – Fallen Asleep Jan 14 '16 at 16:32
  • Hard to say without knowing your implementation, but you usually shouldn't even need physical servers run for this test as you only want to test your service or repository, you should just mock your interface and setup your mockup in a way that it will fail on first connection (when trying to connect to server A) and return true when connect on other, then you test if and how often the connect method is called. If the first is coded to fail, the number of calls should be 2 – Tseng Jan 14 '16 at 17:52

0 Answers0