Back to QMetry All Products Help Page
Create Test Steps
Introduction
Once you create test cases, you can add test steps in the test cases. The test script is written in BDD. You create test steps either through recording or writing test steps manually in the editor.
Go to the Test Plan module and select the test plan on the tree. The test cases under the test plan are listed on the screen at right.
Open the test case in which you want to add test steps.
You can add test steps either through recording or by adding details manually.
Record Test Steps via Test Recorder
The test steps for Web UI can be recorded through the QAS test recorder which provides enhanced test recording that supports more than 150 odd actions and browser customization.
The steps are recorded in BDD script.
Auto Record Modes
→ Auto Record is turned “ON”
When the Auto Record is turned on “ON” mode, all the locators are recorded by the test recorder. It is not possible to select desired locators at run-time.
The recorded test case looks like below.
→ Auto Record is turned “OFF”
This is the default mode for recording. When the Auto Record is turned on “OFF” mode, it allows users to enter values manually while recording the events.
Users can also select a locator from the available locators.
The test case is recorded as shown below with user-preferred values.
Steps to record test steps
On the test case page, click on the Record button.
Select the following runtime options before initiating the recording.
Select Repository: Select the repository to store all the elements you access to record the test step. These repositories are created under the Test Repository section. By default, the locators will be stored under the Default repository.
Select Profile: Select the Profile to record the test steps. The test recording will be done using the platform configured for the Profile. The default Project Profile is created in accordance with the Project type. You can add multiple Profiles under Project Settings > Manage Profiles. The Profiles will be available during the run of your current test case or during the execution of test cycles.
Then click on the Start Record button.
The recording is initiated.
The site is opened in the browser as per the URL set in the Profile.
As soon as you start taking actions on the screen, the window will pop-up with fields to record the event. You can also use QAS Recorder Commands to record the locators.
Note: By default, Auto Record is turned “OFF” which allows users to pick required locator for the element.
Access QAS Recorder Commands
QMetry Automation Studio provides you with the ability to automatically provide Assertion values while Recording test cases through Web Browser.
1. Right-click on the recorder screen that is open in the browser.
2. Locate the QAS Recorder main option with the list of QAS commands underneath. The commands are grouped as per their type. You can use the commands as per requirement. These commands are self-explanatory.
On entering text in textbox or clicking on any button/link on the UI, the locator wizard opens.
Command: It denotes the command for the event.
Key: If the element is recorded previously, its key is already stored in the repository (if the key is saved while recording) and you are recording the test using the same repository, then the saved key is auto-suggested. If you access the same element in the same session, then also previously saved key is auto-suggested. You can change the Key as per your requirement.
Locator: The drop-down lists all the recorded locators for the element. If one of the locators is changed while execution, the other locator can be used as an alternate locator.
Locator: The Locator drop-down displays the auto-suggested locator list for the element with the nearest possible locator listed first in the list. Select the required one.
Click Save to save the element locator for the step.
Proceed with further actions on UI and record the element locators thereof.
To stop the recording, click on the Stop Recording icon on the test case details screen.
You can see the test script is recorded in BDD in QAS.
The locators are also get stored in the selected repository. You can expand the Test Repository section and check under the respective repository.
Enter Test Steps Manually
You can use Dynamic Commands that take values from the defined variables and previous step results.
Waits do not need to be handled manually and can be handled through configuration.
Steps:
1. Open the test case in which you want to add test steps.
2. Click on the Manual button to enter steps manually.
3. First step is provided by default. To edit it, hover over the step and click on the Edit icon for the step.
4. Enter the parameter values as required for the step and click Update.
The step is updated.
To add additional properties for the steps, click and open the Search and Add Command/Action box. It lists out all available properties that you can use as steps. The properties are categorized so that you can easily filter them. Select the required one.
Drag and Drop Actions
Alternatively, you can open the Drag and Drop Actions menu. You can drag the option to adjust its appearance on the screen.
The menu shows all the actions that you can drag and drop into the steps area.
The actions are arranged as per their categories. Expand the category to access relevant actions.
You can then edit the step and enter parameter values for the action.
You can also refer and use the locators stored in the Test Repository. Refer more about Test Repository.
Data Masking in Test Steps
QAS provides allows you to mask the required input data in test case steps, shareable steps and standard steps.
Use Case: The test author has some confidential input data entered as part of the steps, But, they do not want to reveal it to other readers. For the reason, they need to mask such input data entered in the steps e.g., login password.
Steps:
1. Go to the Test Plan module.
2. Open the test case detail page.
3. Click on the Edit icon for step the data of which you want to mask.
The Action Properties panel opens.
4. Click on the Mask Data icon for the input value that you want to hide/mask.
You can see the input value gets hidden.
To unmask the input value, click on the same icon.
Comment Test Steps
Users can comment/uncomment any required steps from the test case. The commented steps do not get executed while dry run/execution of the test case.
The feature is useful when testers need to avoid executing certain scenario while execution. It saves tester’s time as they do not have to rewrite the required steps.
You can comment a single as well as multiple steps at a time in the BDD and KWD view.
Comment a Single Step
1. Go to the Test Plan module.
2. Open the test case and click on the Comment icon for the step that you want to comment.
The step is commented.
This commented steps will be excluded while execution/dry run of the test case.
Remove Comment from a Single Step
Click on the Comment icon for the step that has been commented. The comment will be removed from the step.
Comment Bulk Steps
1. Go to the Test Plan module.
2. Select the steps that you want to comment and click the Toggle Steps button at the top.
The selected steps are commented.
These commented steps will be excluded while execution/dry run of the test case.
Remove Comment from Bulk Steps
Select the commented steps and click on the Toggle Steps button at the top.
Test Step View
The recorded test steps can be viewed in BDD View and KWD View, which provides better readability in both BDD and tabular view.
BDD View
KWD View
Options at the top
The following options are available at the top of the test case detail page.
A. Link Dataset: It allows you to link the Test Data with the test case.
B. Record: This is a toggle option to start and stop test recording through QAS test recorder.
C. Run: The option allows you to dry run the test case before the actual execution.
D. Duplicate: It creates a copy of the current test case with “_copy” suffix.
E. Delete Test Case: It will delete the test case permanently after confirmation.
F. Toggle Steps: This is a toggle option to comment and uncomment steps in the test case. As this icon at the top is meant for bulk operation, it will be enabled only if you select more than one step in the test case.