Skip to content

Commit

Permalink
doc: add a comprehensive example of a CucumberTest class (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
jak78 authored Feb 27, 2025
1 parent 051e42b commit f3330c5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,21 @@ public class CucumberTest {
By default, cucumber will look for `.feature` files in the same directory structure than the java runner. However, this
can be configured using the `features` property on the `@io.cucumber.junit.CucumberOptions` annotation. In addition, it
will also look for Java classes containing steps next to the runner and this can also be configured by using the `glues`
property on the same annotation.
property on the same annotation, as illustrated below:

```java
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = "pretty",
features = "classpath:features", // Locates your feature files in `src/test/resources/features`
glue = {
"com.yourcompany.yourproject.features", // Finds your custom steps definitions in this package
"com.decathlon.tzatziki.steps" // Finds Tzatziki steps definitions
},
tags = "not @ignore")
public class CucumberTest {
}
```

> Tip:
> Sometimes it can be hard to come up with the implementation steps...
Expand Down Expand Up @@ -263,4 +277,4 @@ This repository contains several libraries, each one having its own tutorial and
## Support

We welcome [contributions](/~https://github.com/Decathlon/tzatziki/tree/main/CONTRIBUTING.md), opinions, bug reports and
feature requests!
feature requests!

0 comments on commit f3330c5

Please sign in to comment.