Skip to content

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. 

Let's look at the instructions we recorded with the help of QaSCRIBE and understand them in detail.
    
       
2. Practice
Open the edit version of the Test Script and scroll to my Test Instructions Grid:
  1. The Instructions are listed in the Instruction Grid and for each instruction: Command and Target are recorded. Value is also recorded where applicable.
  2. Double click on any of the Instruction (command or Target or value), you can see the individual fields.
  3. 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.
  4. 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. 
  5. 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. 
  6. The Value field records the value of the element, where applicable.
  7. User Notes are more like an Internal note that you want to add while building automation.
  8. 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.
3. Adding comments in the Test Script
Now that we understand the Test Instructions Grid, we will follow the best practice and add comments to our recorded instructions.


4. Practice
  1. Select the first instruction and use the action button - click 'Add a comment' button. Enter comments as 'Open Webpage'.
  2. 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'
  3.  Add a Comment above Instruction (Type Age) as 'Enter the age in the 'Age of the oldest person on insurance policy' field'.
  4. Add a Comment above Instruction (Type Income), 'Enter the income in the 'Enter your yearly household income (dollars)'
  5. Add a Comment above Instruction (Type Zipcode, 'Enter the zip code in the 'Zip code of person buying insurance' field
  6. Add the last Comment above Instruction (click calculate), 'Submit the UI Form by clicking on the 'Calculate'; button' field
  7. Click 'Save and Continue'.   Your Test Script is now ready. 
     


Feedback and Knowledge Base