0

I am trying to run multiple feature files through maven goal(command line) but after 2 feature files that run successfully, the other feature files (3rd one onwards) fails in some test cases which when ran independently passes all the test cases.

So f I run each feature file individually I get proper results but running them all together gives wrong results.

We are using serenity framework with cucumber jvm. Please help how can we resolve this issue.

RV_Dev
  • 435
  • 1
  • 7
  • 21
  • It is very hard to assess the situation without having more details. What kind of errors are you experiencing? Are they consistent? Are you scenarios coupled and depend on each other in some way? – Eugene S Aug 17 '16 at 01:04

1 Answers1

1

Your failing tests fail to fully setup the context. Some state is leaking from the previous ones. Look for what has changed during the first runs (database/mocks/whatever state) that has to be reset before running the third and following.

Mykola Gurov
  • 8,517
  • 4
  • 29
  • 27