|
From: inba <inb...@gm...> - 2011-02-01 16:31:07
|
public class TESTCLASS {
@Before
public void setUp(){
//some setup
}
@Test
public void testA() {
//some test
}
@Test
public void testB(){
//some test
}
@Test
public void testB(){
//some test
}
}
To run a single method testB in the above class I have code in a main() as
below
new TestRunner().start(new
String[]{"-c","TESTCLASS","-m","TESTCLASS.testB"});
but this doesn't work and i get an error like this
Exception in thread "main" java.lang.Exception: Could not create and run
test suite: java.lang.ClassCastException: class TESTCLASS at
junit.textui.TestRunner.start(TestRunner.java:182)
I am trying to execute a method selected in a swing application. At the end
i would want to get a list of selected methods in the swing gui to be
executed. how do i do this ?
--
View this message in context: http://old.nabble.com/to-run-single-test-in-junit-4-from-a-main-method-tp30814050p30814050.html
Sent from the JUnit - Dev mailing list archive at Nabble.com.
|