Step Names in Transaction Scripts

Prev Next

In Transaction scripts, a new step begins whenever a new page is loaded using the open verb, and whenever a verb is appended with AndWait. By default, steps are named using the convention "Step - 1", "Step - 2", "Step - 3", and so on. An example of a transaction where a page is opened and a new page is opened after that would look like this:

// Step - 1
open(www.example.com)

// Step - 2
open(www.example.org)

//Step - 3
clickAndWait((//div[@id="login"])[2])

In this example, the step names in Catchpoint will follow the default naming convention.

Catchpoint provides the option to name Transaction steps to make reading charts and waterfalls easier. The Selenium action to do this is setStepName, and it is used as follows:

// Step - 1
open(www.example.com)
setStepName("Step 1 .Com Site")

// Step - 2
open(www.example.org)
setStepName("Step 2 .Org Site")

Notice that the setStepName action is placed directly after the action that instantiates the new step. Thus, other actions that setStepName commonly is placed after are: open, click, and clickAndWait. A custom Catchpoint action, dynamicStepOnNewPage 1, is in place for when the agent recognizes that the browser navigated dynamically to a new page, which could be caused by a META refresh tag or Javascript execution. Usage, in this case, is the same:

dynamicStepOnNewPage 1
setStepName("Please Wait")

An important thing to note about the setStepName action is that it is independent of the comment "// Step - 1" in the script.

Steps are displayed in our analytics tools in alphabetical order. If you have more than ten steps and you want to view them in numerical order, be sure to use a two digit format like this: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10 etc. (Otherwise "Step 11..." would precede "Step 2...", for example.)

The image below illustrates performance charts for two separate Transaction tests. One was set up with custom step names, and the other did not make use of the setStepName action. In this example, the Step Name was used as the first parameter for "Breakdown", as seen in the Settings section.

Without Step Names:
without_name.png

With Step Names:
stepname.png