Adding comments in the Test Script
This article is a part of the Self-paced Learning Series for the Course: First-Hand Experience of Worksoft SaaS.Please refer to the link for more details on the Course.
Mapping the Worksoft SaaS feature to the Course Context :: Lesson 10:: Topic 4
1. Test Instructions Grid - Instructions
As you can see, the Instructions Grid has rich functionality built into it and has many features. We will discuss the relevant features at this time and take up the other features in the next few topics/lessons.
2. Practice
Open the edit version of the Test Script and scroll to my Test Instructions Grid:
- The Instructions are listed in the Instruction Grid and for each instruction: Command and Target are recorded. Value is also recorded where applicable.
- Double click on any of the Instruction (command or Target or value), you can see the individual fields.
- Right next to the command field, we have built a Command Reference that gives you more information on the Command purpose, its category, and its syntax, click on it. For Example: Command 'type' sets the value of an input field, as though you typed it in. This command needs both the locator and the value.
- Go to Target, you can see the locator recorded, a locator identifies an element in the AUT. If you open the dropdown, you can see the multiple locators recorded by QaSCRIBE like the id, name, css, xpath etc. This is called Location strategy. The Location Strategy is identifying all the possible locator types of an element, this is a very useful feature that would allow you to manually switch between locators. Also, during execution of the test, if one of the locators fail, Worksoft SaaS automatically picks up the alternative locators and complete the execution.
- QaSCRIBE has a default order of locators that get recorded, it is possible for you to re-sequence them by using the drag/drop function for each Test Script. You can also edit or delete the locators or add a new locator. There is an icon that helps you find the locator of that element on your AUT.
- The Value field records the value of the element, where applicable.
- User Notes are more like an Internal note that you want to add while building automation.
- There are few more icons on the right-hand side of these fields and I will explain them with a use-case in the next topic.
Now that we understand the Test Instructions Grid, we will follow the best practice and add comments to our recorded instructions.
4. Practice
- Select the first instruction and use the action button - click 'Add a comment' button. Enter comments as 'Open Webpage'.
- Add a Comment above Instruction (assert Title), I can either select the first instruction and click add comment or I can click the second instruction, add a comment and drag it up. Then, I'll enter the comments 'Verifying Webpage'
- Add a Comment above Instruction (Type Age) as 'Enter the age in the 'Age of the oldest person on insurance policy' field'.
- Add a Comment above Instruction (Type Income), 'Enter the income in the 'Enter your yearly household income (dollars)'
- Add a Comment above Instruction (Type Zipcode, 'Enter the zip code in the 'Zip code of person buying insurance' field
- Add the last Comment above Instruction (click calculate), 'Submit the UI Form by clicking on the 'Calculate'; button' field
- Click 'Save and Continue'. Your Test Script is now ready.