0

I am using Maven and the failsafe plugin to execute a set of runners that run integration tests.

One of these runners execute tests that involve altering my configuration. For this reason, I would like this runner to be executed only when the other tests have finished executing. Otherwise, there is the possibility of unrepresentative tests.

How can I go about this?

Ogen
  • 6,499
  • 7
  • 58
  • 124
  • Using an appropriate test framework which allows the definition of order like TestNG ? – khmarbaise Jun 20 '17 at 06:32
  • @khmarbaise So you're telling me that maven's test framework has no way of defining an order? – Ogen Jun 20 '17 at 08:34
  • Maven has no Test framework. You are using thing like JUnit or TestNG ...there is a limited way to define the order of tests (see [runOrder](https://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html#runOrder)) but I don't think that this will help you... – khmarbaise Jun 20 '17 at 08:45
  • @khmarbaise I'll look into the run order property it looks promising. – Ogen Jun 20 '17 at 09:04

1 Answers1

1

To expand on @khmarbaise comment, in Testng you have annotations that can help you set and reset config files http://testng.org/doc/documentation-main.html#annotations

Helgi
  • 94
  • 4