Integration testing frameworks for testing a distributed system?

前端 未结 4 844
野趣味
野趣味 2021-02-04 08:41

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 -

相关标签:
4条回答
  • 2021-02-04 09:19

    You can use STAF/STAX it has good capabilities/services for distributed testing scenarios like Client-Server, SAN etc. etc. Also there is one more Framework named Twister by Luxoft. This one is also brilliant.

    0 讨论(0)
  • 2021-02-04 09:26

    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.

    0 讨论(0)
  • 2021-02-04 09:26

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

    0 讨论(0)
  • 2021-02-04 09:36

    I'll give my answer for what we are doing with a distributed system written in Java. We have multiple linux daemons that are really wrappers around java programs that communicate with one another mainly through a database. So they don't send serialized messages back and forth. We use dbunit and spring-test for integration testing. With dbunit you basically load data, run your System Under Test(SUT) and then verify the database is in the correct state. spring-test makes it easy for spring based apps to load the application context while testing.

    If you don't have a java based app then this might not be that useful. The framework selections are going to largely depend on your technology choices and architecture.

    0 讨论(0)
提交回复
热议问题