What are the coding standards for automation using QTP ?

Questions by vaishalisamant

Showing Answers 1 - 5 of 5 Answers

Debashish

  • Mar 6th, 2006
 

If you are asking about the coding standard that is used in QTP's Script then it means

In the QTP Header section you have to declare that is

***Header Section of the QTP you have to Mention*****

1.Name of the Script

2.Name of the Test case

3.Name of the Reusable scripts

4.Path of the Excel sheet

5.Version

6.Name of the Tester

7.Change History

*******************************

Then you have to follow Naming convention for each of the script that you will create in QTP.Like Y_TRA_AGIALANT_FINANCE_01

*******************************

You have to follow coding standards for the variable that you will declare in the QTP script

Like For all the

Integer type variable the name should start like Dim IntCount

Character type variable the name should start like Dim CharName

Boolean type variable the name should start like Dim BooTrue

String Type variable the name should start like Dim StrName

*****************************************************

Then throughout the QTP script you have to mention that what you are doing actually.

Like

**Here you have to mention in the script what you are doing **

Like

**Clicking the yahoo signin button to Login **********

Browswer(Yahoo page).Page(Yahoo_1).Button(Sign_in).Click

*************************************************

Coding standard is very useful inorder to keep track what you doing through out the script.Its useful later on phases to identify and track.You can Identify the variables used for what or if someone else also go through your code then it will be user friendly.

SG

  • Mar 6th, 2006
 

Here's another useful link which contains naming conventions/coding standards for QTP.

  Was this answer useful?  Yes

1.Declaration of Variables with proper bizness naming conventions

2.Initializations,Constants

3.Non-Reusable scripts with User defined Functions

4.Reusable scripts

5.Exception handler.

  Was this answer useful?  Yes

cynthia speelman

  • Oct 27th, 2006
 

You mentioned a link for naming standards for QTP, but did not include the link.  Can you please send it to me?

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions