We're here to help
Create a test case with Test Builder
What is a test case?
A test case is basically a unique workflow that you want to test. It includes the things you want to test (e.g. buttons, fields, lookup fields, metadata, messages). It also specifies how you want to test these things – in what order and what you are trying to validate.
What is the test builder?
The Test Builder is one of the most important elements of Provar. It uses a simple point-and-click method for creating test cases. You can access the Test Builder by clicking the blue Test Builder icon at the top of your screen. This will launch the Test Builder in a separate browser window.
How can I create a test case?
Creating a test case is pretty simple. You are basically mirroring how the user would use the application and creating test steps that follow that workflow. After that, you can use a variety of functions and assertions to validate that the application is working as expected.
You can then review reports to look for failures, which may indicate that there is a problem with the application.
In general, you can create three different types of test cases: Normal, Setup or Teardown. The following example provides instructions for creating a Normal test case using a Salesforce connection.
Practice: creating a new opportunity
To verify that a Salesforce workflow is working correctly, specifically the steps required to create a Lead.
- To create a new test case, start by selecting the New Test Case button located at the top of your screen.
- Enter a Test Name and ensure that Normal Test Case is selected.
- Note that the Salesforce Application dropdown allows you to select what you want Salesforce to launch in, e.g. Sales. If left at default, it will use the application last used by that user. (In general, it’s best to select a specific Application to make sure that the behavior is consistent with what you are expecting.)
- Then click the Finish button.
- The Test Builder will now launch automatically and make the connection to Salesforce. After Provar has logged into Salesforce, you will have a split-screen view of Salesforce on the left and the Test Builder on the right.
- From your Salesforce session, navigate to the Opportunities tab.
- Right-click on the New button and select Add to Test Case. After you click this, the Test Builder will detect your click and present it as a draft test step.
- To add this test step to the test case, click the Add & Do button. This will add the test step and execute it so that you can add more steps.
- Note that we did not have to include any test step to navigate to the Opportunity tab. Provar does this navigation automatically through metadata to save clicks. However, this only applies to the first screen of a test case: navigations to subsequent screens are assumed to be driven through the test steps, unless you specify otherwise.
- You will then be navigated automatically to the New Opportunity screen.
- On the Opportunity Name field, type in Test Opportunity and then right-click and select Add to test case.
- Click Add and Do. Congrats! You’ve added your first test step. Now let’s map a Salesforce lookup field.
Practice: locating an account
To verify that a Salesforce lookup field is working correctly, specifically the steps required to locate an Account.
- In the Account Name field, type test.
- Right-click on the search icon next to the text test in Accounts and click Add to Test Case.
- Click Add & Do.
- This opens up the search results based on your text. Now we need to select one of the results, so let’s right-click on the first account in the list and click Add to Test Case.
- Now Test Builder gives you some options for how you want to locate this account from the results list. Provar gives you two options for Row Locators, Where and Row Number. For this exercise, let’s use the ‘Row Number’ locator. In Test Builder, click Where and a menu will open letting you select your Row Locator.
- Where: This locator allows you to locate something based on criteria. This pulls in the column names from the list, so you can use one or all of the columns to locate the desired record.
- Row Number: This locator just takes a number. If you want the first result, enter ‘1’. This is good if you’re searching for a unique Account and you know there will only be one result.
- Select Row Number and you will see a text field with a number. From here we can click Add & Do. Once this step executes, you will see that you now have a value in the Account Name lookup.
Practice: verifying pick-list values
To verify that a Salesforce workflow is working correctly, specifically the steps required to map a date field, locate a picklist value and capture screenshots.
- First, click the calendar icon in the Close Date field and select a date.
- Once you’ve selected a date, right-click on the field and click Add to Test Case. Click Add & Do. Congrats! You just mapped your first date field. We have one more required field before we can continue. Let’s map the Stage field.
- Open the dropdown menu and select a stage.
- Once you have selected a stage, right-click on the field and click Add to Test Case.
- Click ‘Add & Do’. Congrats again! You just added your first picklist value.
- We will now add a final test step for clicking the Save button. We will also add screenshots of the Opportunity before and after the Save button is clicked.
- Right-click the Save button and select Add to Test Case. The Test Builder should detect the Save button automatically.
- This time, under Options, set the Screenshot Before and Screenshot After fields to Capture the Visible Area. This will take a screenshot of the visible area of the Salesforce page before and after the Save button is clicked.
- Then click the Add & Do button.