Header

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

This guide introduces you to a pivotal component of Qualitia Automation Studio (QAS) – Salesforce Application and covers its core features, from the intuitive recording toolbar to the advanced verification steps, mouse hover actions, browser simulations, and the dynamic locator type priority. Let’s discover how the Salesforce application can redefine your test automation experience.

📚Prerequisites

  1. User should have the QAS - Client installed.

  2. Enable the feature flags.

  3. The project needs to be Salesforce.

  4. User should create Connect App in Salesforce.

Establishing connection with the Salesforce application

To start using the Salesforce application, you need to first establish a connection between QAS - Client and the Salesforce application you a willing to use.

Follow the below steps to establish the connection:

  1. Login to Qualitia Automation Studio (QAS) - Client.

  2. Access Settings from left navigation to view the Settings screen. On the Settings screen, select Project Configuration.

  3. Expand Project Configuration and click Salesforce to open Salesforce Connections screen.

    image-20240704-172427.png
  4. On the Salesforce Connections screen, you can see all the previously established connection, if any, and also search for one by the Connection Name using the Search option.

  5. To create a new connection, click New. This will open the New Salesforce Connection window.

  6. You can establish the connection by choosing one of following:

    1. Login using OAuth: To login using this method enter the below details.

      image-20240802-092158.png
      1. Connection Name: Enter an intuitive name for the connection that is easy to recognize.

      2. Salesforce URL: Enter the Salesforce application URL. It should be a Classic URL.

      3. Client ID: Enter the Consumer Key generated from the Connected App. Refer Create Connected App in Salesforce for more info.

      4. Client Secret: Enter the Consumer Secret generated from the Connected App. Refer Create Connected App in Salesforce for more info.

    2. Login using Salesforce URL:

      1. Connection Name: Enter an intuitive name for the connection that is easy to recognize.

      2. Salesforce URL: Enter the Salesforce application URL. It should be a Classic URL.

      3. Username: Enter the username registered with the Salesforce application.

      4. Password: Enter the password for logging into the Salesforce application.

      5. Security Token: Enter the Security Token generated using the Salesforce application. Refer Steps to Generate Security Token for more details.

      6. Environment

      image-20240802-093216.png

  7. Click Connect.

The Enable Client Credentials Flow checkbox should be checked to establish a successful connection. You will find this option under the API (Enable OAuth Settings) on the Connected App.

When one user is editing a connection another user cannot edit, delete, or work with that connection.

Create Connected App in Salesforce

  1. Log in to Salesforce as an administrator.

  2. Click Setup from the upper-right corner of the Salesforce application screen.

  3. Navigate to App Manager from the left pane and click New Connected App.

  4. Enter the details in the required fields under Basic Information on the New Connected App page.

    • Connected App Name (e.g., Qualitia Integration)

    • API Name (e.g., Qualitia Integration)
      Note that the API Name will be auto populated as Connect App Name.

    • Contact Email

  5. Enable OAuth Settings under API:

    • CreateSelect Enable OAuth Settings.

    • Enter https://login.salesforce.com/ in the Callback URL field.

    • Select Manage user data via APIs (api) in the Selected OAuth Scopes field and click Add.

  6. Click Save to create the new Connected App.

  7. Navigate to the Connected Apps list and click Manage.

  8. On the Manage screen, go to OAuth Policies and click Edit

    • Under Permitted Users, select All users may self-authorize.

    • Click Save to save the changes.

  9. Go back to the Connected Apps list and click the App you just created.

  10. In the API (Enable OAuth Settings) section, you will find the Consumer Key and Consumer Secret which will be required for configuring Credentials in Qualitia Integration.

    image-20240806-074214.png

Take a note of the Consumer Key and Consumer Secret for configuring credentials in Qualitia Integration.

Edit a Connection

You can edit a connection from the Settings tab, or from the Object Repository.

Edit a connection from the Settings tab:

  1. Access Settings from left navigation to view the Settings screen. On the Settings screen, select Project Configuration.

  2. Expand Project Configuration and click Salesforce to open Salesforce Connections screen.

  3. On the Salesforce Connections screen, you will see the list of connections.

  4. Click the Pencil icon at the right to edit the connection.

  5. Update the required changes and click Connect.

    image-20240806-084114.png

Edit through Object Repository

For Salesforce project we have two object repositories.

  1. Qualitia Objects: The objects that are created using Recorder, Web ObjectSpy, or manual object creation will be available under this repository.

  2. Salesforce: The objects that are obtained from Salesforce application by using the established connection can be found under Salesforce repository.

Steps to edit using object Repository:

  1. Go to Object Repository.

  2. Expand the Salesforce tab to view the list of the connections.

  3. Click the Settings icon on the right-hand corner of the connection you are willing to edit.

    image-20240806-090301.png

If your password or Security Token is expired the connection will be failed. And in this case, you can edit the connection from the Change Management tab.

image-20240806-090945.png

Import Object

Salesforce also provide the provision to import objects. There are two scenarios in which you can import the objects, for a) New connection and b) Existing connection.

New Connection

Fresh connection where no objects are imported before. In this case, you will see Import Objects option below the connection.

  1. Click Import Objects to open the Import Salesforce Objects window.

  2. You will see two options StandardButtons and the connection fields.

    image-20240806-111047.png
  3. Import the Standard Buttons if not done before.
    Importing standard buttons is a one-time process. Once you have imported the standard buttons, it can be used for all the connections.

  4. Expand the connection by clicking on the arrow to view all the objects and fields available for the connection.

  5. Select the objects you want to import and click Import.

    image-20240806-112001.png
  • The mandatory fields will be marked with an asterisk.

  • You can import multiple objects and fields at a time. Select all the objects along with its fields and click Import.

Existing Connection

Already established connection where objects have been imported before. In this case, you will see an Import Object option next to Edit Connection. You can reimport the objects using this option.

  1. Click Import Object to open the Import Salesforce Objects window.

    image-20240806-092726.png
  2. Expand the connection by clicking on the arrow to view all the objects and fields available for the connection.

  3. Select the objects you want to import and click on Import.

You won’t be able to import the already imported objects and it will be in disabled form.

Create Salesforce API Object

To create SFDC API object follow the below steps:

  1. Go to Object Repository.

  2. Click New API Object option for the connection as shown in the image below.

    image-20240807-055027.png
  3. Clicking New API Object will open the Create Salesforce API Object screen.

  4. On the Create Salesforce API Object screen, enter the details such as:

    • Name: Enter the API name.

    • Salesforce Object: Select the Salesforce object form the dropdown. You will see list of all the imported objects here.

    • Operation: Choose the operation you want to perform on the object.

    • Description: Add desired description for the API.

      image-20240807-055556.png
  5. Once the Salesforce Object and Operation fields are selected, the Dataset and Validation Rules tabs will be enabled.

  6. Now to perform the operation, you need to provide the dataset. Go to the Dataset tab and provide the details.

    image-20240807-061735.png

    Note: All the mandatory fields (marked with asterisk) in the application will be fetched in default dataset. Dataset: 1 in the above image is the default dataset.

  7. To add more dataset, click the + icon from the top-right corner.

  8. Click on the three dots to:

    • Edit: Edit the dataset.

    • Duplicate: Create duplicate dataset.

    • View JSON: View JSON for the dataset.

    • Delete: Delete the dataset, only if there are more than one dataset.

    image-20240807-064233.png
  9. Click Test from the top-right corner to test the request.

  10. Clicking Test will open a Response screen (as shown below), where you can view the test results. You can view the result in JSON or Text format.

    image-20240807-063145.png
  11. You can also view the result on the Salesforce application. The data will be fetched, and a JSON will be created on the Salesforce application.

  12. Click Validation Rules tab to create a validation rule for an object.

    1. When no Validation Rule exist, you are prompted to Create a validation set.

    2. You can also click + Create Validation Set from the top-right corner of the tabular section.

    3. Clicking Create will open a Create Validation Set window with the following fields: 

      1. Name: Enter an intuitive name for the validation set that is easy to recognize.
        Maximum length permitted is 300 characters including spaces.

      2. Description: A brief description about the suite.

    4. Click Save to proceed; otherwise, click Cancel.

    5. You can now add validation rules under the Validation Set.

      1. Click Add Validation Rule from the validation set you created.

      2. Clicking Add Validation Rule will open a Create Validation Rule window with the following fields:

        • Rule Name: Enter an intuitive name for the validation rule that is easy to recognize.
          Maximum length permitted is 300 characters including spaces.

        • Rule Type: You can select one of the three rule types.

          • Status Code: Select Status Code and provide the Expected Status Code to validate against it.

            image-20240807-074716.png
          • Response Time: Select Response Time and enter the Response Time Witnin to get the expected response in time. This value should be in milliseconds.

          • Property-Value: Selecting Property-Value will open few more fields:

            • Field Name: Enter the field name that is available for the object.

            • Field Type: Select the field type from the dropdown, Text, Boolean, or Integer.

            • Match Field Value: Select Exact Match or Contains from the dropdown as per your requirement. Exact Match will look for the same field value provided.

            • Value: Enter the field value you want to be in your response.

              image-20240807-085248.png

            • Select the check box Store field value as if you want to store the response as a Key.

        • Click Test Rule to validate the created rules.

Steps to Generate Security Token

Please generate the security token for all the users by following the below steps.

  1. Login to Salesforce and go to Personal Settings.

  2. In the Quick Find box, type "Reset" and click Enter.

  3. From the search results, select Reset My Security Token.

  4. You'll be directed to a page or option where you can reset the security token.

  5. Click on the option or button labeled Reset Security Token.

  6. After clicking, Salesforce will generate a new security token for you.

  7. Check the email address associated with your Salesforce personal settings. You might have received an email containing the new Security Token.

  8. Note down or copy the Security Token from the email.

  9. You can now use this security token for authenticating with Salesforce or any integrations that require it.

In cases such as change password or reset token, user must regenerate the token and update the connection in Qualitia.

APIs Used

QAS uses certain APIs to get access to the application data. The following are the categories of APIs used:

Metadata APIs

Item

Description

Entry Point

https://{base}/services/data/v{Version}/

API Access required in connected App

Metadata API Edit Access or Full access

Reference link on all APIs

Result Objects | Metadata API Developer Guide | Salesforce Developers

Metadata APIs

Item

Description

Entry Point

https://{base}/services/data/v{Version}/

API Access required in connected App

API Enabled permission or Full access

Reference link on all APIs

Versions | REST API Developer Guide | Salesforce Developers

Connection APIs

Basic authentication

Item

Description

SOAP Entry point – URL base

{{_endpoint}}/services/Soap/m/{{version}}

API Access required in connected App

OAuth flows

Reference link on all APIs used

API Call Basics | SOAP API Developer Guide | Salesforce Developers

OAuth Authentication

Item

Description

Entry point

https://login.salesforce.com/services/oauth2/token

API Access required in Connected App

Download AppExchange Packages AND Customize Application AND either.
Modify All Data OR Manage Connected Apps

Reference link on all APIs used

Manage OAuth Access Policies for a Connected App (salesforce.com) 

💡 Golden Nuggets: Best Practices to Establish Connection Between Salesforce and Qualitia

There are 2 ways to Establish a connection between Salesforce and Qualitia.

  • Using salesforce URL- for this we need Salesforce URL, Username, Password and security token.

  • Using O-auth- for this we need Salesforce URL, Username, Password, Client Id, Client Secret.

🔧 Got a problem? Let’s fix!

  1. Issue: Unable to find “Reset My Security Token” Information or “Your security token isn’t displayed in your settings or profile.”
    Solution:
    Qualitia Client
    Standard Resolutions for the above are:

    • Restriction enabled in connected App

      • Go to Setup

      • Search for “Manage App”

      • Select your connected app

      • Click on “Edit Policy”

      • In the Trusted IP Range for OAuth Web server flow section

      • Select “No Restriction”/ “Anyone can connect” or enter the right restrictions as per your policy.

    • IP Restrictions in the Login IP Ranges

      • For the Reset My Security Token option to appear you will need to remove the Login IP Ranges or change the User to a profile that does not have Login IP Ranges listed.

    • In Salesforce Classic

      • Unlimited, Performance or Enterprise, system administrators can verify if there are IP values in the Login IP ranges by selecting:
        Setup -> Manage Users -> Users -> Profile -> Profile name -> Login IP Ranges.

      • System administrators can verify if there are IP values in the Login IP ranges by selecting:
        Setup -> Security Controls -> Session Settings.

      • Remove the IP ranges if required.

    • In Lightning Experience

      • System administrators can verify if there are IP values in the Login IP ranges by clicking going on the gear icon:
        Setup Home -> Users -> Profiles -> select the profile name -> Login IP Ranges.

      • System administrators can verify if there are IP values in the Login IP ranges by clicking going on the gear icon:
        Setup Home -> Security -> Session Settings.

    • Network Access is missing

      • System administrators can confirm if Network Access is missing by following these steps:

        • Go to Setup

        • On the Quick Find box, enter Network Access.

        • Login Challenge Enabled

        • Login with API Token
          OR

        • Delete the IP address range in the network access.

      • Forcefully reset by hitting the following URL:

        • § /_ui/system/security/ResetApiTokenEdit

  2. Not able to load the SFDC project after an upgrade: If you are not able to load the SFDC project after an upgrade to Qualitia’s latest version, you need to delete the Workspace folder. You can find the workspace folder on the below path: C:\Users\user1\AppData\Local\Qualitia Automation Studio - Client\workspace.

  3. Newly added objects are not visible on Import model: If you are not able to find a newly added object on the import model, while creating an object create it as mandatory and save. Once the object is saved, make it non-mandatory, as only mandatory fields are visible on the Import modal. This will make the object visible and ready to be used.

  4. When you create a new connection using the Salesforce application and try to import objects, you will see additional object entries under the Import Object section.

📞📚 Here to Help: Support and Resources

If you have questions that are not addressed in the documentation, you may raise them in the Qualitia Community.

  • No labels