google搜索 站内搜索                 软件测试门户 | 软件测试培训 | 文章资料精选 | 软件测试论坛 | 测试解决方案 | 软件测试博客 | 测试招聘求职 
打印

[求助] 谁能告诉怎么单独使用Junit阿?我不想用集成在eclipse里边的

谁能告诉怎么单独使用Junit阿?我不想用集成在eclipse里边的


我不想用集成在eclipse里边的,想用junit的swingui界面,可是弄了很久都不行,在eclipse里边就可以,在swingui界面下就提示错误,为什么啊?
放在其他文件夹下就提示class not found ,难道每次都要设置环境变量才行?
后来放到junit\samples文件夹下,就提示D:\junit3.8.1\junit\samples>java -cp ..\..\junit.jar SimpleTest
我的程序是
package junit.samples;
import java.util.*;
import junit.framework.*;

public class SimpleTest extends TestCase {

    public SimpleTest(String name) {
        super(name);
    }
public void testEmptyCollection() {
        Collection collection = new ArrayList();
        assertTrue(collection.isEmpty());
    }
public static Test suite() {
        return new TestSuite(SimpleTest.class);
    }
public static void main(String args[]) {
        junit.textui.TestRunner.run(suite());
    }
}
当然,代码是我copy的,想试试能不能运行
命令是D:\junit3.8.1\junit\samples>java -cp ..\..\junit.jar SimpleTest

哪位大虾能告诉我为什么吗?
小女子万分感谢!!!!
弄了好久了都弄不出来:-(
没人能替你吃饭!!!

TOP

我是集成在eclipse里面用的,感觉得错,没有单独用过,我也不知道!

TOP

 
当前时区 GMT+8, 现在时间是 2008-11-23 01:07Copyright(C)上海博为峰软件技术有限公司 2001-2007 电话:021-64471599-8017
当您在访问网站、论坛及博客过程中遇到问题时可发送email:webmaster@51testing.com或发送论坛短信至管理员风在吹