In this tutorial we'll see how to create a functional test case for your REST service. Test cases allows you to save the responses and ensure that there is no regression in the functionality of the REST service
STEPS:
- Discover a REST service. Please see the Getting Started tutorial on how to do this
- Navigate to the Tests menu and click on the Create button. Select REST, then select the service and method to be tested
![](/fint/Data/Sites/1/media/Tutorials/rest_createfunctest/createresttescase_thumb500.png)
- Click GO. This will create the test case and automatically open it. Below are the main section of a test case
![](/fint/Data/Sites/1/media/Tutorials/rest_createfunctest/editresttescase_thumb500.png)
- Click the Run Button
to execute the test case.
- The actual response (headers + Body) will be compared against the actual response. The test result (Pass or Fail) is automatically set depending on the output of the comparison
![](/fint/Data/Sites/1/media/Tutorials/rest_createfunctest/editresttescase2_thumb500.png)
If the test fails, it useful to find out why, Clicking on the Compare button will bring up the comparison dialog shown below
![](/fint/Data/Sites/1/media/Tutorials/rest_createfunctest/compare_actualandexpected.png)
That's it. Quite simple eh?