Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Conflict with Specs2 when ignoring @RunWith tests #30

Closed
richdougherty opened this Issue · 5 comments

2 participants

@richdougherty

In Play we have a problem with Specs2 tests not being picked up by SBT. Whether tests pass or fail, SBT reports that no tests were run:

[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[success] Total time: 8 s, completed 22/10/2013 6:08:09 PM

I created a small SBT application, captured in this gist, that reproduces the problem. The problem occurs when all three of the following are present:

  • tests are forked
  • the specs2 test has @RunWith(classOf[JUnitRunner])
  • the JUnit interface is given the argument --ignore-runners=org.specs2.runner.JUnitRunner

We can work around the problem by changing the order of testFrameworks so that Specs2 runs before JUnit. This is our solution for now.

But this solution is fragile and it would be great to fix the underlying problem. I've talked with @harrah, and he thinks that the underlying issue is in junit-interface, probably the same issue as reported in #21.

@benmccann
Owner

I test the gist that @richdougherty posted above. It's still broken with junit-interface 0.11-RC1. However, if you upgrade to SBT 0.13.6-M1 then it works. I'm guessing this is because of @pvlugter's fix. @jsuereth @eed3si9n this is probably another one where we should add a scripted test using the gist above and 0.13.6-M1 and then I think we can mark this as fixed

@benmccann
Owner

This can be closed now. A scripted test which tests this was committed. It works with SBT 0.13.6 as stated above (see #58)

@richdougherty

Awesome. :+1:

@benmccann
Owner

Thanks @richdougherty . Do you mind closing #14 and #21 as well since they were solved by the same fix?

@richdougherty

Closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.