Custom run configuration from context


I am using Cucumber to define test scenarios in my project, but due to the way my project is set up, the default behavior of creating a run configuration from context (through right-clicking a scenario and choosing the "Run" or "Create" options) does not work for me. Instead, it chooses the wrong glue code. I have a set of Gradle tasks configured which correctly select the right glue code based on the task, so what I'd like is one of two things:

1. The ability to modify the behavior of the "Run" context menu option so that it executes the correct Gradle task based on the file path and line number being right-clicked-on.


2. The ability to equivalently configure the Cucumber glue code value based on the file path.

Note that I'm already able to choose the "create" option and then modify the values in the fields to do what I need to do, but this is very cumbersome, and I'd like to just be able to configure how IntelliJ behaves in this regard instead. How can I do this?

1 comment
Comment actions Permalink

At the moment it would be possible only via a custom plugin. Feature request with the use case and a sample project is welcome at


Please sign in to leave a comment.