Facebook

For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
New Schedule in MindQ Systems, Madhapur By SUDHAKAR
Course Name Date Time Duration Type Branch
UFT + UFTPro 20th September 2017 7.30 AM - 9.00 AM IST 25Days Classroom + Online Hitech City
Selenium+Appium 4th October 2017 4.30 PM - 6.00 PM IST 40Days Online -

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

Friday, July 17, 2009

Creating Comments and Action Template


Creating Comments and Action Template

While editing your test, you can add comments in the Keyword View or in the Expert View. You can also add comments to function libraries. A comment is an explanatory remark in a program. When you run a test, QuickTest does not process comments. You can use comments to explain sections of your tests to improve readability and to make them easier to update. You can add comments directly to the Keyword View or the Expert View, or you can use the Insert Comment dialog box. You can also modify comments at any time directly in the Keyword View or the Expert View, or using the Comment Properties dialog box.

To add a comment in the Keyword View: 

If the Comment column is not visible, right-click any column header and select Comment.
  • To add a comment on the same line as a step, select the step and type your comment in the Comment column.
  • To add a comment on a separate line, select a step and choose Insert > Comment, or right-click a step and choose Insert Step > Comment. The Insert Comment dialog box opens. Type a comment and click OK. A comment statement is added to your test.
To add a comment in the Expert View or a function library: 

Type an apostrophe (') or use "rem" statement and then type your comment. You can add a comment at the end of a line or at the beginning of a separate line.

Example:

'This is a demo test
or
rem this is a demo test

ctrl+m and ctrl+shift+m are the key board short cuts to comment and uncomment a single or bulk statements.

If you want to add the same comment to every action that you create, you can add the comment to an Action Template.

Creating an Action Template

If you want to include one or more statements in every new action in your test, you can create an action template. For example, if you always enter your name as the author of an action, you can add this comment line to your action template. An action template applies only to actions created on your computer.

To create an action template:

Create a text file containing the comments, function calls, and other statements that you want to include in your action template. The text file must be in the structure and format used in the Expert View.
Save the text file as ActionTemplate.mst in your <QuickTest Installation Folder>\dat folder. All new actions you create contain the script lines from the action template.

Note: Only the file name ActionTemplate.mst is recognized as an action template.

'***************************************************************
Sample Action Template
'########################################################
' Objective            :     The objective of the testcase
' Test Case           :     Test Case Name
' Author                :     Author Name
' Date Created       :     XX/XX/XXXX (mm/dd/yyyyy)
' Date Updated      :     XX/XX/XXXX (mm/dd/yyyyy)
'Updated by          :   
'########################################################

'##############Initialize Variables and Load Libraries##################

'-----------Write Statements to initialize Variable and to execute libraries

'#####################
Driver Script ##########################


'-----------Write the main Script here


'########################################################

'############## Report Generation & Memory Cleanup ################

'-----------Write code to generate report and to cleanup memory of variables

'########################################################

'****************************************************************


No comments :

Post a Comment