Re: [Cucumber] Running cucumber-jvm tests as JUnit in Eclipse

1,362 views
Skip to first unread message

aslak hellesoy

unread,
Jul 25, 2012, 5:53:55 PM7/25/12
to cu...@googlegroups.com
On Wed, Jul 25, 2012 at 10:42 PM, John Goodsen <jgoo...@radsoft.com> wrote:
> I use IntelliJ with cucumber-jvm and it works like a charm. Now I'm trying
> to help a developer run them in Eclipse (actually IBM RAD 8) and when we
> right-click on my test runner class, Eclipse does not recognize the class as
> a JUnit test, so we don't get a RunAs -> JUnit test option in the menu.
> Does anybody have any ideas? Here's the runner class we're using:
>

My guess is that the Eclipse JUnit plugin doesn't understand that the
class can be run with JUnit. I'd consider that a bug in the plugin.

Try to track down the people behind it and let them know!

Aslak

> @RunWith(Cucumber.class)
> @Cucumber.Options(tags = { "~@WIP" }, format = {"pretty",
> "html:target/cucumber-html-report",
> "json-pretty:target/cucumber-report.json"})
> public class RunAllTests {
> }
>
> --
> -- Rules --
>
> 1) Please prefix the subject with [Ruby], [JVM] or [JS].
> 2) Please use interleaved answers
> http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
> 3) If you have a question, don't reply to an existing message. Start a new
> topic instead.
>
> You received this message because you are subscribed to the Google Groups
> Cukes group. To post to this group, send email to cu...@googlegroups.com. To
> unsubscribe from this group, send email to
> cukes+un...@googlegroups.com. For more options, visit this group at
> https://groups.google.com/d/forum/cukes?hl=en
>
>

Matthew

unread,
Jul 25, 2012, 8:55:13 PM7/25/12
to cu...@googlegroups.com
> cukes+unsubscribe@googlegroups.com. For more options, visit this group at
> https://groups.google.com/d/forum/cukes?hl=en
>
>

We use Eclipse here - both actual Eclipse and STS, and it seems quite happy treating them as JUnit runnable classes.  So possibly its a RAD 8 thing?  I wonder if you could just set up a JUnit runner to run the class anyway maybe?

Cheers,

Matt 

Paolo Ambrosio

unread,
Jul 26, 2012, 1:58:38 AM7/26/12
to cu...@googlegroups.com
On Thu, Jul 26, 2012 at 2:55 AM, Matthew <matthew....@equinox.co.nz> wrote:

> We use Eclipse here - both actual Eclipse and STS, and it seems quite happy
> treating them as JUnit runnable classes. So possibly its a RAD 8 thing? [...]

No problems here with Eclipse (3.7) as well: it displays the "Run as
-> JUnit Test" menu as per usual.

--
Paolo

Javix

unread,
Jul 26, 2012, 7:31:33 AM7/26/12
to cu...@googlegroups.com
No problem with Eclipse Gallileo -  Eclipse Java EE IDE for Web Developers either..

Build id: 20100218-1602

It works fine both with

mvn test

and a right click on a runner class => Run as JUnit test.


Le mercredi 25 juillet 2012 23:42:11 UTC+2, John Goodsen a écrit :
I use IntelliJ with cucumber-jvm and it works like a charm.  Now I'm trying to help a developer run them in Eclipse (actually IBM RAD 8) and when we right-click on my test runner class, Eclipse does not recognize the class as a JUnit test, so we don't get a RunAs -> JUnit test option in the menu.  Does anybody have any ideas?  Here's the runner class we're using:

Reply all
Reply to author
Forward
0 new messages