Comments inward UFT Tests
Comments inward VBScript
i) Purpose of Comments
To brand the code Readable
To brand the code disable from execution
------------------------------------
ii) Comments Syntax inward VBScript:
Use ' Symbol earlier the Statement
Or
Use Rem dominance followed past times space
Example:
Dialog("Login").Activate 'Select Login Dialog box
'Dialog("Login").WinEdit("Agent Name:").Set "asdf"
Rem Dialog("Login").WinEdit("Password:").Set "mercury"
------------------------------------
iii) Comment a block of Statements
> Select Statements
> Use Ctrl + M
Or
> Select Statements
> Edit carte du jour > Format > Comment
------------------------------------
iv) Uncomment
> Select Comment block
> Use Ctrl + Shift + M
Or
> Select Comment block
> Edit carte du jour > Format > Uncomment
----------------------------------------
v) Usage of Comments inward UFT
a) To write Test headers
'************************************************
'Test Name:
'Author:
'Date of Creation:
'Date of Modification:
'Pre-requisites:
'Test Flow:
'************************************************
b) To write Function Headers
'************************************************
'Function Name:
'Author:
'Date of Creation:
'Date of Modification:
'Input:
'Output:
'Purpose:
'************************************************
c) To Explain the complex logic.
d) To Explain the resources usage.
------------------------------------
Comments inward VBScript
i) Purpose of Comments
To brand the code Readable
To brand the code disable from execution
------------------------------------
ii) Comments Syntax inward VBScript:
Use ' Symbol earlier the Statement
Or
Use Rem dominance followed past times space
Example:
Dialog("Login").Activate 'Select Login Dialog box
'Dialog("Login").WinEdit("Agent Name:").Set "asdf"
Rem Dialog("Login").WinEdit("Password:").Set "mercury"
------------------------------------
iii) Comment a block of Statements
> Select Statements
> Use Ctrl + M
Or
> Select Statements
> Edit carte du jour > Format > Comment
------------------------------------
iv) Uncomment
> Select Comment block
> Use Ctrl + Shift + M
Or
> Select Comment block
> Edit carte du jour > Format > Uncomment
----------------------------------------
v) Usage of Comments inward UFT
a) To write Test headers
'************************************************
'Test Name:
'Author:
'Date of Creation:
'Date of Modification:
'Pre-requisites:
'Test Flow:
'************************************************
b) To write Function Headers
'************************************************
'Function Name:
'Author:
'Date of Creation:
'Date of Modification:
'Input:
'Output:
'Purpose:
'************************************************
c) To Explain the complex logic.
d) To Explain the resources usage.
------------------------------------