Danny Gloudemans
Danny Gloudemans

Reputation: 2677

Junit 3, start testing from a java method

I'm need to use JUnit 3, I know in JUnit 4 there is a method in the API to start the JUnit tests from a normal method in Java (Result r = org.junit.runner.JUnitCore.runClasses(MyTestClass.class)). But how can I do this in JUnit 3 and getting the results of that?

edit: I'm now doing it with this: TestRunner.run(MyTestClass.class); But then I don't get any results..

Upvotes: 0

Views: 334

Answers (1)

Jens Schauder
Jens Schauder

Reputation: 81862

I think this should work: http://pub.admc.com/howtos/junit3x/junit3x.html#using_runners-chapt

Upvotes: 1

Related Questions