I have to run junit test from command line and one of the guy in the team created junit classes like below:
public Test extends TestCore
{
String some;
public Test(String some)
{
this.some = some;
}
//some test here
}
this work from the eclipse but doesn't from command line. The result of execution this kind of file gave me error like below:
Test class should have exactly one public zero-argument constructor.
Anyone could help me?
Cheers Jaroslaw.
BlockJUnit4ClassRunner(in any form) to run your tests, then you will need a no-arg constructor for your test class; Eclipse doesn't use this TestRunner in its JUnit4 test runner. You might want to re-look at why you need a constructor with arguments for your test classes in the first place.