Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong message when runner on a non existing tag on feature #245

Closed
jeremyGoupil opened this issue Mar 8, 2012 · 5 comments
Closed

Wrong message when runner on a non existing tag on feature #245

jeremyGoupil opened this issue Mar 8, 2012 · 5 comments

Comments

@jeremyGoupil
Copy link

Hello,

When we want to run this:

@RunWith(Cucumber.class)
@Feature(value = "features/", tags = "@titi")
public class CucumberWIPRunner {
}

And the Tag "@TiTi" is not defined in any feature.

We have this misleading exception :

cucumber.runtime.CucumberException: No features found at [features/]
    at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:39)
    at cucumber.junit.Cucumber.addChildren(Cucumber.java:142)
    at cucumber.junit.Cucumber.<init>(Cucumber.java:60)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    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:38)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

It would have been more clear to display a message like this : "Tag'@TiTi' not found in any Feature !"

What do you reckon?

@gphilipp
Copy link
Contributor

gphilipp commented Mar 8, 2012

Yeah that would be helpful indeed. Can you fork the repo, add the code and submit a pull request Jeremy ?

@TiTi
Copy link

TiTi commented Mar 8, 2012

I have absolutely no idea why I'm receiving a notification for this thread because I'm not watching this repository.
Well the only thing is my pseudo, using the exact same case...
But this is weird.
It seems I've been added to the cucumber mailing-list in some way....
Sorry guys, I don't know anything about this (yet) !

@gphilipp
Copy link
Contributor

gphilipp commented Mar 8, 2012

That's a coincidence the original poster was talking about a custom
java annotation @TiTi which also happen to be a twitter-like shortcut
to your account :-)

@jeremyGoupil
Copy link
Author

Ok it's done.

@lock
Copy link

lock bot commented Oct 25, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants