问题描述
我正在尝试在 Windows Vista 上开始使用 FitNesse for .NET.在我在网上找到的所有教程中,我都被告知要执行 run.bat 文件,但下载最新版本时我得到的只是一个 .jar 文件.当我运行它时,文件结构被解压,我可以通过浏览到 http://localhost 来访问 Fitnesse 服务器.现在,当我尝试设置测试项目时,根据我发现的所有文档,我应该定义 fitsharp.dll 的路径,但我无法在从 .jar 文件.我做错了什么?
I'm trying to get started with FitNesse for .NET on Windows Vista. In all tutorials I find on the web I'm told to execute the run.bat file, but all i get when downloading the latest release is a .jar-file. When i run this, the filestructure is unpacked and I can reach the fitnesse server by browsing to http://localhost.Now, when I'm trying to set up a test project, according to all documentation I find I'm supposed define the path to fitsharp.dll but I can't find this file anywhere in the filestructure that was set up from the .jar-file. What am I doing wrong?
推荐答案
从 http://fitnesse.org/下载 FitNesse jar/a>.
Download FitNesse jar from http://fitnesse.org/.
运行
java -jar fitnesse.jar
它将启动网络服务器并创建包含 wiki 内容的文件夹 FitNesseRoot
.要检查它是否已开始导航到 http://localhost
- 您应该会看到 FitNesse 首页.
It will start web server and create folder FitNesseRoot
with wiki contents. To check that it has started navigate to http://localhost
- you should see FitNesse front page.
编辑首页 - 只需在底部添加类似 HelloWorldTest 的内容(必须是驼峰式!)并保存.单击出现的问号并保存一个新页面.点击属性并确保页面类型是测试.
Edit front page - just add something like HelloWorldTest (must be camel case!) in the bottom and save.Click on the appeared question mark and save a new page.Click Properties and make sure Page type is Test.
从 https://github.com/jediwhale/fitsharpFitSharp> 并将其解压缩到 FitNesseRoot
旁边的文件夹 fitsharp.
Download FitSharp
from https://github.com/jediwhale/fitsharp and extract it to folder fitsharp next to your FitNesseRoot
.
为测试创建 .Net 项目,添加对位于刚刚创建的 fitsharp 文件夹中的 fit.dll 和 fitSharp.dll 的引用.
Create .Net project for tests, add references to fit.dll and fitSharp.dll located in just created fitsharp folder.
在 .Net 中编写一个简单的测试并编译它.例如,使用 http://fitnesse.org/FitNesse.UserGuide 中描述的简单柱夹具.FixtureGallery.BasicFitFixtures.ColumnFixture.将测试表添加到我们的 HelloWorldTest 页面.
Write a simple test in .Net and compile it. For example use a simple column fixture as described on http://fitnesse.org/FitNesse.UserGuide.FixtureGallery.BasicFitFixtures.ColumnFixture. Add test table to our HelloWorldTest page.
在您的 FitNesse 测试页面顶部(在我们的示例中 HelloWorldTest)输入:
On top of your FitNesse test page (in our example HelloWorldTest) enter:
!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer,fitsharpfit.dll %p}
!define TEST_RUNNER {fitsharpRunner.exe}
!path <path to your test assembly>
如果您单击 Test
按钮并没有看到任何结果,请尝试使用 TEST_RUNNER
RunnerW.exe
进行故障排除.
If you click on Test
button and see no results then try to use TEST_RUNNER
RunnerW.exe
for troubleshooting.
这是一本关于在 .Net 中使用 FitNesse 的好书:http://fitnesse.s3.amazonaws.com/tdd_net_with_fitnesse.pdf
Here's a great book on using FitNesse with .Net: http://fitnesse.s3.amazonaws.com/tdd_net_with_fitnesse.pdf
这篇关于如何设置 FitNesse 以用于 .NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!