操作系统:
Windows7_Professional_64bit
文件下载
1. JRE6_x86 (jre-6u21-windows-i586-s.exe)
http://www.java.com/en/download/manual.jsp
2. Fitness (fitnesse.jar) (20100303)
http://www.fitnesse.org/FrontPage.FitNesseDevelopment.DownLoad
3. fitsharp (release.1.8.net.40.zip)
http://github.com/jediwhale/fitsharp/downloads
安装步骤
1. 双击安装java6, 设置环境变量
2. 打开cmd窗口,进入fitnesse.jar路径,运行java -jar fitnesse.jar -p 8080, 生成FitNesseRoot文件夹
3. 解压release.1.8.net.40.zip到FitNesseRoot/FitSharp
4. 打开浏览器输入 http://localhost:8080 进入fitnesse界面
HelloWorld测试
1. 打开VisualStudio,新建项目HelloWorld,新建类OurFirstTest, 添加引用FitNesseRoot/FitSharp/fit.dll &fitSharp.dll, 代码如下:
2. 在路径:'项目路径'/HelloWorld/bin/Debug获取HellowWorld.dll, 并粘帖到FitNesseRoot/FitSharp
3. 打开浏览器输入 http://localhost:8080, 在首页点击'Edit',进入首页编辑页面,在末行添加 HelloWorld,保存并退出
4. 在首页末行出现 HelloWorld[?], 点击问号打开HelloWorld编辑页面,输入并保存如下代码:
!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer,FitNesseRoot/FitSharp/fit.dll %p}
!define TEST_RUNNER {FitNesseRoot/FitSharp/Runner.exe}
!path FitNesseRoot/FitSharp/HelloWorld.dll
!|HelloWorld.OurSecondTest|
|string1|string2|Concatenate?|
|Hello|World|Hello World|
5. 在HelloWorld页,点击'Properties'进入属性编辑页,选择'Page Type' 为 'Test', 保存并退出
6. 在HelloWorld页,点击'Test'测试代码并通过
出现问题
1. 在点击'Test'后,测试长期停滞
可能原因是fit.dll, fitSharp.dll, HelloWorld.dll 路径不对, 还有 fit.dll, fitSharp.dll 可能被blocked, 需要unblock才能用