Search code examples
automated-testsyamlintegration-testingdistributed-systemopentest

In OpenTest, how does one run tests across multiple actors using a single template that contains a dozen tests?


As it stands currently, we have a single template with a dozen tests underneath it. We have two actors, but the second actor never picks up any tests under the session using the template that was launched.

How should I structure my distributed testing to allow for the tests to be executed in parallel against the two actors?


Solution

  • As of version 1.1.4, test sessions execute sequentially, within one test session. The reason for that is to be deterministic about what happens when, so testers can make reliable assumptions about the execution flow. This is important because tests can have dependencies between them and must execute in a specific order for them to succeed. To be sure, this is a bad practice, but it's sometimes necessary for practical reasons.

    To execute tests in parallel, you must create two (or more) separate test sessions, so you must split your current session template in two. In the future, OpenTest will introduce an option that will allow one single test session to execute against multiple actors, but the default will still be executing the tests sequentially.