M.J.
M.J.

Reputation: 16646

running test cases from a java class

I have say 10 test cases, and i want to run them from a java class, i can get the Junit's class name only at runtime. Is it possible to do so.

Please help me.

Upvotes: 2

Views: 308

Answers (1)

卢声远 Shengyuan Lu
卢声远 Shengyuan Lu

Reputation: 32004

org.junit.runner.JUnitCore.run(Class<?>...)

It supports multiple test classes. From JUnit4.

Upvotes: 5

Related Questions