1
votes

I am new to FitNesse acceptance testing. My requirement is to test a SOAP web service with FitNesse. I installed fitnesse-standalone.jar and am able to run simple calculation tests.

I read that by using hsac-fitnesse-fixtures, we can test the SOAP web services.

I‘ve downloaded the hsac-fitnesse-fixtures-2.7.0.jar. I don't where should I place the .jar file in my existing FitNesse software folder? I tried creating a folder with fixtures inside FitnesseRoot and placing the hsac-fitnesse-fixtures-2.7.0.jar inside of it.

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?

1

1 Answers

1
votes

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. 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

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):

  • just download the 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
  • open a browser to 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

To make a similar test in a Suite (folder) of your own (e.g. SoapTests.FirstCall) you need to set up a couple of FitNesse basics:

  • in the parent page (e.g. SoapTests). You need to add: !path fixtures !path fixtures/*.jar !pomFile ../pom.xml@compile !define TEST_SYSTEM {slim}
  • Add a setup page for the suite (e.g. SoapTests.SuiteSetUp) containing: |Import | |nl.hsac.fitnesse.fixture | |nl.hsac.fitnesse.fixture.slim |