5.2.4 Naming conventions for referenced parameters

Entering meaningful reference names for parameters in a Test Case helps the readability of your tests. If you are creating a utility module which doesn't as yet have a set function 5.1.1.3, then you should reference the parameter with a reasonably abstract name.

For example, if you are creating a Test Case that will select an entry from any combo box, you could name the parameter =ENTRY as the function of the Test Case is not set yet.

Once you have a keyword that executes a specific action, you should try to name the parameters according to what data they need.

If you have a keyword to select a language from the combo box in the login dialog, you could name the parameter =LANGUAGE. In combination with the Test Case name, this makes it easy to understand what a keyword does and what data it needs.

This is especially important in keywords which contain Test Cases with the same parameter names. If you have two =TEXTPATH parameters in your Test Cases , for example, you could name one of them =TEXTPATH_TREE and one of them TEXTPATH_CONTEXTMENU so that you and other testers using your keywords know what to enter where.
Parameter names cannot contain spaces.



Copyright BREDEX GmbH 2011. Made available under the Eclipse Public License v1.0.