Академический Документы
Профессиональный Документы
Культура Документы
Synopsis
This document outlines high level requirements and
processes that can be implemented by development
teams in order to aid in the efficiency and
effectiveness of automated testing activities.
Version 0.2
Issued 11/04/06
Owner James Alevizos
Author Andrew Newton
Status Draft
Table of Contents
1 Executive Summary
Early agreement between development and test can ensure that barriers to effective
automated testing can be avoided.
Automated testing can be hindered by minor issues, whether that is through a lack of
process, understanding or precision within development teams. Simple processes can be
implemented that counteract these issues and improve the returns on any investment in
automated testing techniques.
Basic rules, naming conventions and location naming can aid in the development of
applications from both a software development and testing point of view.
In addition, release notes can be used to communicate changes and new processes
between development and test teams.
Such processes are commonly carried out with development teams in the construction of
software throughout the software development lifecycle.
Minor alterations or considered changes can ensure that the automation process does not
falter when changes are made but flourishes and becomes integrated within the overall
development process.
1.2 Approvals
This document has been approved by:
2 Introduction
The latest test automation frameworks and tools make it possible to gain significant
benefits and returns-on-investment from automated software testing. However, projects
could make further savings in time and effort if the software design had the requirements
for automated testing built in.
Automated testers regularly deal with issues due to a lack of communication of simple
information between development, testing and automated testing teams. Very simple
changes in applications under test, implemented early in the development phase can make
the task of building and maintaining automated test frameworks much easier.
The average developer may make decisions on a project that inhibit automated testing
tool’s ability to work efficiently, effectively and robustly. New releases and builds can
hinder the usefulness of an automation tool if agreed guidelines have not been followed.
However, if development teams know about these guidelines they can often be
accommodated initially on new applicatoins and over time on existing applications.
There are processes that a development team can implement to provide support
throughout the automated testing process, which include many typical programming
conventions, including
Naming Conventions
Standard Name Format
Named Location
Navigation By Control Name
Consistent Naming Of Infrastructure components
Design Consistency
Detailed Release Notes & Procedures
3 Naming Conventions
Often the biggest obstacles to efficient test automation initiatives are either difficulties in
identifying the objects initially or frequent and inconsistent changes to object properties.
Examples include names to identify buttons, pages or input fields. Here, even the addition
of capitalisation or extra spaces can throw an automated tool into chaos.
The names of commands and objects are an important part of the usability of an
application. Likewise the names given to software components like variables, functions,
classes and commands are also an important consideration for automation tools. Choice of
names, whether made by the system's designers or by programmers themselves can affect
the ease with which an application is understood, recalled, readable, and maintainable
along with the way in which it is automated.
Automated test tools rely on the ability to locate and uniquely identify each window and
object of each application under test. This process is typically referred to as ‘object
identification’ and the tool provides a repository for these objects and their identifying
properties.
Thus, if automation is seen as an important facet of the whole testing process, the
following practices need to be incorporated within the software development lifecycle
The goal of a name is to uniquely identify an oobject, whether that object is a window, a
page or a button. Names allows for the focus of discussions, e.g. a command that produces
an action, to be easily understood by those involved in the discussion.
Within software development design the most important element of a name is its
precision. Naming practices are generally designed to minimise ambiguity and reject
attempts to introduce names that are imprecise (or prone to imprecision). Such names
need to remain unique over the lifetime of an application and despite the introduction of
other pieces of code, which may be written by other developers.
In Java, developers are encouraged to prefix package and function names with
Organisational Names, i.e. when developing new functions:
com.YourCompany.Function.
Globally Unique Identifiers (GUID’s) – which use a combination of the computers
MAC address and the clock time
Case Distinctions – i.e. within Java string, String and STRING can each have a
different meaning
Hungarian Notation – which uses a set of short prefixes to encode the type of
variable in a name, i.e. IpszFirstName refers to long pointer to string terminated
by zero
The latter two notations refer to another important aspect of naming - suggestiveness.
Whether dealing with applications or automated testing we require other properties within
a name, to the extent that, a name can describe the content, use and type of the thing it
is identifying.
Error prevention is also desirable when developing naming conventions. Names that do not
readily lend themselves to repeated entry and re-entry, or can be easily misread need to
be avoided.
One way to counteract this is by the use of shorter names as opposed to longer ones, as
they are faster to read, enter and communicate between teams.
Finally, pronunciation though a relatively minor issue still has some significance. Both
developers and testers will often talk about the components of an application and difficult
names can inhibit this form of communication, especially where the acronyms or local
knowledge is not documented.
Another difficulty with the naming of software components is that invariably the name
bares no relation to the location or how to navigate to that component.
Naming conventions that adopt such a principle can remove a major degree of ambiguity
from discussion, whether that is in how to test an application or the cause of a failure
within the application.
In this case, we have an application with a root base state (RT01). Within the top level
root of the application, we know that we have two main forms or windows (RT01FM01 &
RT01FM02) and two buttons which can perform certain set actions (RT01BN01 & RT01
BN02).
Within the two forms; we can see that they each contain a button (RT01FM01BN01), an
input field Field1 (RT01FM01EX01) and a combo box Combo1 (RT01FM01CX01).
The benefits of such a naming convention become apparent when we either have an issue
with a faulty component or need to concentrate testing on specific components.
For instance, if there was a defect outstanding with Combo Box 1 located with the second
form (RT01FM02CX01), the information contained within the description of the object
allows the development team to navigate to the object and make certain assumptions
about its behaviour. Discussion with business representatives and testers can then
concentrate on providing a clear and distinct resolution.
In cases where more than one component exists within a form / window, these can be
distinguished by the components two digit tab indexes or the index instance of that object
type. You may have four components on a page, where object two and four are buttons. In
the first instance they would be distinguish as BN02 and BN04, whereas using the second
principle they would be distinguished as BN01 and BN02. A common agreement can ensure
that objects are distinguished appropriately.
Control Mnemonic
Form (Window) FM
Button BN
Edit Box / Test Box EX
Label LL
List Box LX
Combo Box CX
Menu MU
Context Menu CU
Check Box CB
Group Box GX
Picture Box PX
List View LW
Tree View TW
Tab Control / Tab Pane TL
Calendar Control (General) CL
Horizontal Scroll Bar HR
Vertical Scroll Bar VR
Numeric Spinner NR
Progress Bar PR
Rich Text Box RX
Tool Bar TR
Open File OD
Save File SD
Directory Browse DD
Font Dialog FD
Colour Dialog CD
Print Dialog PD
Print Preview Dialog VD
Additional Rules
RT01 always refers to the top level form or application under test
Control names are constructed from the above named codes followed by a
numbered index
Control names not appearing in the list should be agreed with the testing team
prior to commencement of coding
Names of parent controls should be concatenated into their child control names in
order to provide a path back to the top level form, e.g. RT01FM01BN01 refers to a
button within the first form of the top level form/application
Accurate and detailed software release notes and consistent development processes can
allow the automation testing team to highlight key processes that may have a greater or
lesser impact on the efficiency and effectiveness of an automated testing strategy.
Release notes allow the automation team to know whether additional components have
been introduced to accommodate their introduction and consequently support to tailoring
of automated scripts to cope with such additions. In conjunction with the above naming
convention, new components can be easily integrated into an aspect of an application and
a degree of non-GUI process testing can take place in order to highlight any potential
conflicts early.
In addition, the documenting of software development processes can highlight issues that
may not have been explained or understood correctly. The documenting of both the
common development and automation processes can be a good source of discussion
between the teams and highlight constraints and issues that may be clear to each group
but difficult to communicate.
4 Conclusion
Individual projects differ, but there are common set of standard principles that can be
applied.
Gain input from the test automation team early. This should involve someone
who has a good knowledge of the test tool being used and a basic understanding
of the software architecture being tested.
Work with development to produce brief guidelines for building and maintaining
software to support automated testing initiatives, e.g. standardisation of object
identification properties, understanding the effects of changing properties
between builds etc.
Time spent between development and automated testing teams in agreeing a basic set of
principles and processes would ensure that automated testing scripts could be created and
maintained in line with application changes in the most efficient manner.
As result, an automated testing strategy could further accelerate the testing function,
increasing speed of testing, test coverage and an organisations return on any investment
made in automated testing techniques.
5 Contact Details