3

I have gone through fitnesse user guide. But it seems difficult for me to follow since I want to test a web-service.

The problem is as below I have a request xml file and response xml file. In request file I have userid and logon id with values . In response xml file I have location with value. I need to test that whether I get expected location value , using fitness. How can I do the test with fitnesse.

Sachith Muhandiram
  • 2,819
  • 10
  • 45
  • 94
botguide
  • 129
  • 1
  • 1
  • 10
  • For Example in xml request file 8789435 4276338 and in response xml we have canada , i need to find out the xml response with location canada is correct . How can I write test in fitnesse . – botguide Mar 07 '16 at 14:23

1 Answers1

3

Out of the box FitNesse does not test anything. It is really a framework for collaboratively editing and executing tests. To test any sort of software you need to use fixtures. Often people write their own, but you can also use fixtures written by other people.

In the case of testing web services, you can possibly use RestFixture. It is designed to test REST based Web Services. Back when I had to test a TES interface, I chose to write my own using HttpClient and custom parser due to the way our other test fixtures worked.

I don't know anything about it, but you can also look at XmlHttpTest.

Ultimately, you with have to find a fixture that works for you, or build one. This is pretty much true of FitNesse, Cucumber, and most of the similar style tools.

Dan Woodward
  • 2,559
  • 1
  • 16
  • 19
  • Is this really helpful for Soap webservices ? I have found some XmlHttp Test . But really difficult to understand what they mean . For example post values to url. What is this mean ? – botguide Mar 08 '16 at 08:57
  • 3
    Posting XML is how you call a SOAP service. Posting values is probably not something you need. Examples of how to call SOAP services with XmlHttpTest can be found at: http://fhoeben.github.io/hsac-fitnesse-fixtures/examples-results/HsacExamples.SlimTests.HttpTests.HttpPost1Test.html, http://fhoeben.github.io/hsac-fitnesse-fixtures/examples-results/HsacExamples.SlimTests.HttpTests.HttpPost2UsingScenarioTest.html or http://fhoeben.github.io/hsac-fitnesse-fixtures/examples-results/HsacExamples.SlimTests.HttpTests.HttpPost3UsingFreemarkerTemplateTest.html – Fried Hoeben Mar 09 '16 at 06:31
  • 1
    I have recently answered [this question](http://stackoverflow.com/questions/35753103/workflow-of-creating-tests-using-restfixture/36298133) with a - hopefully - comprehensive installation / usage guide for [RestFixture](https://github.com/smartrics/RestFixture) -- HTH – smartrics Apr 13 '16 at 16:21