» 您尚未 登录   注册 | 社区服务 | FTP中心 | 帮助 | 社区 | 无图版 | 测试百科  | 测试Blog 
软件测试基地论坛 -> 新手园地 -> [FAQ]如何安装JUnit?
 XML   RSS 2.0   WAP 

--> 本页主题: [FAQ]如何安装JUnit? 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题
Fastpoint


该用户目前不在线
级别: 总版主
精华: 44
发帖: 5033
基地声望: 390 点
基地币: 1689 Bug
基地贡献: 0 点
好评度: 15 点
在线时间:818(小时)
注册时间:2005-10-08
最后登录:2008-07-22
查看作者资料 发送短消息 推荐此帖 引用回复这个帖子

[FAQ]如何安装JUnit?

引用Kent Beck, Erich Gamma,连接地址:http://junit.sourceforge.net/doc/cookbook/cookbook.htm

First, download the latest version of JUnit, referred to below as junit.zip.

Then install JUnit on your platform of choice:

1.Windows

To install JUnit on Windows, follow these steps:

Unzip the junit.zip distribution file to a directory referred to as %JUNIT_HOME%.

Add JUnit to the classpath:
set CLASSPATH=%CLASSPATH%;%JUNIT_HOME%\junit.jar

2.Unix (bash)

To install JUnit on Unix, follow these steps:

Unzip the junit.zip distribution file to a directory referred to as $JUNIT_HOME.

Add JUnit to the classpath:

export CLASSPATH=$CLASSPATH:$JUNIT_HOME/junit.jar

(Optional) Unzip the $JUNIT_HOME/src.jar file.

Test the installation by using either the textual or graphical test runner to run the sample tests distributed with JUnit.

Note: The sample tests are not contained in the junit.jar, but in the installation directory directly. Therefore, make sure that the JUnit installation directory is in the CLASSPATH.

For the textual TestRunner, type:

java junit.textui.TestRunner junit.samples.AllTests
For the graphical TestRunner, type:

java junit.swingui.TestRunner junit.samples.AllTests
All the tests should pass with an "OK" (textual) or a green bar (graphical).

If the tests don't pass, verify that junit.jar is in the CLASSPATH.

Finally, read the documentation.


[ 此贴被Fastpoint在2005-10-17 11:06重新编辑 ]


可不可不要这么样徘徊在目光内
你会察觉到我根本寂寞难耐
即使千多百个深夜曾在梦境内
我有吻过你这毕竟并没存在

人声车声开始消和逝
无声挣扎有个情感奴隶
是我多么的想她
但我偏偏只得无尽叹谓

其实每次见你我也着迷
无奈你我各有角色范围
就算在寂寞梦内超出好友关系
唯在暗里爱你暗里着迷
无谓要你惹上各种问题
共我道别吧别让空虚使我越轨
[楼 主] | Posted: 2005-10-14 19:42 顶端
Fastpoint


该用户目前不在线
级别: 总版主
精华: 44
发帖: 5033
基地声望: 390 点
基地币: 1689 Bug
基地贡献: 0 点
好评度: 15 点
在线时间:818(小时)
注册时间:2005-10-08
最后登录:2008-07-22
查看作者资料 发送短消息 推荐此帖 引用回复这个帖子



FastPoint [链接]



Junit安装步骤分解

01:首先将 Junit压缩包解压到一个物理目录中(例如C:\Junit3.8.1)

02:记录Junit.jar文件所在目录名(例如 C:\Junit3.8.1\Junit.jar)

03:进入操作系统(以Windows2000操作系统为准),按照次序点击“开始 -> 设置 -> 控制面板”

04:在控制面板选项中选择“系统”,点击“环境变量”,在“系统变量”的“变量”列表框中选择“CLASS_PATH”关键字(不区分大小写),如果该关键字不存在则添加

05:双击“CLASS_PATH” 关键字添加字符串“C:\Junit3.8.1\Junit.jar”(注意,如果已经有别的字符串请在该字符串的字符结尾加上分号“;”),这样确定修改后Junit就可以在集成环境中应用了


Junit的卸载步骤如

01:首先将 Junit压缩包删除。

02:进入操作系统(以Windows2000操作系统为准),按照次序点击“开始 -> 设置 -> 控制面板”。

03:在控制面板选项中选择“系统”,点击“环境变量”,在“系统变量”的“变量”列表框中选择“CLASS_PATH”关键字(不区分大小写)。

04:双击“CLASS_PATH” 关键字删除字符串“C:\Junit3.8.1\Junit.jar”。



[ 此贴被Fastpoint在2005-10-19 20:58重新编辑 ]


可不可不要这么样徘徊在目光内
你会察觉到我根本寂寞难耐
即使千多百个深夜曾在梦境内
我有吻过你这毕竟并没存在

人声车声开始消和逝
无声挣扎有个情感奴隶
是我多么的想她
但我偏偏只得无尽叹谓

其实每次见你我也着迷
无奈你我各有角色范围
就算在寂寞梦内超出好友关系
唯在暗里爱你暗里着迷
无谓要你惹上各种问题
共我道别吧别让空虚使我越轨
[1 楼] | Posted: 2005-10-18 12:25 顶端
sandra




该用户目前不在线
级别: 测试员
精华: 0
发帖: 44
基地声望: 11 点
基地币: 6719 Bug
基地贡献: 6 点
好评度: 0 点
在线时间:26(小时)
注册时间:2005-10-11
最后登录:2007-09-15
查看作者资料 发送短消息 推荐此帖 引用回复这个帖子



谢谢
[2 楼] | Posted: 2006-02-10 11:53 顶端

软件测试基地论坛 -> 新手园地




软件测试基地上海测仕信息技术有限公司旗下网站
Copyright © 2005-2007 Cntesting.com, All Rights Reserved
沪ICP备06057721号

Powered by PHPWind Code © 2003-06 PHPWind
Total 0.157290(s) query 5, Time now is:12-05 12:43, Gzip disabled
You can contact us


每日一句:Loading...