Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

...

Starting with version 5.

...

  • HTTP Body 
  • HTTP Header
  • URL

...

7, Katalon Studio provides Variables for RESTful and SOAP Web Service Test Objects.

Query Parameters

Query parameters are a can be added to a REST URL to tailor and filter the response output. When the user inputs a URL, Katalon Studio will detect the query parameters (after the question mark ?) and list them in the table for better management.

Image Added

Variables (since 5.7)

Having the ability to use variables in an object allows the users to have more control of the

...

objects and fulfill all the testing requirements. The approach is the same

...

...

Example:

...

In Script Mode, the below code passing the value of userID to be sent in the request

Code Block
themeDJango
def response = WS.sendRequest(findTestObject('REST_CommentDetails - Copy', [('userID') : '999']))

...

Where

...

Code Block
themeDJango
ResponseObject response = WS.sendRequest(findTestObject('Object Repository/REST_CommentDetails', [('userId'): '2']))

System.out.println(response.getResponseText())

Image Removed

 

 

. Katalon Studio supports variables for the following information of a Web Service object.

  • URL
  • Query Parameters
  • HTTP Header
  • HTTP Body
  • Verification

You can add a new variable and declare its properties within the Variables tab. Variables tab is available from both RESTful and SOAP object.

Image Added

In order to call a variable in a Web Service object, use the syntax ${variable_name} in any of the supported locations. 

For example, using 'gender' variable in URL of a RESTful Web Service object.

Image Added

These pre-defined variables will be mapped automatically when you select a Web Service object from manual mode, so you don't need to define them again manually.

The user can also similarly use variables for a SOAP object.

Image Added

Table of Contents
classkat_toc