-
Notifications
You must be signed in to change notification settings - Fork 33
Added new documentation for "SOQL as Test Step", "Query Builder for Salesforce Testing", and "Test Salesforce Connection" #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,60 @@ | ||||||||||||||||||
--- | ||||||||||||||||||
title: "Query Builder for Salesforce Testsing" | ||||||||||||||||||
page_title: "Query Builder for Salesforce Testsing" | ||||||||||||||||||
metadesc: "Build and Test Salesforce Queries using Query Builder Tool" | ||||||||||||||||||
noindex: false | ||||||||||||||||||
order: 28.92 | ||||||||||||||||||
page_id: "Query Builder for Salesforce Testsing" | ||||||||||||||||||
warning: false | ||||||||||||||||||
contextual_links: | ||||||||||||||||||
- type: section | ||||||||||||||||||
name: "Contents" | ||||||||||||||||||
- type: link | ||||||||||||||||||
name: "Prerequisites" | ||||||||||||||||||
url: "#prerequisites" | ||||||||||||||||||
- type: link | ||||||||||||||||||
name: "Steps to use SOQL Query Builder Tool" | ||||||||||||||||||
url: "#steps-to-use-soql-query-builder-tool" | ||||||||||||||||||
--- | ||||||||||||||||||
Comment on lines
+15
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align contextual link name and URL with the actual heading - - type: link
- name: "Steps to use SOQL Query Builder Tool"
- url: "#steps-to-use-soql-query-builder-tool"
+ - type: link
+ name: "Steps to Use the SOQL Query Builder Tool"
+ url: "#steps-to-use-the-soql-query-builder-tool" 📝 Committable suggestion
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
--- | ||||||||||||||||||
|
||||||||||||||||||
Use the Query Builder in Salesforce Testing to create and run SOQL (Salesforce Object Query Language) queries without writing code. This feature allows you to retrieve Salesforce data dynamically and use it in test scenarios. This article discusses building queries for Salesforce testing in Testsigma. | ||||||||||||||||||
|
||||||||||||||||||
--- | ||||||||||||||||||
|
||||||||||||||||||
## **Prerequisites** | ||||||||||||||||||
|
||||||||||||||||||
Before you begin, ensure the Salesforce app is connected to Testsigma with a valid metadata connection. | ||||||||||||||||||
|
||||||||||||||||||
--- | ||||||||||||||||||
|
||||||||||||||||||
## **Steps to Use the SOQL Query Builder Tool** | ||||||||||||||||||
|
||||||||||||||||||
1. Open the **Salesforce Query Builder** from the test case page in the Utility Panel. | ||||||||||||||||||
|
||||||||||||||||||
2. From the **SF Connection** dropdown, select the Salesforce connection to use. | ||||||||||||||||||
|
||||||||||||||||||
3. In the **FROM** field, choose a Salesforce object (e.g., Account, Contact). | ||||||||||||||||||
|
||||||||||||||||||
4. Use the **SELECT** section to add fields (e.g., Type, RecordTypeId, Industry). The SOQL query updates automatically in the preview pane. | ||||||||||||||||||
|
||||||||||||||||||
5. Click **+ Add Condition** to filter results using **WHERE** clauses if required. | ||||||||||||||||||
|
||||||||||||||||||
6. Use **ORDER BY** and **LIMIT** to specify the order and number of records. | ||||||||||||||||||
|
||||||||||||||||||
For example, | ||||||||||||||||||
|
||||||||||||||||||
``` | ||||||||||||||||||
SELECT Id, Name, Phone, Industry, BillingCity, BillingState | ||||||||||||||||||
FROM Account | ||||||||||||||||||
WHERE Industry = 'Technology' AND BillingState = 'CA' | ||||||||||||||||||
ORDER BY Name | ||||||||||||||||||
LIMIT 50 | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
7. Click **Run Query** to execute the SOQL query. | ||||||||||||||||||
|
||||||||||||||||||
8. View the results in **Table**, **Outline**, or **JSON** format. | ||||||||||||||||||
|
||||||||||||||||||
--- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: "SOQL as Test Step" | ||
page_title: "SOQL as Test Step" | ||
metadesc: "SOQL step runs queries to fetch real-time Salesforce data." | ||
noindex: false | ||
order: 28.91 | ||
page_id: "SOQL as Test Step" | ||
warning: false | ||
contextual_links: | ||
- type: section | ||
name: "Contents" | ||
- type: link | ||
name: "Prerequisites" | ||
url: "#prerequisites" | ||
- type: link | ||
name: "Steps to Create SOQL as a Test Step" | ||
url: "#steps-to-create-soql-as-a-test-step" | ||
--- | ||
|
||
--- | ||
|
||
The SOQL step type allows you to run SOQL queries to retrieve real-time Salesforce data. You can verify specific values within your Salesforce records and store outputs as variables for reuse in subsequent steps. This article discusses using the SOQL step type for Salesforce testing in Testsigma. | ||
|
||
--- | ||
|
||
## **Prerequisites** | ||
|
||
Before you begin, ensure the Salesforce app is connected to Testsigma with a valid metadata connection. | ||
Comment on lines
+26
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Normalize headings by removing emphasis |
||
|
||
--- | ||
|
||
## **Steps to Create SOQL as a Test Step** | ||
|
||
1. From the left navigation bar, navigate to **Create Tests > Test Cases**. | ||
|
||
2. In the **Test Case Details** page, click on the test step options list and select **SOQL**. | ||
|
||
3. Select a Salesforce connection from the **Salesforce Connection** dropdown. | ||
|
||
4. Enter your SOQL query in the editor. | ||
|
||
For example, | ||
|
||
``` | ||
SELECT Id, Name, Phone, Industry, BillingCity, BillingState | ||
FROM Account | ||
WHERE Industry = 'Technology' AND BillingState = 'CA' | ||
ORDER BY Name | ||
LIMIT 50 | ||
``` | ||
Comment on lines
+44
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add language marker to SOQL snippet - ```
+ ```sql
SELECT Id, Name, Phone, Industry, BillingCity, BillingState
...
|
||
|
||
5. Click **Run Query** to fetch the results. | ||
|
||
6. View the response in **Table**, **Outline**, or **JSON** format by switching between the tabs. | ||
|
||
7. In the **Outline** tab, store values as variables or add verifications directly from the response. | ||
|
||
8. Click **Create** to save and add the SOQL step to your test case. | ||
|
||
--- | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,7 +3,7 @@ title: "Intro: Testsigma Special NLPs" | |||||||||||||||||||||||||||||
page_title: "Special NLPs" | ||||||||||||||||||||||||||||||
metadesc: "With special NLPs, you can build & enhance Salesforce tests with ease, reducing test authoring time by 50%. This article discusses the capabilities of these special NLPs" | ||||||||||||||||||||||||||||||
noindex: false | ||||||||||||||||||||||||||||||
order: 28.8 | ||||||||||||||||||||||||||||||
order: 28.9 | ||||||||||||||||||||||||||||||
page_id: "Special NLPs" | ||||||||||||||||||||||||||||||
warning: false | ||||||||||||||||||||||||||||||
contextual_links: | ||||||||||||||||||||||||||||||
|
@@ -72,6 +72,9 @@ contextual_links: | |||||||||||||||||||||||||||||
- type: link | ||||||||||||||||||||||||||||||
name: "NLP 18:" | ||||||||||||||||||||||||||||||
url: "#nlp-18" | ||||||||||||||||||||||||||||||
- type: link | ||||||||||||||||||||||||||||||
name: "NLP 19:" | ||||||||||||||||||||||||||||||
url: "#nlp-19" | ||||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||||
|
@@ -110,6 +113,10 @@ With Testsigma's special NLPs, you can scale and enhance Salesforce Testing. The | |||||||||||||||||||||||||||||
| [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 | | ||||||||||||||||||||||||||||||
| [Store the recordID from details page into variable](https://testsigma.com/docs/salesforce-testing/special-nlps/#nlp-19) | This NLP extracts the current record ID and stores it in your specified runtime variable name. <br><br> **User Inputs in NLP:** <br> 1. RECORD_ID <br> 2. Variable Name | | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
@@ -368,4 +375,16 @@ See the GIF below demonstrating how to use this NLP. | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
## **NLP 18:** | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
"Store the **recordID** from details page into **variable** [variable-name]" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Use this NLP to extract the current record ID and stores it in your specified runtime variable name. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
See the GIF below demonstrating how to use this NLP. | ||||||||||||||||||||||||||||||
Comment on lines
+380
to
+386
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix heading label for the new section --- a/src/pages/docs/salesforce-testing/special-nlps.md
@@ 380, +380
- ## **NLP 18:**
+ ## **NLP 19:** 📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.17.2)380-380: Multiple headings with the same content (MD024, no-duplicate-heading) |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
--- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: "Test Salesforce Connection Before Authorization" | ||
page_title: "Test Salesforce Connection Before Authorization" | ||
metadesc: "Test Salesforce connection before authorization in Testsigma" | ||
noindex: false | ||
order: 28.4 | ||
page_id: "Test Salesforce Connection Before Authorization" | ||
warning: false | ||
contextual_links: | ||
- type: section | ||
name: "Contents" | ||
- type: link | ||
name: "Steps to Test the Salesforce Connection" | ||
url: "#steps-to-test-the-salesforce-connection" | ||
- type: link | ||
name: "Troubleshoot" | ||
url: "#troubleshoot" | ||
--- | ||
|
||
--- | ||
Comment on lines
+1
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consolidate frontmatter and remove extra delimiters |
||
|
||
Testsigma provides a convenient way to check your Salesforce connection using either OAuth 2.0 or Username and Password authentication. You can validate your credentials without completing the full authorization flow or saving the connection. | ||
|
||
--- | ||
|
||
## **Steps to Test the Salesforce Connection** | ||
|
||
1. From the left navigation bar, click on **SF Connections**. | ||
Comment on lines
+26
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Use plain headings for anchor consistency |
||
|
||
|
||
2. In the Salesforce connections page, under the **Metadata connection** or **User connection** section, click the ellipsis icon next to the desired connection and click **Edit Connection**. | ||
|
||
3. You can also access the **Metadata Connection** dialog via **Settings > SF Metadata**. | ||
|
||
4. In the **User/Metadata Connection** dialog, click **Test Connection**. | ||
|
||
5. On the Salesforce login page, enter your username and password, then click **Log In**. | ||
|
||
6. Once your credentials are verified, you will get the **Salesforce Connection Successful** dialog. | ||
|
||
--- | ||
|
||
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in title, page_title, and page_id
The metadata fields misspell "Testing" as "Testsing", causing rendering and search inconsistencies.
Also applies to: 7-7