selenium如何在一个方法里面调用多个testcase
我已经写好了三个testcase,分别测试一个系统的三个功能,现在我想再写一个testcase调用这三个测试类,该怎么实现呢?
我的代码如下,但是在junit里面执行的时候总提示junit.framework.AssertionFailedError: No tests found in seleniumtest1.autoreflashall
public class autoreflashall extends TestCase {
protected void setUp() throws Exception {
super.setUp();
}
public void autoreflashall() throws Exception{
autoreflasha0 = new autoreflash();
autoreflash2 a1 = new autoreflash2();
autoreflash3 a3 = new autoreflash3();
autoreflash4 a4 = new autoreflash4();
try{
a0.setUp();
a0.testfelash();
a0.tearDown();
}catch(InterruptedException e){
e.printStackTrace();
}
try{
a1.setUp();
a1.testfelash();
a1.tearDown();
}catch(InterruptedException e){
e.printStackTrace();
}
try{
a3.setUp();
a3.testfelash();
a3.tearDown();
}catch(InterruptedException e){
e.printStackTrace();
}
try{
a4.setUp();
a4.testfelash();
a4.tearDown();
}catch(InterruptedException e){
e.printStackTrace();
}
}
protected void tearDown() throws Exception {
super.tearDown();
}
} JUnit3 has naming convention, which looks like "testXXXX". Other methods are regarded as normal methods instead of tests. Use Junit4 or TestNG + annotations to tackle it. 没看太明白。
你要的是不是testsuite呢? 原帖由 goal1860 于 2010-6-17 16:12 发表 http://bbs.51testing.com/images/common/back.gif
JUnit3 has naming convention, which looks like "testXXXX". Other methods are regarded as normal methods instead of tests. Use Junit4 or TestNG + annotations to tackle it.
二楼正解送花哈
页:
[1]