Hi,
I need to run indivudual TestCases in JUnit4.
I could find the below code in google which could run with the prior versions of JUnit4 (non annotated type TestCases)
package suite;
import junit.framework.*;
import com.Arsindemo2.Sampletesting;
public class Sampletestforinstaller extends TestSuite{
public static void main (String[] args) {
junit.textui.TestRunner.run (suite());
}
public static Test suite ( ) {
TestSuite suite= new TestSuite();
suite.addTest(new com.Arsindemo2.Sampletesting("testfail"));
suite.addTest(new com.Arsindemo2.Sampletesting("testpass"));
return suite;
}
}
I need the the same equivalent code of above code in JUnit4.X in below format.
package suite;
import junit.framework.*;
import org.junit.runners.*;
import org.junit.runner.*;
@RunWith(value=Suite.class)
@Suite.SuiteClasses(value={SubscriptionTest.class})
public class TSJUnit4
{
}
I need only TestCases to be run but not the whole Class
please reply to me.
thanks in advance,
thanks,
Rajesh Gottapu.