Posted on 2007-10-30 17:59
G_G 阅读(284)
评论(0) 编辑 收藏 所属分类:
JUnit
参考:http://caterpillar.onlyfun.net/GossipCN/JUnit/JUnitGossip.htm
1. TestSuite
public static Test suite() {
TestSuite suite = new TestSuite(MathTool.class);
suite.addTest(new MathToolTest("testGcd")); }
2.全局属性
protected void setUp() throws Exception {
super.setUp();
arr = new ............;
}
protected void tearDown() throws Exception {
super.tearDown();
arr = null;
}
3. Cactus
web设置
http://caterpillar.onlyfun.net/GossipCN/JUnit/FirstCactusWithTomcat.htm
http://caterpillar.onlyfun.net/GossipCN/JUnit/FirstCactusWithJetty.htm