Change is the heart of any agile development process. A good testing tool should provide means of adapting to constant change and embracing it.
It is often the case that the application under test receives a small enhancement, like adding a new field on a form, then all automated test suites become obsolete.
Qualibrate offers easy ways of modifying flows, so that you don't have to redefine them all.
Let's consider a simple example: you recorded a flow a while ago with a set of mandatory fields on the application under test to be completed by the user. You just recently found out that another field has been set as mandatory, but you did not record it the first time. The execution of the old flow will fail now because the application under test will not allow any further progress, if you do not fill in the extra mandatory field.
In the contact form above the Name and Email fields were initially defined as mandatory. The business analyst concluded that the Company Name field should be required as well for their internal CRM application, therefore created a change request to define the Company Name field as mandatory.
The first Qualibrate recording would look like this:
The end user should navigate to the web address, type his/her name, the email and the message, then submit the form. Since the “Company Name” field is now mandatory, the flow should be modified by adding a new action for typing the company name. This can be done in various ways:
1. Record from step
The first way of doing this is by recording a new Type step(user action) for the company field. First thing to do is to make sure the application under test is opened at the needed step. Once this is done, the option that needs to be selected is Record from step which is available for each user action as shown below:
The Recorder widget will be prompted on the screen again and the user can type the company name:
Once the Save button of the Recorder is clicked the newly recorded user action is saved onto Qualibrate server and displayed right below the Type P_EMAIL in email user action from which the Record from step option was selected:
2. Duplicate step
Another way of adding a new user action is by duplicating a similar one. Given that there are initially three Type user actions recorded (Type P_NAME in name, Type P_EMAIL in email, Type P_MESSAGE in message), a good option is to duplicate one of these similar steps and adjust it to work for the Company field.
In this example step Type P_EMAIL in email will be duplicated by choosing its Duplicate step option:
After selecting this option two identical user actions will be found under the Contact form task. The only difference is that the duplicated step has no value set for the contained parameter.
The adjustments that need to be done are:
- Rename step
- Change parameter name in technical details panel
- Add parameter value in the data set
- Inspect element to get the correct field in the form
Obs: You only duplicate an action, not the object that the action will be executed on. If you change something to the object properties, this will affect all the duplicated actions.
1. Rename step
This is easily done by double-clicking the user action name and typing the correct name Type P_COMPANY in company.
2. Change parameter name in technical details panel
In order to have different parameter names in the data set the parameter name for the newly defined action should be changed from the technical details panel from P_EMAIL to P_COMPANY.
3. Add parameter value in the data set
When a new action is duplicated the parameter value in the iteration is empty as it can be seen here:
A value should be provided for parameter P_COMPANY. Choose Parameter option next to the parameter value:
The Advanced option for P_COMPANY dialog will be displayed. The simple text "Iovio Netherlands" should be inserted.
4. Inspect element to get the correct field in the form
A duplicated step still references to the initially recorded control. In this example during execution the value for company name will be inserted in the email field since that is the step that has been duplicated.
In order to execute the Type action on the correct field the correct element should be assigned to the action. This is done during manual execution using the Task Maintenance Window.
The Manual tester should be started and one the Type P_COMPANY in company step is reached the maintenance window should be opened:
Choose the Inspect element button. Elements on the screen will start to be highlighted. Select the Company field:
Now the maintenance window will show the details of the Company field, the correct one:
Select OK and go back to the Manual Tester widget. If the Do it for me option is selected now the correct field on the form will be selected and the value Iovio Netherlands will be typed there.
3. Insert user action
Another way of inserting a new user action is by selecting the Insert user action option next to the task. The result will be a blank user action for which adjustments need to be done in order for it to be suitable for test execution.
Adjustments are done similarly to the Duplicate step option and the inspection of the element should be done during test execution.
4. Delete Step
The Delete Step option enable the user with the possibility of deleting an user action along with its associated data.