6 Kasım 2009 Cuma

testsuite for junit

i used org.junit package for developing unit tests and want to run all my tests in a suite..
in order to do that :

two sample test classes
import org.junit.Test;

public class Test1 {
    @Test
    public void TestCase1() {
   ...
   }
-------------------------------
import org.junit.Test;

public class Test2 {
    @Test
    public void TestCase2() {
   ...
   }

test suite
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({
    Test1.class,
    Test2.class
    })
public class AllTests {

}

(post by Arne V. at 10-06-2008, 03:18 AM)


Hiç yorum yok:

Yorum Gönder