Site Loader
Auckland, New Zealand

Cucumber 4 one of the most prominent BDD tool in Java and many other language binding, and with cucumber 4 there are several new features, some quality of life improvements and major internal refactorings happened. At the same time there are many breaking changes in the code happened as well if you are using Cukes 1.2.5 version (which was released way back on 2016)

Quick Changes to your code

If you are using Cukes 1.2.5 version and would like to use cucumber-JVM 4 latest version, then first and foremost thing you will start with is from pom.xml file with following changes along with its dependent libraries such as TestNG and JUnit

Cukes 1.2.5 vs Cucumber 4.7.2

Next up

You will need to import the following libraries in the code in the place of your existing imports

Breaking changes

And there are few breaking changes in the code such as

  • DataTable
  • @BeforeStep hooks
  • @AfterStep hooks
  • @cucumberoptions

Complete Video demo

Complete video demo of the above code and discussion

Once again, thank you very much for watching the video and reading the article, if you are interested in the complete video series, please check it out from here

Post Author: Karthik kk

Leave a Reply

Your email address will not be published. Required fields are marked *