I'm running tests using RubyMine (forced upon me).
I have some features that use the Scenario Outline and Example format.
Is there a way I can run only a certain row from the Example table?
Example:
Examples:
| user_row | row1 | row2 |
| 1 | 2 | 4 |
| 51 | 51 | 97 |
| 98 | 98 | 147 |
I only want to run the test from the 2nd row (user_row 51).
I can't seem to find anything with the help in RubyMine for this.
Cucumber itself does support running a single example. RubyMine doesn't support it in a nice way, but you can do it with a little extra effort.
To run a single Cucumber example from the command line:
where ## is the line number (over the entire file, not just within the example table) of the example that you want to run.
Disappointingly, RubyMine's Cucumber runner doesn't allow you to run a single line of a Cucumber example: invoking the "Run context configuration" command (control-shift-R in the Mac keymap I'm using) on an example row runs the whole file (it doesn't even just run that scenario), and there's no way to add a line number to a Cucumber run configuration (if you add it to the end of the file name you get an error).
However, you can manually create a generic run configuration which runs a single example:
Someone has already filed a request for this feature to be explicitly supported with JetBrains which you can vote for.