This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
Ribbon: REST

Screenshot

ribbon_rest

 

Purpose

The REST tab is for use with editing REST web service definition files.

 

How to Open

The REST tab is available anytime you have a REST definition file (.rest) file visible in the Content View.

 

File

ribbon_rest_file

·Save Requests - Saves the current REST request definitions to the .rest file.

·Update Object Tree - Updates the main Rapise Object Tree with the current REST definitions. This turns each of your REST requests into Rapise learned objects that can be scripted against.

 

Edit

ribbon_rest_edit

 

The Edit section of the REST ribbon lets you edit the HTTP headers, parameters and credentials associated with the current request.

·Add Header - Allows you to add a standard or custom HTTP header to the current REST request:
 

tutorial_web_services_pic9

 

·Add Parameter - Allows you to add a parameter name/value to the current REST request. This is useful when you want your test script to be able to pass through different values (e.g. get book #1 vs. book #2):

tutorial_web_services_pic16

 

·Add Credentials - Allows you to add an HTTP basic authentication credential (username and password) to the request. Saves you having to add the header manually (which would require base64 encoding the username and password):

tutorial_web_services_pic6

 

 

Script Steps

 

ribbon_rest_script

The Script Steps section of the REST ribbon lets you see the list of recorded REST operations and use them to create your test script in the main test file.

·Create Script - This takes all of the recorded steps and automatically creates the matching JavaScript code in your test script.

·Remote Step - This removes the recorded step from the script box

·Clean - This removes all of the recorded steps from the script box.

 

Each of the steps displayed in the script box will contain the name of the REST operation along with its HTTP method (GET, POST, PUT, DELETE, etc.). Steps displayed in bold* with an asterisk also have a verification point recorded. That means when the script is generated, it will include a Tester.Assert function to verify the results.