Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integration testing frameworks for testing a distributed system?

I have a distributed system with components spread across multiple boxes. They talk to each other using tcp or multicast. Each components interchanges messages with each other - these are basically data structures that get serialized.

What integration test frameworks do we have for testing systems like these? I am familiar with ruby so something ruby based would definitely help.

like image 647
Fanatic23 Avatar asked Aug 11 '12 20:08

Fanatic23


2 Answers

I suppose there are different ways of doing it. I try to avoid integration testing as much as I can but at some point is needed ofcourse. This is just a suggestion what I would do:

  1. Using a behavior driven approach define clearly the scenarios you want to test.
  2. Do unit testing(No integration), to the procedures that will represent the outputs of a module.
  3. Unit test the procedures that are supposed to use inputs from other modules, but by using mocks. Testing the logic of another module in the current.
  4. Perform smoke tests, this type of test will ensure that your modules can communicate between each other(This is a type of integration testing). I think smoke test is just enough integration testing. If you think about it: why would on module care about what other module does?(Lets leave each part do whatever they want, but only care about what how to communicate with them)

Personally I think that calling objects from one distributed module into another in test methods, is not a good practice. Yes that would be an integration test, but I think it is very easy reliable.

Always have in mind the pyramid of testing, remember that integration tests and end to end tests can be very expensive. So choose wisely when to use them:

enter image description here

I come from the Java world, this following is just some extra information that I think is also related to the topic and might be of your interest:

  • The Data Transfer Object pattern, is interesting
  • RMI vs EJB vs HTTP(Some interesting comment on differences between remote invocation technologies)
  • Spock a BDD framework for java developers.(If you perfectly understand the business rules then testing is a way easier)

Hope you find it useful.

like image 52
javing Avatar answered Sep 21 '22 11:09

javing


You can checkout Zopkio : https://github.com/linkedin/Zopkio. Its an open source framework for functional and performance testing of distributed systems.

like image 27
ap1234 Avatar answered Sep 21 '22 11:09

ap1234