# Creating API Test Case

To learn more about how to create a new Test Case Folder and Test Case, [click here](https://docs.avoautomation.com/working-with-the-avo-assure-platform/create-and-execute-tests-with-design-studio/working-with-test-case-section/creating-test-case).&#x20;

## Creating New API Test Step Group

To add a Test Step Group in a Test case, perform the following actions:&#x20;

1. On the **Home** page, select the required project and select **Design Studio**.&#x20;
2. Go to the **Test Case** tab and select the created Test case.&#x20;
3. On the **Test Case** tab, select **Create Test Step Group** and select **Add new test step group**. The **Test Step Group** dialog opens.&#x20;

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FP5IpuZRhBCU0s01uhls6%2Funknown.png?alt=media&#x26;token=4b37c79a-fe14-49e5-84c5-38885a93015d" alt=""><figcaption></figcaption></figure>

4. Enter the name in the **Test Step Group Name** text box and select **Webservice** as an **Application Type**.&#x20;
5. Select **Create** to add a new Test Step Group.&#x20;

{% hint style="info" %}
**Note**: You can also add a **Test Step Group** from the [**Reusable Library**](https://docs.avoautomation.com/working-with-the-avo-assure-platform/create-and-execute-tests-with-design-studio/working-with-test-case-section/creating-test-step-group/add-test-step-group-from-reusable-library).
{% endhint %}

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FynTKEUGWzY5lWaiB7Gzh%2Fimage.png?alt=media&#x26;token=a99f34a6-7e56-415d-9f92-63c34e251001" alt=""><figcaption></figcaption></figure>

6. This creates a new **Webservice Test Step Group** inside the Test case.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2Fb9yOgXmNQuyinZnsbaOZ%2Fimage.png?alt=media&#x26;token=390780ee-93f3-44de-aaaf-6b3d40283e89" alt=""><figcaption></figcaption></figure>

7. Select the required options to add the Test Steps. \
   Here are the two ways to add steps:&#x20;

* **Add from repository**&#x20;
* **Add Manually**&#x20;

<details>

<summary><strong>Add from repository</strong></summary>

To add Webservice elements from the Element Repository to the Test Step Group, perform the following actions:

1. On the **Test Case** tab, select the created Test Step Group and select **Add from Repository**. The **Element Repository** page opens.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FANvov5pEvLM2zywBSpCS%2Fimage.png?alt=media&#x26;token=f3151c45-341c-4f4c-b4bf-95131a308554" alt=""><figcaption></figcaption></figure>

2. From the **Element Repository** page, drag-and-drop the **Webservice** elements repository into the **Test Step Group**.&#x20;

{% hint style="info" %}
**Note**:&#x20;

* Once 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, and the **Element Name**, **Action** (Keyword), and **Input Value** fields automatically populate in the Test Steps.
* After dragging and dropping elements from the Element Repository into a Webservice Test Step Group, all JSON keys, including parent and nested keys along with their array values become available in the **Element Name** dropdown.
  {% endhint %}

3. Select **Save** to save the Test Steps.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F8ei8vy6TYfsHWJf8CdRK%2Fimage.png?alt=media&#x26;token=22bb7640-91b2-4441-9b86-5a00ab832ef5" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary><strong>Add Manually</strong></summary>

To add Webservice elements manually to the Test Step Group, perform the following actions:

1. On the **Test Case** tab, select the created Test Step Group.
2. Select **Add Manually** to add a new Test Step.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F4ek5IIOUMTgDW22duEBX%2Funknown.png?alt=media&#x26;token=ec9f2a20-7e67-41af-8eb7-e14a396da8e8" alt=""><figcaption></figcaption></figure>

3. Select **Add Step** (**+**) icon and select **Add step manually** to add more steps to the **Test Step Group**.

{% hint style="info" %}
**Note**: You can also add multiple Test Step by selecting the **Add Step** (**+**) icon for an individual step.
{% endhint %}

4. A new **Test Step** is created. Select the **Webservice List** as an **Element Type** and **Action** from the dropdown.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2Fc6MDObOaPMIgkI3dCHsv%2Fimage.png?alt=media&#x26;token=b704dc50-ba8f-4835-ad8c-d7cd765460bf" alt=""><figcaption></figcaption></figure>

4. Select **Save** to save the Test Steps.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FYSdzxLtAOAal12cmpaxp%2Fimage.png?alt=media&#x26;token=8b0140b0-cba5-4c5d-93a8-2fcd9dc41e8e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: To run the created Test Steps, you can either select **Debug** or create an [**Execution List**](https://docs.avoautomation.com/working-with-the-avo-assure-platform/create-and-execute-tests-with-design-studio/working-with-execution-section/execute-execution-list).
{% endhint %}

</details>

#### 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.&#x20;
* 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, to view the article, [click here](https://docs.avoautomation.com/actions/web-service-operations). &#x20;

**Other Related Links**:&#x20;

* To learn more about how to create and execute an execution list, [click here](https://docs.avoautomation.com/working-with-the-avo-assure-platform/create-and-execute-tests-with-design-studio/working-with-execution-section).&#x20;
* To learn more about how to view the API Test Case execution Reports, [click here](https://docs.avoautomation.com/working-with-the-avo-assure-platform/create-and-execute-tests-with-design-studio/working-with-reports-section).
