Skip to content

Commit

Permalink
Merge pull request #459 from testsigmahq/dev
Browse files Browse the repository at this point in the history
Added AI and Mock API docs
  • Loading branch information
bharathk08 authored Jul 23, 2024
2 parents a75b9d1 + df86330 commit 042d971
Show file tree
Hide file tree
Showing 38 changed files with 7,894 additions and 75 deletions.
3 changes: 2 additions & 1 deletion src/left-nav-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -681,5 +681,6 @@
"record-elements": {"/docs/elements/mobile-web-application/record-elements/": "Record Multiple Elements" },
"add-test-cases-for-mobile-web-app": {"/docs/test-cases/manage/add-test-cases-for-mobile-web-app/": "Test Cases (Mobile Web App)" },
"most-common-issues": { "/docs/troubleshooting/salesforce-testing/most-common-issues/": "Most Common Issues" },
"developer-mode-for-ios": {"/docs/troubleshooting/mobile-apps/developer-mode-for-ios/": "Developer Mode (iOS 16 & Above)" }
"developer-mode-for-ios": {"/docs/troubleshooting/mobile-apps/developer-mode-for-ios/": "Developer Mode (iOS 16 & Above)" },
"mock-apis": {"/docs/test-cases/create-steps-restapi/mock-apis/": "Mock API Support" }
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ contextual_links:
---

---

Adding body data in RESTful API testing is the process of sending additional data to the server in the body of the request. You will need to send body data with requests whenever you need to add or update structured data. For example, if you're sending a request to add a new customer to a database, you might include the customer details in **JSON**. Typically, you will use body data with **PUT**, **POST**, and **PATCH** requests.

[[info | NOTE:]]
Expand Down
62 changes: 62 additions & 0 deletions src/pages/docs/test-cases/create-steps-restapi/mock-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: "Mock API Support in Testsigma"
page_title: "Mock API Support in Testsigma"
metadesc: "Learn how to handle mock APIs and experiment with the different types of test data | Testsigma allows you give inputs while mocking an API in Testsigma"
noindex: false
order: 4.993
page_id: "Mock APIs"
search_keyword: ""
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Adding Various Inputs for Mock APIs"
url: "#adding-various-inputs-for-mock-apis"
---

---

The goal of mocking an API is to ensure that users can experiment with the data before authoring the API step. With Testsigma, users can select default and custom values associated with each key for various variables, such as parameters, runtime, environment, random data generator, phone number, and mailbox, and verify responses.

This article discusses providing test data inputs while mocking an API in Testsigma.

---

> ## **Prerequisites**
>
> - You should know how to [create a Test Case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/#creating-a-test-case).
>
> - You should know how to [add Rest API in the test steps](https://testsigma.com/docs/test-cases/step-types/rest-api/#add-restful-api-in-test-steps).
---

## **Adding Various Inputs for Mock APIs**

1. From the left-side navbar, select **Create Tests > Test Cases** and then click **Create Test Case**.

2. On the **Test Case Details** page, click the option next to the test step and select **Rest API**.

3. Click on the test step to open the **Rest API** window.

4. Enter the **Title**, choose the **Method**, and enter the **Endpoint**.

5. Select the data you want to parametrize and click **Insert Test Data**.

6. Choose the test data type you want to add (e.g., **@Parameter**).

7. Click **Add Request Values**. The **Request values** overlay will open.

8. In the **Request Values** overlay, click **URL**, add the value to the parameter in the **URL**, and click **Apply**.

9. Click **Send** and verify the response received from the API.


Here’s a quick GIF demonstrating an example of adding an input for mocking API.

![Mock APIs](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/MockAPI.gif)

---
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Resources"
url: "#resources"
Expand All @@ -21,9 +24,11 @@ Testsigma supports Restful APIs Testing. RESTful APIs allow you to access resour

---

### **Prerequisites**

You'll need to know how to [create a test case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/#creating-a-test-case) and [add RESTful API in the test steps](https://testsigma.com/docs/test-cases/step-types/rest-api/#add-restful-api-in-test-steps).
> ## **Prerequisites**
>
> - You should know how to [create a Test Case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/#creating-a-test-case).
>
> - You should know how to [add Rest API in the test steps](https://testsigma.com/docs/test-cases/step-types/rest-api/#add-restful-api-in-test-steps).
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ contextual_links:
---

---

Stored objects have **GLOBAL** scope, which can be used for cross-test case verification. Objects can be saved using the Rest API. Stored objects in RESTful API testing refer to the data that is stored in the database and is used to test the API. This data can include user accounts, product information, and other data that is used to test the API. The stored objects are used to ensure that the API is functioning correctly and that the data is being returned correctly. You can **download** objects from **save response** and **stored objects** tab.

---

## **Store Objects from Save response**

1. **Send** an API request, and at the bottom of the screen, the **response body** will appear for the request you sent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Using Bulk Actions in Testsigma simplifies managing multiple test steps. You can

---

## **Prerequisites**

- You should know about [projects](https://testsigma.com/docs/projects/overview/) in Testsigma.

- You should know how to [manage a test case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/).

- You should know how to [manage test steps](https://testsigma.com/docs/test-cases/step-types/natural-language/).
> ## **Prerequisites**
>
> - You should know about [Projects](https://testsigma.com/docs/projects/overview/) in Testsigma.
>
> - You should know how to [manage a Test Case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/).
>
> - You should know how to [manage Test Steps](https://testsigma.com/docs/test-cases/step-types/natural-language/).
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Test Step Options"
page_title: "Test Step Options | Testsigma Documentation"
page_title: "Test Step Options"
metadesc: "Explore Testsigma's Test Step Options - Configure, manage, and optimise your test steps efficiently. Enhance testing workflow with customisation and control."
noindex: false
order: 4.611
Expand Down Expand Up @@ -47,10 +47,12 @@ In Testsigma, you can customize test steps within a test case using test step op

---

## **Prerequesties**

- You should know how to create **test steps** and [manage a test case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/).

> ## **Prerequisites**
>
> - You should know how to [manage a Test Case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/).
>
> - You should know how to [manage Test Steps](https://testsigma.com/docs/test-cases/step-types/natural-language/).
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Test Step Settings for Test Cases"
page_title: "Test Step Settings | Testsigma Documentation"
page_title: "Test Step Settings"
metadesc: "Configure wait times, retries, visuals, and other settings for efficient test automation in Testsigma using Test Step Settings and customise test execution."
noindex: false
order: 4.612
Expand All @@ -26,14 +26,13 @@ Controlling the behavior of each test step can be important to enhance your test

---

## **Prerequisites**


- You should know about [projects](https://testsigma.com/docs/projects/overview/) in Testsigma.

- You should know how to [manage a test case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/).

- You should know how to [manage test steps](https://testsigma.com/docs/test-cases/step-types/natural-language/).
> ## **Prerequisites**
>
> - You should know about [Projects](https://testsigma.com/docs/projects/overview/) in Testsigma.
>
> - You should know how to [manage a Test Case](https://testsigma.com/docs/test-cases/manage/add-edit-delete/).
>
> - You should know how to [manage Test Steps](https://testsigma.com/docs/test-cases/step-types/natural-language/).
---

Expand Down
59 changes: 59 additions & 0 deletions src/pages/docs/test-cases/create-test-steps/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ contextual_links:
- type: link
name: "Creating Test Steps Using Test Recorder"
url: "#creating-test-steps-using-test-recorder"
- type: link
name: "AI Test Automation with Testsigma Copilot"
url: "#ai-test-automation-with-testsigma-copilot-"
- type: link
name: "Generate Test Scenarios"
url: "#generate-test-scenarios"
- type: link
name: "Generate Test Steps with Prompts"
url: "#generate-test-steps-with-prompts"
---

---
Expand Down Expand Up @@ -170,4 +179,54 @@ Here's a sample GIF demonstrating creating test steps using the recorder for a W

![Record Test Steps for WebApps](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/RecordStepswappsWF.gif)

---

---

## **AI Test Automation with Testsigma Copilot 🚀**

Testsigma Copilot redefines test automation with the power of generative AI.

- You can effortlessly create diverse test scenarios with a single click.
- Generate detailed test steps that accurately mimic real-world user behavior with the right UI elements and complex user interactions.
- Create a comprehensive test case using simple prompts.

Boost your test automation and deliver high-quality software with Testsigma Copilot 🤖.

---

## **Generate Test Scenarios**

1. From the left-side navbar, select **Create Tests > Test Cases** and then click **Create Test Case**.

2. On the **Test Case Details** page, enter a name for the test case and click **Record** in the top-right corner. A new window will open.

3. In the opened window, input the URL of the web page from which you want to generate test scenarios. The **Testsigma Recorder** will activate and prepare for recording.

4. Click **Generate Scenarios** in the Testsigma Recorder. The Testsigma Copilot will start generating test scenarios based on the current page content.

5. Wait until the test scenarios are generated.

6. Click on any generated test case scenario to view its corresponding test steps.

7. Click **Save Test Steps** to import the displayed test steps into the recorder.

8. Modify the test steps as per the desired test case behavior. Once the necessary modifications are done, click **Stop** to return to the test case details page.

---

## **Generate Test Steps with Prompts**

Follow the steps from 1-3 from the above section.

4. Click **Write Prompt** in the Testsigma Recorder.

5. Enter a prompt with accurate details and click **Generate**.

6. Wait until the test steps are generated.

7. Click **Save Test Steps** to import the displayed test steps into the recorder.

8. Modify the test steps as per the desired test case behavior. Once the necessary modifications are done, click **Stop** to return to the test case details page.

---
10 changes: 5 additions & 5 deletions src/pages/docs/test-cases/manage/add-edit-delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ contextual_links:
- type: link
name: "Recover Deleted Test Case"
url: "#recover-deleted-test-case"

---

---
Expand All @@ -36,9 +35,9 @@ Testsigma provides a comprehensive and user-friendly solution for efficiently cr

---

## **Prerequisites**

- Ensure you create a [project](https://testsigma.com/docs/projects/overview/) before creating test cases in Testsigma.
> ## **Prerequisites**
>
> Ensure you create a [Project](https://testsigma.com/docs/projects/overview/) before creating Test Cases in Testsigma.
---

Expand Down Expand Up @@ -136,4 +135,5 @@ Use the right-side navbar on the **Test Case Details** page to access Advanced O
[[info | NOTE:]]
| Deleting the test case permanently will result in losing all Run reports and associated configurations.

---

---
5 changes: 3 additions & 2 deletions src/pages/docs/test-cases/manage/import-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ You can easily use test case import and export to populate a new Testsigma proje

---

## **Prerequisites**
- You should know how to [manage projects](https://testsigma.com/docs/projects/overview/).
> ## **Prerequisites**
>
> - You should know how to [Manage Projects](https://testsigma.com/docs/projects/overview/).
---

Expand Down
6 changes: 3 additions & 3 deletions src/pages/docs/test-cases/manage/import-from-yaml-or-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ You will understand how to import projects from Test Project using YAML/GIT and

---

## **Prerequisites**

Before using the import from Test Project in Testsigma, ensure that you are familiar with exporting the Test Project file as a YAML/Zip of the project or a GitHub repository for your project.
> ## **Prerequisites**
>
> Before using the import from Test Project in Testsigma, ensure that you are familiar with exporting the Test Project file as a YAML/Zip of the project or a GitHub repository for your project.
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Testsigma simplifies API test case migration by seamlessly importing Collections

---

## **Prerequisites**

Before using the import of Postman Collections and Environments in Testsigma, ensure that you are familiar with exporting Postman [Collections](https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/#export-collections), [Environments](https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/#export-environments), and [Data Dumps](https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/#export-data-dumps) and understand the [Mapping Format](https://testsigma.com/docs/test-cases/manage/import-postman-to-testsigma/#mapping-format-for-postman-collection-and-environment) for Importing Postman Collections.
> ## **Prerequisites**
>
> Before using the import of Postman Collections and Environments in Testsigma, ensure that you are familiar with exporting Postman [Collections](https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/#export-collections), [Environments](https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/#export-environments), and [Data Dumps](https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/#export-data-dumps) and understand the [Mapping Format](https://testsigma.com/docs/test-cases/manage/import-postman-to-testsigma/#mapping-format-for-postman-collection-and-environment) for Importing Postman Collections.
---

Expand Down
1 change: 1 addition & 0 deletions src/pages/docs/test-cases/manage/list-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ contextual_links:
You can efficiently manage and organise your test cases in Testsigma through the Test Case List Actions. The Test Case List Actions allows you to easily search, sort, filter, and save your test cases.

---

## **Search Test Cases**

Click inside the **Search** bar in the top right corner of the **Test Case List** page and type the name of the Test Case you want to find. As you type, Testsigma will show you matching test cases. View the test case you want by clicking on it in the search results ![Search-Test-Cases](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/search_testcases.gif)
Expand Down
Loading

0 comments on commit 042d971

Please sign in to comment.