Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 919
Alexander.Iljushkin Avatar asked Dec 05 '22 19:12

Alexander.Iljushkin


2 Answers

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.

like image 128
Luca Pucacco Avatar answered Jan 22 '23 18:01

Luca Pucacco


For IntelliJ: Add below to the VM options by editing configuration

-Dcucumber.options="--tags @debug"
like image 37
Glennular Avatar answered Jan 22 '23 19:01

Glennular