QTP_Naming_codingStyle.doc

上传人:hw****26 文档编号:3543379 上传时间:2019-06-03 格式:DOC 页数:2 大小:52KB
下载 相关 举报
QTP_Naming_codingStyle.doc_第1页
第1页 / 共2页
QTP_Naming_codingStyle.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、1. Naming Convention:File name:1. Capitalize the first letter of each word, such as “KestrelController.vbs”Function name: 1. Capitalize the first letter of each word, such as “GetConfig”2. Use verbs as the first word of function nameTest name: 1. The same as test case id. Such as “US1-TC1”2. For the

2、 test of common actions, capitalize the first letter of each word, such as “KestrelCommonActions”Action name:1. Capitalize the first letter of each word, such as “OpenMainSite”Variable name:1. Use three letters as the prefix of variable to specify the type of this variable, such as “strName” 2. Use

3、low case for the first word and capitalize only the first letter of each subsequent word, such as strName “”3. Use “g_” as the prefix of global variable, such as “g_strName”Subtype Prefix Example Boolean bln blnFoundByte byt bytRasterDataDate (Time) dtm dtmStartDouble dbl dblToleranceError err errOr

4、derNumInteger int intQuantityLong lng lngDistanceObject obj objCurrentSingle sng sngAverageString str strFirstName2. Comments:File comments:= VBScript Source File Copyright 2007, StarCite Technologies Inc. All rights reserved. NAME: Controller.vbs AUTHOR: Automation team DATE : 2007-11-2 COMMENT: Ve

5、rsion 1.0=Function comments:= Name: GetConfig Summary: Gets config information from specified sheet of config file Parameters: strConfigFile: config files path, such as “d:tempconfig.xls“ strSheet: the sheet name, such as “Sheet1“ Return: A Dictionary which contains “item“, “value“=Action comments:=

6、 Copyright 2007, StarCite Technologies Inc. All rights reserved. TEST CASE ID/NAME: US1-TC1 SUMMARY: Create an accont ACTION NAME: Action1 SUMMARY: Open main site AUTHOR: Automation team DATE : 2007-11-2 COMMENT: =Internal comments:1. Capitalize the first letter2. Write in third-person narrative form, such as “Gets config information from Env sheet”

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育教学资料库 > 精品笔记

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。