IntelliJ Idea + cucumber run configuration: how to exclude @tags

Alexander.Iljushkin picture Alexander.Iljushkin · Nov 18, 2011 · Viewed 7.2k times · Source

Good news everyone.

I don't know how to exclude several tags within my run configuration for Cucumber project.

For instance, i have three tests.

@debug
Scenario outline: foo 1
When step
Then step

@obsolete
Scenario outline: foo 2
When step
Then step

@stable
Scenario outline: foo 3
When step
Then step

I put ~@debug,~@obsolete to the textbox called «Tags Filter» of the «Run configuration» dialog window.

But there's something wrong because when I start my tests — foo 1, foo 2 and foo 3 are starting anyways.

Answer

Luca Pucacco picture Luca Pucacco · Apr 28, 2015

I have found the answer to this question within a comment to another stackoverflow question: https://stackoverflow.com/a/23743258.

Basically to add several tags to IntelliJ you need to add -Dcucumber.options="--tags ~@debug --tags ~@obsolete" to the VM options in the default cucumber settings.