1

How can I continue running a feature on failure of 1 scenario to next?

Currently if first Scenario fails out of 10 (lets say) next 9 will not execute and it quits current session on driver/browser (WebDriver).

I am using Cucumber with Java, Junit, Serenity on Windows 7.

paul
  • 4,333
  • 16
  • 71
  • 144
  • Is the failure due to an assertion error or some other exception? When it is assertion error then the next in order scenarios will be executed. – Grasshopper Feb 15 '19 at 07:55
  • It is an assertion error. But didnt execute next scenario in feature file. – paul Feb 17 '19 at 09:42
  • Do u have any code possibly in the after hook which closes the driver etc on failure? – Grasshopper Feb 17 '19 at 12:12
  • No, I don't have anything as such. Its a baby project, after creating the serenity from maven command line, I only added 1 feature file. Rest everything is pre-configured. – paul Feb 17 '19 at 15:02
  • Can you provide your feature file and code? – Marit Mar 12 '19 at 10:31

1 Answers1

0

After updating all dependencies, plugins in pom.xml to their latest versions, fixed the issue.

Specially -

maven-surefire-plugin, maven-failsafe-plugin, maven-compiler-plugin

paul
  • 4,333
  • 16
  • 71
  • 144