Creating WebService Test Case
Creating New WebService Test Step Group
To add a Test Step Group in a Test case, perform the following actions:
On the Home page, select the required project and select Design Studio.
Go to the Test Case tab and select the created Test case.
Note: To learn more about how to create a new Test Case Folder and Test Case, click here.
Select Create Test Step Group and select Add new test step group. The Test Step Group dialog opens.

Enter the name in the Test Step Group Name text box.
Select Webservice as an Application Type.
Select Create to add a new Test Step Group. This creates a new Webservice Test Step Group inside the Test case.
Note: You can also add a Test Step Group from the Reusable Library.

Creating WebService Test Steps
To create WebServices test steps, use one of the following methods:
Add from Repository
Add Manually
Adding Elements from Element Repository
Add from Repository is used to add key–value pair steps required for an API request. The Element Repository stores API elements such as JSON keys, XML keys, form-data fields, and URL-encoded parameters. You can select these elements from the repository and add them directly to the test steps.
To add Webservice elements from the Element Repository to the Test Step Group, perform the following actions:
On the Test Case tab, select the created Test case.
Select Create Test Step Group and select Add new test step group.
Select Add from Repository. The Element Repository page opens.

Drag-and-drop the WebService elements repository into the Test Step Group.
Note:
When you drag and drop elements from the Element Repository in a WebService Test Step Group, all JSON and XML keys, including parent and nested keys are available in the Element Name dropdown. The Element Name, Action (Keyword), and Input Value automatically populate in the test steps.
When you drag and drop elements for form-data or URL-encoded from the Element Repository, their key names are available in the Element Name dropdown, and the Action is automatically set to Set Tag Value.
(Optional) Add the required validation steps using appropriate action (for example, Get Header or Get Body) to verify the API response.
Select Save to save the test steps.
Select Debug to run the test step group.
Note: To generate reports for the Test Steps, you can create an Execution List.

Adding Elements Manually
The Add Manually is used to create and add the required test steps for an API request directly within the test case. This option allows you to manually define the request details, such as JSON keys, XML keys, form-data fields, or URL-encoded parameters, without using the Element Repository.
To add Webservice elements manually to the Test Step Group, perform the following actions:
On the Test Case tab, select the create Test Case.
Select Create Test Step Group.
Select Add Manually to add a new Test Step.

Select the Add Step (+) icon and choose Add Step Manually to add more steps to the Test Step Group.
Note: You can add test steps using the Add Step (+) icon in two ways:
From the top corner of the Test Step Group to add a new step.
By hovering over an individual step, where the Add Step (+) icon appears next to the Output Value column to insert additional steps within the group.

A new test step is created. Select the WebService List as an Element Type, and then action from the Action dropdown. The following example demonstrates how to configure a WebService API request by setting the endpoint URL, request method, required headers, and executing the request using WebService List actions. To create the test steps required to configure the API request, perform the following steps:
Select WebService List from the Element Type dropdown.
From the Action dropdown, select Set End Point URL.
In the Input Value text box, enter the required API endpoint URL.
Add another test step and select Web Service List from the Element Type dropdown.
From the Action dropdown, select Set Method.
In the Input Value text box, enter GET to specify the request method.
Add another test step and select Web Service List from the Element Type dropdown.
From the Action dropdown, select Set Header (if the API requires headers).
Provide the required header details in the Input Value text box (for example, Authorization or Content-Type).
Add another test step and select Web Service List from the Element Type dropdown.
From the Action dropdown, select Execute Request.
Note: This action sends the configured API request to the server and returns the response based on the provided endpoint, method, headers, and other details.
(Optional) Add the required validation steps using appropriate action (for example, Get Header or Get Body) to verify the API response.
Select Save to save the test steps.
Note:
After creating the test steps, you can debug the Test Step Group to verify the execution.
To generate reports for the test steps, you can create an Execution List.

Adding WebService Elements in the Test Case Tab
The Add Element feature is available only for WebServices test step groups and is used for form-data and urlencoded requests. It helps you manually add keys inside the test case, where each key is considered as an element. This is useful when you create manual scripts, so you can directly define and use key–value pairs without depending on the Element Repository.
Note: This feature only works for form-data and urlencoded.
To use Add Element in Test Case, perform the following actions:
On the Test Case tab, go to the Test Step Group.
In the Elements column, select the + Add Element. The Add element dialog opens.
Enter the Element name (Key name) in the text box.
Select the Input Type (Text or File) from the dropdown.
Note:
If you selected File: In the Input Value text box, you can provide the file path directly or choose the file from a Segregated Avo Storage location.
If you selected Text: In the Input Value text box, you can provide the text.
To learn how to add Text or File as an Input Type, click here.
Select Add to create the element.

Enter the tag value in the Input Value column.
Note:
After you add the element, the system automatically selects the Action (Set Tag Value), and it is not editable.
You can update the parameter name and its value by selecting the Edit icon.

Select Save to save the created test steps.
Key Points to Know
You can directly create a Test Case and perform API testing without executing any API request from the Element Repository page.
To automate Webservice in Avo Assure, there is no need to capture application elements as APIs work in the backend.
To automate Webservice applications successfully, it is important to understand the correct actions applicable to your application. For a detailed list of supported Webservice list actions, click here.
Other Related Links:
To learn more about how to create and execute an execution list, click here.
To learn more about how to view the API Test Case execution Reports, click here.
Last updated