26.20 Salesforce Impact Analysis
Salesforce API Impact Analysis
Now, Web APIs are developed with latest enhancements across new builds (new versions). Before implementing newly developed Salesforce API to practical use, it’s best practice to analyze the impacted areas. OpKey is now ready to help you analyzing impacted areas and assuring quality of the Salesforce API.
Before you start doing Salesforce impact analysis, you first need to import Salesforce API. Make sure that you have created your Team and Environment successfully, as required.
So, let us first create a Team & Environment for Salesforce.
- Navigate to the Tools menu, hover mouse on API Settings & then choose Salesforce.
- Salesforce API Settings window opens. Here, you can view the list of existing Teams.
- Click on Add new team button to add new team.
- Enter team name and click on Save button.
- A new team with new_team has been added. Now we need to add new environment within that team.
- Click on the Add New Environment.
- Fill all required fields like Environment Name, Environment Type, URL, Consumer Key, Consumer Secret, Username & Password.
- Here, required fields are filled with relevant data for creating new environments in team.
- Click on Save to save the created environment.
- The new environment has been created successfully. You can edit & delete it, as required.
- Thus, the team along with environment has been created successfully. You can view here in the list.
How to get Salesforce Consumer Key & Consumer Secret Key
- Log into Salesforce application with your valid credentials.
- After successful login, navigate to the Search-bar as showing below:
- Type Apps in the search-bar and then click on Apps link showing in Build section as below:
- Here, all the apps are displayed.
- Navigate to the Connected Apps section and click on desired app link.
- Here, you can view Consumer Key (a unique alphanumeric key) of your Salesforce API.
- To view Consumer Secret key, click on the Click to reveal link as shown below:
- Create a Service Repository file and open it.
- Click on Import Salesforce API.
- Salesforce Login page opens.
- Select Team & corresponding environment and click on Login.
- From here, you can import desired Salesforce API. Latest version of the Salesforce API (i.e. 44.0 – Winter ’19).
- Let us compare this latest version of Salesforce API with an old version of the Salesforce API.
- Click on Import button.
- Here, you can view the imported Salesforce API methods (create, update & delete).
- Here, you can view object properties of the imported Salesforce API.
- Let us compare this latest version of API with an old version of the Salesforce API.
- Click on the Salesforce Impact Analysis button.
- You can Right click on the Salesforce API & select Impact Analysis option.
- Salesforce Login page opens. Enter your Team Name & Environment to login.
- After successful login, you need to select desired Salesforce API version with which you want to compare the already added Salesforce API version. (here we have chosen 30.0 – Spring ’14 version).
- Click Next to proceed.
- Here, you can view the detailed information about the impacted records existing in the selected Salesforce APIs.
- You can refine the information by choosing fields from By Operation (like Unchanged, Modified, Added & Removed). You can easily identify the records with the help of legends (added, removed, changed & not existing).
- If you want to add new web service for the Salesforce API (secondary) then click on Create New button.
- If you want to update the Salesforce API (primary) then click on Update Existing button.
- You get an error message regarding the updating existing Salesforce API, as shown below.
Auto Generate Function Libraries for Salesforce object
Now OpKey users can auto generate the Function Libraries for the Salesforce objects. You don’t need to record actions performed on Salesforce and record test steps with corresponding keywords.
Let us see how to auto generate FLs for Salesforce object:
- Click on API Settings in Salesforce dropdown option under Tools menu.
- Click on Add to add new Team and Environment. You can choose an existing team and environment and proceed.
- Here, you can have a look at the credentials added in an environment.
- Click on Create Business Component in Salesforce dropdown option under Tools menu.
- From here, select Team and corresponding environment and then click on Log In.
- Select Salesforce object(s) from here and then click on Finish.
- Business Components (corresponding to Function Libraries) are being created.
- Business Components have been created successfully.
- Here, you can view the created Business Components (Function Libraries).
- Once the Function Library has been created successfully you can execute it directly or add it to other file and execute accordingly.