1 :: Explain Rational Robots Coding Standards?
The standards are for all testers using the IDE of Rational Robot to develop their automated test scripts.The mission is to reduce maintenance costs when it comes to changes. This is done by setting up rules on how to name variables, functions, scripts and libraries, where to place them and when to use them.
The standards do not provide any information about the use of frameworks, best practices, Rational Robot settings and version control. These are all provided in separated documents.
|
2 :: Explain Naming Convention in Local scope variables?
DescriptionVariables represent values that can be changed within a procedure or function. Local scope variables are placeholders that reside within a function- or a script-body.
Syntax
[Prefix]+[ShortDescription]
[Prefix] is a lowercase letter (either "n", s", "str", "d" or "t" appropriate to the type it represents)
[ShortDescription] is a corresponding name of what the variable stands for.
If [ShortDescription] consists of more then one word they are all separated using a capital letter for each new word.
|
3 :: Explain Naming Convention in Module-level variables (member-vars)?
DescriptionIf variables are placed outside a function body their scope will be different from a local scope variable, therefore we flag those variables with a prefix "m_" that is very common in object oriented languages even though SQABasic is not an object oriented programming language.
Syntax
"m_" + [Prefix]+[ShortDescription]
[Prefix] is a lowercase letter (either "n", s", "str", "d" or "t" appropriate to the type it represents) [ShortDescription] is a corresponding name of what the variable stands for. If [ShortDescription] consists of more then one word these are all separated using a capital letter for each new word.
Examples
· m_nCountDatabaseRecords
· m_strLastname
· m_sPassword
|
4 :: Explain Naming Convention in Arrays?
DescriptionArrays in many programming-languages usually represent a fixed list of values (e.g. a list of lastnames). However within SQABasic the size for an array can either be fixed or grow if the number of items in the list is not known during compilation of the source code.
Syntax
"a" + [Prefix]+[ShortDescription]
Letter “a” indicates that the variable is of type array. [Prefix] is a lowercase letter that represents the type of variables in the array. The rules for [Prefix] are the same as for “Local scope variables”.
Examples
· asPersonList
· anNumberList
|
5 :: Explain Naming Convention Globals?
DescriptionThe values of global variables can be used and changed all over the project within all scripts and libraries. Though it is highly recommended to keep the number of global variables small. If global variables tend to be used in a specific project only it is advisable to keep those values in either a project specific library header or in a separate configuration file.
Syntax
"g" + [Prefix]+[ShortDescription]
Letter “g” indicates that the scope of the variable is global. [Prefix] is a lowercase letter that represents the type of the global variable. The rules for [Prefix] are the same as for “Local scope variables”.
Examples
· gnNumOfPersons
· gsPersonLastname
|




Webmaster Said:
Thank you.