我刚接受fitnesse验收测试。我的要求是用fitnesse测试soap webservice。 我安装了fitnesse-standalone.jar并能够运行简单的计算测试。我通过使用hsac-fitnesse-fixture来阅读,我们可以测试soap webservices。我下载了hsac-fitnesse-fixtures-2.7.0.jar。
我不在哪里将jar文件放在我现有的fitnesse软件文件夹中?
我尝试在FitnesseRoot中创建一个带有灯具的文件夹,并在其中放置hsac-fitnesse-fixtures-2.7.0 jar。 写了一些类似但不工作的脚本
!define TEST_SYSTEM {slim}
!path C:/Fitnesse/fitnesse-standalone.jar
!path fixtures/*.jar
!path
C:/Fitnesse/FitnesseRoot/fixtures/hsac-fitnesse-fixtures-2.7.0.jar
!path fixtures/*
|Import|
| nl.hsac.fitnesse.fixture.slim|
!|XmlHttpTest |
|script |xml http test |
|post |mypostbody |
|to |myserviceurl |
|check |response| status|200 |
|show |response |
在fitnesse软件中使用hsac-fitnesse-fixture测试soap webservices的工作代码/脚本是什么
答案 0 :(得分:0)
最简单的方法是不单独下载所有组件(finesse-standalone,hsac-fitnesse-fixture等),而是从GitHub项目的发布页面下载包含它的所有包完全设置(项目中的独立zip) 。有关当前版本,请访问:https://github.com/fhoeben/hsac-fitnesse-fixtures/releases/download/2.7.1/hsac-fitnesse-fixtures-2.7.1-standalone.zip
releases page包含(最小)指令如何使用它:
通过运行一些示例测试(如果您有Java)开始 运行时安装):
- 只需下载standalone.zip,
- 提取它和
- 运行它(使用“
!path fixtures !path fixtures/*.jar !pomFile ../pom.xml@compile !define TEST_SYSTEM {slim}
”,或者在Windows上只需双击jar即可在端口80上运行应用程序 而不是9090)来自'standalone.zip'所在的目录 提取和- 打开浏览器http://localhost:9090/HsacExamples。
您可以在http://localhost:9090/HsacExamples.SlimTests.HttpTests.HttpPost1Test
找到与您在问题中发布的内容类似的示例要在您自己的套件(文件夹)中进行类似的测试(例如SoapTests.FirstCall),您需要设置几个FitNesse基础知识:
|Import |
|nl.hsac.fitnesse.fixture |
|nl.hsac.fitnesse.fixture.slim |