Cucumber Steps not Found (Sometimes)

Answered

I have Cucumber JVM stuff that runs fine as part of my Maven build. When I try to run it using a Configuration from intelliJ it will often not find the Step Definitions. I've actually been able to debug through stuff so I think my configuration is correct. However, it will often not be able to find the Steps.

I haven't been able to determine what the key thing is that is making it work sometimes and not others.

My Steps are located under src/bdd/java and this folder shows up in the Module Configuration as a "Test Source Folder". The package name is correct as is the same as what I use in my Maven build.

Here is my configuration:

Main Class: cucumber.api.cli.Main

Glue: company/xxx/yyy/bdd

Feature or folder path: my/features

VM Options:

Program arguments --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome

Working directory: my/module

Use classpath of module: myModule

 

I receive the following type of message for all of the Steps:

Undefined step: Given  I create a locator as "versioning-locator" with search path folders:

 

 

 

2 comments

Please submit a bug at https://youtrack.jetbrains.com/issues/IDEA and attach a sample project to reproduce this problem. Also specify your IDEA version.

0

I have been able to recreate this with a fairly simple setup and in doing so I discovered something.

In Maven's maven-failsafe-plugin I am able to set <testClassesDirectory>${bddOutputDirectory}</testClassesDirectory>. Is there a place for me to tell intellij to use a specific classes directory.  The "bddOutputDirectory" is where my compiled Steps go.

0

Please sign in to leave a comment.