Skip to content

Commit

Permalink
Added error handling & activity logs for SF (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathk08 authored May 20, 2024
1 parent d0d8512 commit 685b34c
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/left-nav-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,5 +670,8 @@
},
"locator-precedence":{
"/docs/elements/locator-precedence/": "Locator Precedence (Web Apps)"
},
"error-handling": {
"/docs/salesforce-testing/error-handling/": "Error Handling On Metadata Refresh"
}
}
78 changes: 78 additions & 0 deletions src/pages/docs/salesforce-testing/error-handling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: "Error Handling Post Metadata Refresh"
page_title: "Error Handling Post Metadata Refresh"
metadesc: "On refreshing metadata, Testsigma identifies potential errors in test cases, step groups and elements linked to updates in the Salesforce organization structure"
noindex: false
order: 27.9
page_id: "Error Handling Post Metadata Refresh"
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Steps to Check Errors in Test Case List Page"
url: "#steps-to-check-errors-in-test-case-list-page"
- type: link
name: "Steps to Resolve Errors in Test Case"
url: "#steps-to-resolve-errors-in-test-case"
---

---

On metadata refresh, Testsigma identifies potential causes of test case failures due to Salesforce organization structure updates, such as removing a field. This article discusses steps to identify errors due to metadata refresh on test cases, step groups, and the element repository.


---

## **Prerequisites**

- A Salesforce connected app. For more information, refer to [creating a connected app](https://testsigma.com/docs/salesforce-testing/connected-app/).

- You should know how to [refresh metadata](https://testsigma.com/docs/salesforce-testing/metadata-connections/#steps-to-refresh-metadata-connection).

---


## **Steps to Check Errors in Test Case List Page**

1. From the **Dashboard**, navigate to **Create Tests > Test Cases**.
![Test Cases](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehtcpagehl.png)

2. You can find the impacted test cases highlighted on the **Test Cases** page with a Warning.
![Warning](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehtcrp.png)

3. Click on **View All** to filter only the deprecated test cases.
![View All](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehtcrpva.png)

4. Alternatively, select the highlighted filter to display test cases that contain errors.
![Filter](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehfilter.png)
---

## **Steps to Resolve Errors in Test Case**

1. Select the deprecated test case to view the errors.
![Erorrs](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehtcspagerrs.png)

2. Hover over to the highlighted step to check the error.
![Highligted](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/eheitslvl.png)

3. Hover over the element and click on **View/Edit element**.
![View/Edit Element](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehitcvoeel.png)

4. This will open the **Element details** overlay where you can find the details of deprecated elements.
![Element Details](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehedol.png)

5. To resolve the error, replace them with new elements or disable/remove the test step as needed.
![Disable/Review](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ehvoeelement.png)

[[info | **NOTE**:]]
| This feature is also available at the **Step Group** level.

Here's a quick GIF demonstrating how to check errors due to metadata refresh in Testsigma.

![View Errors](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/Errorhandling.gif)

---
33 changes: 25 additions & 8 deletions src/pages/docs/salesforce-testing/metadata-connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ contextual_links:
- type: link
name: "Steps to Refresh Metadata Connection"
url: "#steps-to-refresh-metadata-connection"
- type: link
name: "Activity Logs"
url: "#activity-logs"
---

---
Expand All @@ -39,10 +42,10 @@ In Testsigma, you can create a Salesforce application and establish a Metadata c
## **Steps to Create Metadata Connection**

1. Click on **Create metadata connection** on **Salesforce connections page**.
![Create Metadata](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdcm.png)
![Create Metadata](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdcm.png)

2. This will open the **Metadata connection** prompt.
![Prompt](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmaprm.png)
![Prompt](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmaprm.png)

3. On **Metadata connection** prompt,
- Enter **Connection name**, which is generally the user role you connect through, e.g., **Admin**.
Expand Down Expand Up @@ -78,20 +81,20 @@ There are two ways to Authenticate:
![Wait](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdsipg.png)

4. Once Metadata sync is successful, you can create test cases by clicking **Create Test Case**.
![Create Tests](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdctc.png)
![Create Tests](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdctc.png)

---

## **Steps to Edit Metadata Connection**

1. From the **Dashboard**, click on **SF Connections**.
![Edit Metadata](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdedt.png)
![Edit Metadata](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdedt.png)

2. In the **Metadata connection** section, hover over the connection, click on the kebab menu, and choose **Edit connection** from the dropdown menu.
![Edit Connection](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdec.png)
![Edit Connection](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdec.png)

3. On the **Metadata connection** prompt, make the necessary changes and click on **Authorise & Connect**.
![Metadata Connection](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdecetd.png)
![Metadata Connection](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdecetd.png)

[[info | **NOTE**:]]
| You can not update the Metadata connection with a different environment.
Expand All @@ -103,9 +106,23 @@ There are two ways to Authenticate:
To refresh metadata, you have two options:

1. From the **Dashboard**, go to **SF Connections** and click on **Refresh Metadata**.
![Refresh](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdref1.png)
![Refresh](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdref1.png)

2. Click on **Refresh Metadata** directly from the dashboard.
![Refresh](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdref2.png)
![Refresh](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sfmdref2.png)

---

## **Activity Logs**

The activity log tab on the connection details page displays the information about all metadata sync triggers status, and the start time of metadata edit/refresh triggers. This article discusses the activity logs in the Salesforce metadata connection.

### **Steps to View Metadata Activity Logs**

1. Navigate to **SF connections** and click on **Activity log**. This will open the **Activity log** dialog.
![Activity Log](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/acvtlognav.png)

2. The **Activity log** dialog displays information regarding past metadata sync triggers.
![Logs](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/logsdisplay.png)

---
7 changes: 7 additions & 0 deletions src/pages/docs/salesforce-testing/sf-test-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ Here, we open the edit form with the record ID stored in the variable in the pre
5. Click on **Record**. This will open a Chrome window along with the test recorder. All the steps will be executed up to that point, and you can start recording UI interactions by clicking on the play icon.
![Record](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sftccor.png)

[[info | **NOTE**:]]
| When recording test steps through the debugger, if you switch to other organizations for which metadata is not synced, the debugger treats the application as any other web application. A warning will notify you of this, and you can continue recording test steps or elements similar to web applications by clicking **Okay, Got it**.
|
|![Warning](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/alrtonorgswtch.png)



6. Perform the actions and click on **Stop Recording**. This will open the **Stop Web Debugger** warning prompt.
![Stop Recording](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/sftcdbp.png)

Expand Down

0 comments on commit 685b34c

Please sign in to comment.