Skip to main content
No Result Found
Connect and get help from 7,000+ developers on our Discord community. Ask the CommunityAsk the Community

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:

  1. Navigate to Settings in the Salesforce Test Automation dashboard and click + New Organisation. New organization
  2. Select the Environment type:
    • Sandbox (recommended)
    • Production Connect to Salesforce using OAuth 2.0
  3. Enter a unique Organization name to identify your Salesforce environment. For example, BrowserStack Sandbox or BrowserStack Production.
  4. Click Connect. You will be redirected to the Salesforce login page.
  5. Enter the credentials and click Log In to Sandbox. Login to Salesforce

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:

  1. Navigate to Settings.
  2. In the required Organization card, click + Add Persona. Add persona button for the organization
  3. In the Persona field, enter a name to identify this user (for example, Sales Manager or Standard User).
  4. Click Login with Salesforce Authentication. You will be redirected to the Salesforce login page. Add persona using OAuth
  5. 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:

  1. Navigate to Settings.
  2. In the required Organization card, Click + Add Persona. Add persona button for the organization
  3. In the Persona field, enter a name to identify this user. This is mandatory.
  4. Click Login with Username & Password. Add persona using username and password
  5. Enter the Username and Password for the Salesforce user account.
  6. 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





Thank you for your valuable feedback

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle