running jukito with multiple test classes

129 views
Skip to first unread message

Ben Johnson

unread,
Oct 2, 2015, 12:31:26 PM10/2/15
to Jukito
How can I run all my test classes with Jukito? I usually do something like this:

@RunWith(Suite.class)
@Suite.SuiteClasses({TheTest.class})
public class TestRunner {

   public static void main(String[] args) {
      junit.textui.TestRunner.run(suite());

   }


   public static junit.framework.Test suite()
   {
      return new JUnit4TestAdapter(TestRunner.class);
   }
}


However this doesn't work because it doesn't pick up the jukito annotations on the test class, e.g. @RunWith(JukitoRunner.class) and @UseModules(MyGuiceModule.class). Is it possible to programmatically run all my test classes with jukito?

Ben Johnson

unread,
Oct 16, 2015, 10:15:42 PM10/16/15
to Jukito
I'm a little disappointed no one has responded yet! How do you guys normally run all of your tests at once? Through gradle or maven?

Joel Trottier-Hebert

unread,
Oct 21, 2015, 9:29:10 AM10/21/15
to Jukito
Hey Ben,

It happens that I don't think it is currently possible to do that programmatically [at least, I don't know any way of doing this].

However, in our day-to-day work, we use intellij and maven.

With maven you can run them all with "mvn test" and in intellij you can create your own run configuration per file/per class/per package and many other filters.

You could open an issue on GitHub about this, can you however explain how "this doesn't work"? Is there a specific error message? Does it just *not* run the tests or crashes somehow?

Thanks for reporting this by the way.

Have a good day :)


On Friday, October 2, 2015 at 12:31:26 PM UTC-4, Ben Johnson wrote:
Reply all
Reply to author
Forward
0 new messages