Cucumber-JVM+TestNG vs Cucumber-JVM+JUNIT. Which to choose ?

From the beginning, I chose Cucumber-JVM 1.2.5 from info.cukes combined with Junit. The 1.2.5 is  the latest version for Cucumber-JVM 1.x.

As Cucumber-JVM has been developed to new release: Cucumber-JVM 2.0 in 2017, Cucumber-JVM 3.0 in 2018, and the latest 4.0 in 2019. I decided to change to use the latest version v4.0 for my framework and use TestNG instead of Junit. So why I moved to Cucumber-JVM V4 + TestNG?

  1. Cucumber-JVM + TestNG support all TestNG annotations such as BeforeClass, BeforeSuite, BeforeTest, BeforeStep, BeforeGroup while as Cucumber-JVM + Junit only support Junit annotation like BeforeClass.
  2. Cucumber – TestNg provides Parallel Execution at Scenario Level where as Junit provides at Feature level.

Leave a comment