Configure template for StepDefintions and Actionwords separately


I am currently working with cucumber-java, and I’ve been trying to modify the handlebar actionwords.hbs to produce a customized StepDefinitions file, but it appears that modifying the actionwords.hbs and overriding the templates makes the resulting to be an exact copy of

So my concern here is, how to do I propery override the templates of both files separately from one another?


Hi Federico,

It is possible to handle this use case by using a folder structure in your templates folder. You can have a look at this Github project for example using this:

In your case, you would have something like:

  - java
    - actionword.hbs   # Override "real" action words
  - cucumber
    - java
      - actionword.hbs # Override step definitions generation

Best regards,