Skip to content

Commit

Permalink
Merge pull request #551 from testsigmahq/dev
Browse files Browse the repository at this point in the history
Updated SF NLP & Added GenAI Swagger API doc
  • Loading branch information
bharathk08 authored Dec 10, 2024
2 parents 86c8ae6 + e710b3c commit e231955
Show file tree
Hide file tree
Showing 8 changed files with 347 additions and 148 deletions.
3 changes: 2 additions & 1 deletion src/left-nav-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,5 +689,6 @@
"genai-capabilities": {"/docs/genai-capabilities/": "GenAI Capabilities" },
"generate-tdp": {"/docs/genai-capabilities/generate-tdp/": "Generate TDP Using Copilot"},
"smtp-configuration": {"/docs/configuration/smtp-configuration/": "SMTP Configuration"},
"generate-wda-file": {"/docs/configuration/generate-wda-file/": "Create WDA File" }
"generate-wda-file": {"/docs/configuration/generate-wda-file/": "Create WDA File" },
"environments": {"/docs/api/environments/": "Manage Environments"}
}
117 changes: 66 additions & 51 deletions src/pages/docs/api/environments.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ With Testsigma, you can create test cases directly from Jira stories and epics b

## **Steps to Generate Test Cases from Requirements**

1. From the left-side navbar, go to **Create Tests > Test Cases**.
1. From the left navigation bar, go to **Create Tests > Test Cases**.

2. Click **Copilot**, and then select **Generate from Requirements** from the dropdown menu.

Expand Down
53 changes: 53 additions & 0 deletions src/pages/docs/genai-capabilities/generate-tests-from-swagger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "Generate API Test Cases (Swagger)"
page_title: "Generate API Test Cases Using Swagger Schema"
metadesc: "In Testsigma, you can create test cases from swagger schema files | Learn how to create API test cases from Swagger using GenAI capabilities"
noindex: false
order: 31.5
page_id: "Generate Tests from Swagger Schema"
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Steps to Generate Test Cases from Swagger"
url: "#steps-to-generate-test-cases-from-swagger"
---

---

With Testsigma, you can now generate API test cases effortlessly by importing Swagger JSON schema files. Simply organize tags for endpoints in the Swagger JSON file, upload the file, and click once to create multiple test cases. This article discusses generating API test cases from Swagger schema files using Testsigma's GenAI capabilities.

---

> ## **Prerequisites**
>
> Before you begin, enable AI Features from **Settings > Preferences > Generative AI features**, and have a **Swagger JSON file** with tags arranged for endpoints.
---

## **Steps to Generate Test Cases from Swagger**

1. From the left navigation bar, go to **Create Tests > Test Cases**.

2. Click **Copilot**, and then select **Generate from Swagger Schema** from the dropdown menu.

3. On the **Swagger Schema based API Test Case Generation** dialog, click **Select file to import**.

4. Choose the file and click **Open**.

[[info | **NOTE**:]]
| Testsigma Copilot uses tags in the Swagger Schema file to arrange endpoints into test cases. Ensure each endpoint is associated with one or more tags before importing the file.

5. In the **Available Test Cases** section, select the test cases you want to generate and click **Generate**.

6. Wait for Testsigma to generate the test cases along with the test steps.

7. From the left panel, select all the test cases you want to include, review the API test steps, validate them, and click **Save Test Cases**.

4. You’ll be redirected to the **Test Cases** page, where the generated test cases appear under the **AI Generated Feature & Scenario**.

---
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This article discusses generating end to end automated test cases based on user

## **Steps to Test Scenarios from User Actions**

1. From the left-side navbar, go to **Create Tests > Test Cases**.
1. From the left navigation bar, go to **Create Tests > Test Cases**.

2. Click **Copilot** and choose **Test Scenarios from User Actions** from the dropdown menu. This will open the **Generate End-to-End Test Cases** dialog box.

Expand Down
33 changes: 33 additions & 0 deletions src/pages/docs/salesforce-testing/special-nlps.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ contextual_links:
- type: link
name: "NLP 17:"
url: "#nlp-17"
- type: link
name: "NLP 18:"
url: "#nlp-18"
---

---
Expand Down Expand Up @@ -108,6 +111,7 @@ With Testsigma's special NLPs, you can scale and enhance Salesforce Testing. The
| [Select option test data from element picklist](https://testsigma.com/docs/salesforce-testing/special-nlps/#nlp-16) | This NLP selects the specified option from the picklist element using test data. This NLP can also be recorded. <br><br> **User Inputs in NLP:** <br> 1. Test Data <br> 2. Element |
| [Clear and enter test data in the element field](https://testsigma.com/docs/salesforce-testing/special-nlps/#nlp-10) | This NLP will clear any existing data in the element field and then enter the test data into that field. <br><br> **User Inputs in NLP:** <br> 1. Test Data <br> 2. Element |
| [Delete record in Salesforce Object where record id is test data using Salesforce Connection connection](https://testsigma.com/docs/salesforce-testing/special-nlps/#nlp-3) | This NLP deletes a record using RECORD\_ID for a specific Salesforce object using the delete record API. <br><br> **User Inputs in NLP:** <br> 1. RECORD_ID <br> 2. User Connection<br> 3. Salesforce Object |
|[Get record details from Salesforce Object Form for RECORD\_ID test data using Salesforce Connection connection](https://testsigma.com/docs/salesforce-testing/special-nlps/#nlp-18)| This NLP will fetch record details of the Salesforce Object Form with the selected object fields. It also allows you to store Variables and add Verifications directly from the Response Body. <br><br> **User Inputs in NLP:** <br> 1. Salesforce Object Form <br> 2. RECORD_ID <br> 3. Salesforce Connection |

---

Expand Down Expand Up @@ -337,4 +341,33 @@ See the GIF below demonstrating how to use this NLP.

![Element Picklist](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/SalesforceUpdateNLP.gif)


---

## **NLP 18:**

“Get record details from **Salesforce Object Form** for **RECORD\_ID** test data using **Salesforce Connection** connection”


### **Using the NLP in a Test Case**


1. Click on **Salesforce Object Form**, choose **Record** from the dropdown menu, and click **Select Fields**.

2. On the **Manage Fields for Account** overlay, select the fields for which you want to retrieve info and click **Save**.

[[info | **NOTE**:]]
| If no fields are selected, the response body will include all available fields.

3. Go to the **Request Info** tab, enter the **Record ID** and select the available **Salesforce Connection**. You can parameterize the **Record ID** by entering a slash (**/**). Add mock values by clicking **Add Request Values** if the field is parameterized.

4. Click **Send Request**.

5. From the **Response Body**, you can store **Variables** and add **Verifications** directly as needed.


See the GIF below demonstrating how to use this NLP.

![Get Record Details](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/SF_Read_API.gif)

---
Loading

0 comments on commit e231955

Please sign in to comment.