question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

runtime exception when running a cucumber tests with annotation containing multiple tags

See original GitHub issue

@when Trying to run my cucumber test with multiple tags in @cucumber.options annotation, like…

                   @RunWith(Cucumber.class)
                   @Cucumber.Options(tags = {"@reg","@temp"})

@then I am getting the below exception. But test running fine when run with any single tag like-> tags = {“@reg”}


cucumber.runtime.CucumberException: None of the features at [classpath:] matched the filters: [@reg, @temp] at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:45) at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:98) at cucumber.junit.Cucumber.<init>(Cucumber.java:61) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:43) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Thanks, Phani Kaliginadi

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
aslakhellesoycommented, Sep 28, 2012

Do this:

@Cucumber.Options(tags = {"@reg,@temp"})

See https://github.com/cucumber/cucumber/wiki/Tags

0reactions
lock[bot]commented, Jun 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cucumber Tags - Tools QA
Running Cucumber Tests with Cucumber Tags. How to skip tests in group execution. How to ignore or skipping Cucumber Tests Logically ANDing ...
Read more >
Cucumber exception when run the test - Stack Overflow
I can't run my tests on the cucumber. Returns the following error: cucumber.runtime.CucumberException: Classes annotated with @RunWith(Cucumber.
Read more >
Cucumber Reference - Cucumber Documentation
Cucumber can be used to implement automated tests based on scenarios described in ... You can tell Cucumber to only run scenarios with...
Read more >
Passing multiple tags through @CucumberOptions is ...
But got this error. I am using Cucumber version 5.7.0. How can i run multiple tags now? import org.junit.runner.RunWith; ...
Read more >
How to Get the Most Out of Cucumber Tags - Coveros
Including these tags utilizes Cucumber's built in feature for narrowing down tests, and if the Java code can also be setup to switch ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found