Open elbaih101 opened 4 months ago
How are you selecting the rule?
iam clicking on the run icon
thats wehn i click on it without any tags
and thats with tag
but it doesnt run
no steps are run at all
IF i run it through the runners class it runs no proplem but this makes depugging hard for me
thanks is there anything Iam supposed to do now or just wait
The problem is a bit complicated.
--name
filter when targeting a rule with an annotation.The third one will be fixed by https://github.com/cucumber/cucumber-jvm/pull/2884. And once released, IDEA will have to fix this the first two one their end. I'll create the feature request for that, because I also want them to make it possible to select examples.
edit:
Once created, I suppose you could upvote the request, and get other people to upvote it too. JetBrains isn't very quick with feature requests otherwise. :laughing:
The problem is a bit complicated.
- IDEA selects the whole feature to run when targeting a rule.
- IDEA uses the
--name
filter when targeting a rule with an annotation.- Cucumber does not support selecting rules (or examples) by line number.
The third one will be fixed by #2884. And once released, IDEA will have to fix this the first two one their end. I'll create the feature request for that, because I also want them to make it possible to select examples.
edit:
Once created, I suppose you could upvote the request, and get other people to upvote it too. JetBrains isn't very quick with feature requests otherwise. š
of course iam willing to do this once u create it
I think that won't be very helpful, you've left out the information needed for Intelij to fix the issue. And without the fix being released in Cucumber, they won't be able to implement anything just yet.
I think that won't be very helpful, you've left out the information needed for Intelij to fix the issue. And without the fix being released in Cucumber, they won't be able to implement anything just yet.
sorry i will close it then wait for u iam being Impatient
I think that won't be very helpful, you've left out the information needed for Intelij to fix the issue. And without the fix being released in Cucumber, they won't be able to implement anything just yet.
sorry i will close it then wait for u iam being Impatient
seems i cant delete it sorry for the inconvenience
No worries.
How did you get these markers from your screenshot?
I don't get these. I only get them for Features, Rules, Scenarios and Scenario Outlines.
I am using cucumber + plugin but it's not perfect
is there any update on the ticket u said will submit for JetBrains Sorry for the comment after so long but i just wanted to check
So I made https://youtrack.jetbrains.com/issue/IDEA-353691 and that's where we are at right now.
The problem is a bit more complicated than I thought. For IDEA it is important that their selections are stable, which line numbers aren't. So while selecting by line number works well for rerunning failed scenarios, it not great when users may change the file and the line numbers.
I have thought about extending --name
to match against scenario and example names, but I'm a little weary here. The option takes a regular expression as an argument, and extending what the expression might would be a breaking change. Which means it would have to be delayed for the next major version.
And for the next major version I would like to standardize on the JUnit Platform. Which would allow IDEA to select rules, scenarios and examples programmatically making the whole problem moot. But that is a long way of and gated behind a few other big projects.
That said, if you are really interested in this feature you could look into expanding the NamePredicate
to work like the LinePredicate
. If gated behind a feature toggle I reckon we can avoid unwanted breaking changes. I would be happy to accept a pull request for that.
Personally, I don't think it is worth the effort thought. IDEA seems to be extremely slow to respond to issues, so it is unlikely they'll ever use --name
with a rule name.
That said, if you are really interested in this feature you could look into expanding the
NamePredicate
to work like theLinePredicate
. If gated behind a feature toggle I reckon we can avoid unwanted breaking changes. I would be happy to accept a pull request for that.Personally, I don't think it is worth the effort thought. IDEA seems to be extremely slow to respond to issues, so it is unlikely they'll ever use
--name
with a rule name.
i don't think i have the knowledge or the skills to do so perhaps i will wait
thanks for your effort
i don't think i have the knowledge or the skills to do so perhaps i will wait
If you want to try, I'm happy to give you some pointers when you get stuck. Hop on the discord.
š What did you see?
running rules from the feature file causes the whole feature file to be run if the rule has no tag on it
ā What did you expect to see?
the rule used to run even if their were no tag on it
š¦ Which tool/library version are you using?
Java Cucumber 7.17.0
š¬ How could we reproduce it?
create a feature file containing a rule then try to run the rule
š Any additional context?