[英]FitNesse: How to test SOAP web service?
I am new to FitNesse acceptance testing.我是 FitNesse 验收测试的新手。 My requirement is to test a SOAP web service with FitNesse.
我的要求是使用 FitNesse 测试 SOAP Web 服务。 I installed
fitnesse-standalone.jar
and am able to run simple calculation tests.我安装了
fitnesse-standalone.jar
并且能够运行简单的计算测试。
I read that by using hsac-fitnesse-fixtures
, we can test the SOAP web services.我读到通过使用
hsac-fitnesse-fixtures
,我们可以测试 SOAP Web 服务。
I've downloaded the hsac-fitnesse-fixtures-2.7.0.jar
.我已经下载了
hsac-fitnesse-fixtures-2.7.0.jar
。 I don't where should I place the .jar
file in my existing FitNesse software folder?我不应该将
.jar
文件放在我现有的 FitNesse 软件文件夹中的什么位置? I tried creating a folder with fixtures inside FitnesseRoot
and placing the hsac-fitnesse-fixtures-2.7.0.jar
inside of it.我尝试在
FitnesseRoot
创建一个带有装置的文件夹,并将hsac-fitnesse-fixtures-2.7.0.jar
放在其中。
I wrote a script, but it's not working:我写了一个脚本,但它不起作用:
!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 |
What is the working code/script to test SOAP web services using hsac-fitnesse-fixtures
?使用
hsac-fitnesse-fixtures
测试 SOAP Web 服务的工作代码/脚本是什么?
The easiest way is not separately downloading all components (finesse-standalone, hsac-fitnesse-fixtures, etc) but to downloaded the package containing it all fully setup (the standalone zip in the project) from the project's releases page in GitHub.最简单的方法不是单独下载所有组件(finesse-standalone、hsac-fitnesse-fixtures 等),而是从 GitHub 中项目的发布页面下载包含所有完整设置的包(项目中的独立 zip)。 For the current release it can be found at: https://github.com/fhoeben/hsac-fitnesse-fixtures/releases/download/2.7.1/hsac-fitnesse-fixtures-2.7.1-standalone.zip
对于当前版本,可以在以下位置找到: https : //github.com/fhoeben/hsac-fitnesse-fixtures/releases/download/2.7.1/hsac-fitnesse-fixtures-2.7.1-standalone.zip
The releases page contains (minimal) instructions how to use it: 发布页面包含(最小)如何使用它的说明:
To get started by running some sample tests (if you have a Java runtime installed):
首先运行一些示例测试(如果您安装了 Java 运行时):
- just download the standalone.zip,
只需下载standalone.zip,
- extract it and
提取它和
- run it (using '
java -jar fitnesse-standalone.jar -p 9090
', or on Windows just double clicking the jar to run the application on port 80 instead of 9090) from the directory where the 'standalone.zip' was extracted and从解压缩“standalone.zip”的目录中运行它(使用“
java -jar fitnesse-standalone.jar -p 9090
”,或者在 Windows 上只需双击 jar 即可在端口 80 而不是 9090 上运行应用程序)- open a browser to http://localhost:9090/HsacExamples .
打开浏览器访问http://localhost:9090/HsacExamples 。
A sample similar to what you post in your question can then be found at: http://localhost:9090/HsacExamples.SlimTests.HttpTests.HttpPost1Test然后可以在以下位置找到与您在问题中发布的内容类似的示例: http://localhost:9090/HsacExamples.SlimTests.HttpTests.HttpPost1Test
To make a similar test in a Suite (folder) of your own (eg SoapTests.FirstCall) you need to set up a couple of FitNesse basics:要在您自己的套件(文件夹)(例如 SoapTests.FirstCall)中进行类似的测试,您需要设置一些 FitNesse 基础:
!path fixtures !path fixtures/*.jar !pomFile ../pom.xml@compile !define TEST_SYSTEM {slim}
!path fixtures !path fixtures/*.jar !pomFile ../pom.xml@compile !define TEST_SYSTEM {slim}
|Import | |nl.hsac.fitnesse.fixture | |nl.hsac.fitnesse.fixture.slim |
|Import | |nl.hsac.fitnesse.fixture | |nl.hsac.fitnesse.fixture.slim |
|Import | |nl.hsac.fitnesse.fixture | |nl.hsac.fitnesse.fixture.slim |
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.