Business Data Testing

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
Business Data Testing

I was wondering if there was a way of specifying exact return values from a webservice, to determine whether the test failed or passed.

For example, there is a webservice which performs a calculation on an integer (it squares the input value), and I want to have a Test Case where I set the input parameter to be 5, and I only want the test to pass if the result is 25. If the result contains any other value (if for example someone changed the function), then it should fail.

Currently, the tests will always pass, as it returns a "valid" value, according to the WSDL (ie any integer), but I want to add an extra layer of checking to ensure the back-end operation is correct.

The way I would envisage using this would be to have a spreadsheet with 2 columns:
Input Output
5 25
3 9

And then I would like to cross-reference the result returned by the WebService with the corresponding row and if it does not correspond to the value in the "output" column, then the test should fail.

I don't want to specify this as a regression Test, but I want it to be an "online" test. How would I go about doing this?




  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    It seems that you want to use the values in a spreadsheet as the source for inputs and checking the outputs. This can be done by adding a Data Source to the project. Then the values in that data source can be used for the tests.

    The attached project file is an example. In the project, the Data Source is named Data1 and contains 3 titles as inputs and the expected ID number outputs. An XML Transformer has been added to the test to select just the ID element in the output. A Diff tool has been added to the XML Transformer to check the ID element output with the values in the table.
  • LegacyForumLegacyForum Posts: 1,669 ✭✭

    Thanks, this is exactly what I am looking for!

Sign In or Register to comment.