Ats automated test software style guide brian jackson test technologies
ATS Automated Test Software Style Guide Brian Jackson Test Technologies EDCS - Version Approved February Abstract This document describes the Cisco Test Technologies style convention standards for development of ATS automated test scripts and procedure libraries CATS Automated Test Software Style Guide Copyright ? Cisco Systems Inc All rights reserved Cisco Con ?dential ?? For Internal Use Only CTable of Contents Table of Contents Introduction Quoting Quoting for Variable Command and Special-Character Substitution Quoting for Variable Command and Special-Character Suppression Default to the Use of Double Quotes to Quote Strings Quote Single- Element Strings Using Double Quotes Quote Expressions Using Curly Braces Quote Expressions Using Curly Braces to Maintain Consistency Quote Expressions Using Curly Braces to Improve Performance Quote Looping Expressions Using Curly Braces Quote Code Blocks Using Curly Braces Quote Procedure Bodies and Script Sections Using Curly Braces Quote Non-Space-Delimited Variable Names Using Curly Braces Quote Procedure Argument Lists Using Curly Braces Commands and Code Blocks Command Placement and Length Code One Command per Line Split Lengthy Lines Split Command Lines That Exceed Characters Use join to Split Strings That Exceed Characters Split Commands at Logical Breaks Code Blocks Quote Code Blocks Using Curly Braces Reminder Align Opening and Closing Code Block Curly Brace Indent the Contents of Code Blocks Four Spaces Avoid Excessively Long or Deeply Nested Code Blocks Treat Script Sections and Device Con ?gurations As Code Blocks Treat Procedure Bodies As Code Blocks Command Expressions Use Spaces to Delimit Operators and Values in Expressions Exclude the Equality Operator from Boolean Expressions Explicitly De ?ne Expression Operation Precedence Special Command Considerations Handling switch Statements Handling for Statements Do Not Include then in if Statements Using switch Versus elseif Statements Use -- string to mark end of options Handling uplevel and upvar statements Handling case statements White Space and Indentation Code Logic White-Space Separation Use One Line of White Space to Visually Segment Software Logic Using Formfeeds for Print Formatting ATS Automated Test Software Style Guide i CTable of Contents Indent Nested Code Blocks Four Spaces Comments Format Comments Like Bullet Items Comment All Logical Blocks of Code Indent Comments to Align Them with the Code That Follows Add Comments at End of Nested Code Blocks Optional Variable Comments Document Constants and Important Variables Document Internal Data Structures Script Header and Footer Comments Include the Standard Script Header Comment Include the Standard Script Footer Comment Procedure Comments Include Script Procedure Comments Include the Standard Procedure Library Header Comment Include the Standard Procedure Library Footer Comment Include Standard Procedure Library Procedure Comments Include Procedure Library Internal Procedure Comments ITcl Class Library Comments Include the Standard Class Library Header Comment Include Standard Class Library Method Comments Comment Nonintuitive Script Logic Use Comments to Document Output Being Parsed Comment Router Con ?gurations Generating Documentation from Comments Include Cisco copyright notice in all ?les Include RCS Id tag in all ?les Naming Assign Meaningful Names Use Standard Characters in Names Abbreviate Names Techniques for Constructing Names Underscore-Delimited Naming Camelback Naming Name Pre
Documents similaires










-
57
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Aoû 20, 2022
- Catégorie Creative Arts / Ar...
- Langue French
- Taille du fichier 327.8kB