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”