Connect your Salesforce organization
Learn how to connect your Salesforce organization to BrowserStack for Salesforce Test Automation.
Connecting your Salesforce organization is the first step to start running automated tests with BrowserStack Salesforce Test Automation. Once connected, you can create personas, run tests across environments, and validate user experiences for different roles.
Before you begin, familiarize yourself with these key concepts:
- Salesforce environments: You can connect to either Sandbox (recommended for testing) or Production environments. Sandbox is safe for development and does not affect production data.
-
Adding an organization (initial connection):
- System Administrator account: Provides access to the Login As feature, which allows you to impersonate other Salesforce users during your session.
- Non-admin account (with API permissions): Allows you to establish a connection successfully, but the Login As feature will not be available.
-
Personas: Personas are Salesforce user accounts used during test execution. They allow you to simulate how different users with different roles, permissions, and access levels interact with your application.
The administrative requirements listed above apply only to the initial organization setup. Once an organization is connected, you can add personas using any Salesforce profile.
Connect to a Salesforce organization
You can connect your Salesforce organization using one of the following methods:
- OAuth 2.0
- Connected App
Using OAuth 2.0
Use OAuth 2.0 to securely connect your Salesforce organization to BrowserStack without sharing your credentials. This method is recommended for most users.
To connect your Salesforce organization:
- Navigate to Settings in the Salesforce Test Automation dashboard and click + New Organisation.
- Select the Environment type:
- Sandbox (recommended)
- Production
- Enter a unique Organization name to identify your Salesforce environment. For example, BrowserStack Sandbox or BrowserStack Production.
- Click Connect. You will be redirected to the Salesforce login page.
- Enter the credentials and click Log In to Sandbox.
After authorization, your Salesforce organization appears in the Organization drop-down on the home page.
Using Connected App
You can also connect your Salesforce organization using a Connected App. A Connected App is a Salesforce application that enables external applications, like BrowserStack, to integrate with Salesforce using secure authentication protocols.
For detailed steps to create a Connected App and complete the integration, see Creating a Connected App for Salesforce Test Automation.
Add personas
You can add a persona using either Salesforce OAuth or username and password authentication.
Add a persona using OAuth
To add a persona using OAuth:
- Navigate to Settings.
- In the required Organization card, click + Add Persona.
- In the Persona field, enter a name to identify this user (for example,
Sales ManagerorStandard User). - Click Login with Salesforce Authentication. You will be redirected to the Salesforce login page.
- Log in with the credentials of the user you want to add as a persona.
The persona becomes available for test execution. The USED IN column shows how many tests currently use each persona.
Add a persona using username and password
To add a persona using username and password:
- Navigate to Settings.
- In the required Organization card, Click + Add Persona.
- In the Persona field, enter a name to identify this user. This is mandatory.
- Click Login with Username & Password.
- Enter the Username and Password for the Salesforce user account.
- Click Save.
The persona becomes available for test execution.
Next steps
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!