I am trying to run my test automation with mvn commands. When I run all features or run features one by one, my match/assert conditions work perfectly fine; however, when I try to use mvn test command, my automation features give unexpected errors from my API's. I have defined before (callonce function) and after (hooks) scenario and feature conditions in all features' background parts.
mvn clean test mvn test
mvn clean works fine with no problems. mvn test gives me unexpected errors like the order of API calls inside a scenario or between features are getting all mixed up.
Appreciate your help.
As I guessed, in the TestRunner class, we give automation a thread count. When I decreased it to 1, the tests started working correctly in order. Not randomly.
It solved my problem. However, I need to learn a more educated way.
Appreciate your comments on this solution!