

The fourth line, Scenario: Sunday is not Friday is a Cucumber does notĮxecute this line because it’s documentation. The second line is a brief description of the feature. It’s a good idea to use a name similar to the file name. The first line of this file starts with the keyword Feature: followed by a name. With the following content: Feature: Is it Friday yet? Src/test/resources/hellocucumber/is_it_friday_yet.feature src/test/resources/hellocucumber/is_it_friday_yet.feature features/is_it_friday_yet.feature features/is_it_friday_yet.feature One concrete example would be that Sunday isn’t Friday. Src/test/resources/hellocucumber features features In Cucumber, an example is called a scenario. Try running an Example Mapping workshop in your team to Finally, delete the StepDefinitions.java class (or even the java directory).Copy the import statements from StepDefinitions.java to StepDefs.kt you’ll need them later.Create a Kotlin class called StepDefs inside the hellocucumber package.Now you can delete the RunCucumberTest.java class.Your RunCucumberTest.kt class should now look like this: package hellocucumber Otherwise, you’ll have to write your own.
#Good notes 5 tutorial code#
If you are using IntelliJ IDEA, it will offer to translate the Java code to Kotlin code.

You should get something like the following result: Project created from Archetype in dir: /cucumber "-DarchetypeArtifactId=cucumber-archetype" \ Open a terminal, go to the directory where you want to create your project,Īnd run the following command: mvn archetype:generate \ We’ll start by creating a new project directory with the cucumber-archetype
