We're here to help

Managing test steps

Once you’ve created your Test Case you can start adding Test Steps to it. You can do this via the Salesforce UI with the Test Builder, or add an API Test Step to set up some test data, or use one of Provar’s many Test APIs to perform other tasks.

In Provar Desktop, use the Test Case view to review all the Test Steps in your current Test Case. Click on any Test Step to see its Parameters and Settings. You can make changes and save your Test Case at any time.

Parameters

Parameters are containers of information relating to your Test Steps and to the overall Test Case. Each Parameter will have a defined format for entering the information, but these formats can often be amended by the tester depending on requirements. Most formats are readily intuitive as they have guided inputs.

Some common formats are as follows.

Expression (): A common format that supports complex expressions, variables or text (see Expressions section below for more information)

Choice (): Another common format that supplies a picklist/dropdown of defined data options

Date (): Supports date values, entered using a calendar view

Boolean (): Supports boolean/checkbox values

Number (): Supports only numeric values

Password (): Accepts alphanumeric and special characters, values entered are obscured and stored in the project .secrets file

UI Choice (): Defines the screen and field options for UI testing (generally autopopulated through the Test Builder)

UI Action (): Defines the actions available such as Click, Set or Hover (generally autopopulated)

Specific parameters will vary according to the Test Step, but refer to the common test step parameters below for information on generic parameters such as Test Scope and Screenshot Options.

Writing Expressions

The Expression icon () against a parameter indicates the parameter supports expressions in addition to normal text. In Provar, expressions are known anything inside curly braces {}. They can include functions and variables as well as static text. This gives the user great flexibility but it also presents the opportunity for errors.

Note: We recommend using Content Assist when building expressions to help prevent syntax issues. You can access Content Assist by choose CTRL + spacebar, or right-click and choose ‘Content Assist’. Provar will provide a pop-up with a list of possible options to choose from.

See below for some examples of using expressions to calculate values and access queried information. Refer to Using Functions for more information on the functions available in Provar.

Simple Examples:

{1+1} – Will perform simple addition e.g. 2

{1/2} – Will perform simple division e.g. 0.5

{itemvalue + total} – Will work with variables (where itemvalue and total are previously created variables)

My name is {name} – Combine strings and variables (where name is a variable set to “David”), e.g. “My name is David”

{(item + total)>100} – Expressions, where Item and Total > 100  e.g. true

{(item + total)>100 and (item + total) <200} –  Supports and/or logic gates e.g. true

Complex Expressions

When testing with Salesforce we work with objects and fields. We can access these values in different ways.

In the examples below we have an Account object which has a FirstName and LastName from running a query. Using expressions, we can access these values in various ways:

{AccountRows.FirstName} –  Select full stop to see a list of available child variables

{AccountRows[LastName=”ReECA1″].FirstName} –  Filter a list of values using inline criteria

{AccountRows[1].FirstName} –  Choose the first value

Provar also supports various functions which can be used in expressions. Refer to Using Functions for more information.

Common Test Step Parameters

There are certain Test Step parameters which you will see in many Test Steps.

Result Scope

All values in Provar have a ‘scope’ which determines how long they live for.  This prevents long test runs from accumulating lots of values that are no longer needed, while allowing you to store important ones for the entire duration if you need to.

The following scope options are supported:

Test Run: Values are retained for the entire duration of your test run

Test Folder: Values are discarded when the folder they were created in finishes

Test Case: Values are discarded at the end of the Test Case they were created in

Group Step: Values are discarded at the end of the parent Group Step they belong to

Test Step: Values are discarded at the end of the Test Step that created them

Note that, with the exception of Environment Variables, the life or scope of a variable is valid for only a single test execution or run.

Wait

Wait indicates that Provar will wait for this condition to be fulfilled after performing the current action and before executing the next step.

If ‘Auto Retry’ is chosen, Provar will proceed right after the current operation is finished and will manage the sync automatically. Additionally, it automatically retries the operation if for any reason the field does not appear. For options other than ‘Auto Retry’, enter the timeout value in seconds. This defines a maximum amount of time that Provar should wait for the condition to be fulfilled before moving on to the next Test Step.

If the option ‘For a Pop to Appear’ is chosen, the name of the popup window must also be specified. 

Screenshot Options

This section contains two options:

Screenshot Before: Take a screenshot prior to executing the Test Step

Screenshot After: Take a screenshot once the Test Step is executed

Each option has the following choices:

  • No Screenshot: No screenshot is required. This is the default value
  • Capture the Visible Area: A screenshot should be taken that consists of only the area currently visible around the active field
  • Capture the Entire Page: A screenshot should be taken that consists of the entire page when scrolled from top to bottom

These screenshots are displayed in the Test Runner after the Test Case is executed.