How to get Eclipse to jump to failed JUnit test when test is not a Java method
I've got a nive bridge that allows me to run JBehave tests through JUnit with deeper integration than out of the box from JBehave - my JUnit hierarchy now shows each story file and the scenarios under it so you can see which scenarios have failed. This is all working well, except that you can't double-click on a failed sceanrio in Eclipse and get it to jump to the relevant line in the story file.
The JUnit Description class is designed around tests being Java meth开发者_如何学Pythonods, but I was wondering if there was some cunning way of indicating the location to make this work (e.g. in the annotations list).
Thanks.
I think most Java IDEs actually react to the message or stack trace given when a JUnit test fails. For example in IntelliJ, failure lines are highlighted and clickable so long as they have SomeFileTheIDEKnows.java:123
.
Can you get a stack trace or failure message to show that when a JUnit test fails?
精彩评论