chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes

I would like to hear from you what you think about potential use of mocking frameworks when testing distributed systems that involve different AppDomains, threads, processes and even machines. Then we no longer talk about unit testing - these are clearly integration tests, but they may have similar needs in regards to object mocking.

Imagine you need to test a multi-tier system integrated with database and external components (Web services etc.) You need to examine how the system responds to various error states. Of course you can spend some time on writing stubs, but it would be so much easier just to configure imaginary mock server that would simulate behavior of certain objects.

Doing this in environment with multiple processes and machines is not something supported by available mocking frameworks. On the other hand it does not look so complicated to extend the framework to implement persistance and session-based mocking. I wonder if such features have been discussed or even considered.
asked by vagif (19.4k points)

2 Answers

0 votes
Hi Vagif,

Thanks for the elaborate explanation.

Although we're based in the testing world, we sometimes come across a situation where someone wants to extend Isolator's capabilities for system tests. The last request came as part of an integration with a BDD framework.

It's an interesting path, since there's an obvious need for faking different aspects of a system during integration test. This could be another product for us.

How do you run your system tests? What do you currently do?

answered by gilz (14.5k points)
0 votes
Hi Gil,

Our system tests more or less follow the scenario that I described. We deploy the system on a separate test machine(s) and our test engineers run their test cases, mainly from Web applications that are either parts of the system or developed specifically for system tests.

Often we need to validate that certain reponses of a low level component or external party will result in a proper message to a user. Then we need to simulate such response. What concerns me is that such simulation looks very much like our TypeMockified automated tests that we run every night using NUnit framework. So it feels like duplication of an effort: first simulate certain response using TypeMock in unit/integration tests, and then simulate the same response using some tricks and stubs. If we could base all our tests on a single framework, it would solve all our needs.
answered by vagif (19.4k points)