Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

2012 IEEE 36th International Conference on Computer Software and Applications Workshops

Strategies for Agile Software Testing Automation: An


Industrial Experience

Eliane Collins Arilo Dias-Neto Vicente F. de Lucena Jr.


Nokia Institute of Technology Federal University of Amazonas Federal University of Amazonas
Manaus, AM, Brazil Manaus, AM, Brazil Manaus, AM, Brazil
eliane.collins@indt.org.br arilo@icomp.ufam.edu.br vicente@ufam.edu.br

Abstract—Testing Automation has been growing in software be executed efficiently by the use of automated testing tools,
engineering. Many organizations are investing in automated providing quickly responses to the requirement changes, and
testing in order to prevent defects and increase testing providing efficient interaction with the development team [5].
effectiveness during software development. In agile methodologies, However, testing automation in agile software projects has
this task is considered an important activity, considered the key
some problems to be managed [6]. According to Crispin and
of the agile testing. This paper presents three testing automation
strategies applied to three different software projects adopting Gregory [6], analyzing their experiences in agile teams, issues
Scrum agile methodology. The results indicated positive agile that influence the success of testing automation would be:
practices to be considered when adopting testing automation • Programmers do not bother to test because they have
strategy, such as: team collaboration, task distribution, testing the test team as a safety net to catch bugs;
tools, knowledge managements. The challenges, results, and
• The “Hump of Pain”: the learning curve for testers to
lessons learned from this experience are also discussed.
learn about tools and code;
Keywords- software testing; agile testing; testing automation; • Initial investment: acquiring tools and training people;
open source testing tools.
• Code and interface in constant changes: making the
GUI automation not unfeasible;
I. INTRODUCTION
• Legacy systems code is not designed for testability;
Software Testing Automation means to automate software
testing activities including the development and execution of • Fear: testers without programming background and
test scripts, verification of testing requirements, and the use of programmers without previous experience in testing;
automated testing tools [1]. One of main reasons to automate • Old habits: manual regression tests instead automated
tests indicates that manual testing is time consuming. On the regression tests suite;
other hand, automated testing increases efficiency for repetitive
Based on this scenario, this paper presents experiences and
steps to reproduce system functionality, especially in
results of the implementation of three testing automation
regression testing, where test cases are executed iteratively and
strategies in three different software projects following the
incrementally after changes made in the software [2].
Scrum agile development methodology [7]. This paper is
Testers must carefully define and analyze the testing
organized as follow: Section 2 describes the background
automation strategy in a software project, because the success
explaining agile testing and related works on testing
of this practice requires effort to know the testing tools and
automation. Section 3 presents the testing process adopted by
verification of tests results to ensure that the cost of automation
the company and details of automation testing strategies
is less than the cost of manual tests execution [3].
applied for each software project. Section 4 discusses the
In this scenario, testing automation is considered an
results and lessons learned, and finally, section 5 presents the
important practice in software development, and this
conclusion and future works.
importance is highlighted in some software development
methodologies. For instance, it is considered the key of the II. BACKGROUND
agile testing and, even with an initial investment, its benefits
can be observed in the long term in a software project [4]. The A. Agile Testing
agile methodologies are standing out mainly because of their According to [6], agile testing not just mean testing on agile
ability to rapidly accommodate changes in the original projects but testing an application with a plan to learn about it
requirements and prioritize the development of functionalities and let the customers’ information guides the testing activities
through executable code instead of extensive written in line with agile values. According to the authors, the key
documentation. They also provide collaboration with the factor to reach success in an agile testing approach would be:
customer rather than following rigid plans and contract
negotiations. Agile processes are iterative. Thus, in this scenario, • Looking at the Big Picture;
testing has to follow the software project iterations. It needs to • Collaborating with Customer;

978-0-7695-4758-9/12 $26.00 © 2012 IEEE 440


DOI 10.1109/COMPSACW.2012.84
• Building the Foundation for Agile Core Practices; proactive and start the test tasks since the beginning of the
• Providing and Obtain Feedback; project together with the developers as one team and be
succeed in this challenge requires experience, overcome
• Automating Regression Testing;
barriers and mind set.
• Adopting an Agile Testing Mindset; and
B. Testing Automation
• Using the Whole Team Approach.
Automated software testing is a solution to the problem of
Thus, testing automation is considered the core of agile maximizing test coverage within the available time and
testing, independently of the agile methodology implemented increasing software reliability and quality [9]. The benefits of
in a software project. In this scenario, different tests have such approach compared to the manual testing would be [9]:
different proposes. Figure 1 shows the agile testing quadrants low cost of test execution, possibility of replicating old test
proposed in [8], describing the relation between manual and sequences on new software versions (free cost of test
automated testing for different type of testing. regression) and the possibility of testing software in a high
stress level for a long time.
Another related study ([10]) describes the developer’s
experience performing testing automation on component level
and Test Driven Development (TDD) in order to prevent
failures and decrease the development lead-time. The authors
discuss aspects and lessons learned to be considered in a testing
automation strategy, such as:
• Testing automation requires high product testability;
• The use of a framework makes test case development
easier and the automation robust to future changes;
• Testing automation on a component level requires
adjustments to the product architecture;
• Asking people to add new tests every time a new
defect is found requires continuous remainders and
monitoring;
• Test execution speed is important;
• Test tools easily become the excuse for every problem;
Figure 1. Agile Test Quadrants [8] • Testing automation requires dedicated resources;
• Benefits from testing automation are hard to obtain in
• Q1: Technology Facing tests in Support of the first project release;
Programming (Technical requirement testing – Does
• Testing automation should be introduced in small
this method do what the developer intended?)
steps. Minimizing maintenance costs is the most
• Q2: Business Facing tests in Support of Programming difficult challenge in testing automation.
(Business requirements testing – Does the code do
what it should?)
In [11], the authors present a survey that observed factors
• Q3: Business Facing tests to Critique the Product that affect the state of testing automation in different types of
(Business defect testing – Does the code do something software organizations. This study included a survey in 31
it shouldn’t? Are there missing requirements?) organizations and a qualitative study in 12 of them. The survey
• Q4: Technology Facing tests to Critique the Product revealed only 26% of test cases in these organizations is
(Technical defect testing – Are there leaks? Can it automated, what was considerably less than expected from
handle a load? Is it fast enough?) previous results published in the technical literature. However,
automation tools were the third most common category of
Traditional software testing focuses almost exclusively on testing-related tools, commonly intended to implement unit and
the right side. Thus, the functional tests are executed critiquing regression testing. The results indicated that adopting testing
the product but not playing a productive part in supporting the automation in software organization requires high effort. This
creation of the product. Moreover, test activities are involved work recommends that research and development should focus
late in the development process to detect failures but not to on uniform testing process enhancements, such as applying a
prevent them. new testing approach and creating an organization-wide
In agile testing, the team is involved in identifying, but also strategy for testing automation. Another focus area should be
preventing failures. Thus, agile testing is a challenge for testers the development of tools to support testing processes in the low
that used to work in traditional projects waterfall mainly level testing phases, such as unit or integration testing.
because they do not have to wait for system delivery in the end Besides characterizing the scenario of testing automation in
of project to start the test activities but they need to be software projects, these works are related to the observations of

441
testing automation in different environments where the all possibilities of inputs combination for test. However, the
development and testing teams are formally separated. project schedule was delayed and the developers wanted to
However, they do not evaluate scenarios where the focus on developing features instead unit testing.
development and testing teams perform strategies to automate So, testers decided to perform the unit testing tasks using
tests together in an agile process. Moreover, they do not GoogleTest tool according to Model V approach [12], in which
discuss how each team tasks influence on the success of testing development and testing processes are conducted in parallel.
automation strategy. In our projects, different strategies Thus, developers just coded new features and then testers
adopted by the project team are analyzed in the agile executed unit tests. Functional test cases were also created
methodology context, which introduced new challenges and according to the product backlog stories and they were
results, as described in the next section. executed at the end of each sprint.
During this testing strategy, we could observe code bugs
III. SOFTWARE TESTING AUTOMATION STRATEGIES IN were found in the unit tests, but developers, focused on new
AGILE PROJECTS code, they postponed the corrections for the next sprint,
generating technical debt. Moreover, the communication
A. Process and Tools
between tester and developers, besides the geographical
Scrum agile methodology [7] was implemented in our distance, was very efficient. It happened because testers had to
company. In this methodology, there is no division between understand the developers’ code, transferring knowledge from
testing and development teams. Thus, testers participate in developers to testers. However, the opposite (communication
Scrum ceremonies (sprint review, daily, retrospective and between developers and testers) did not occurred.
planning meetings). Their responsibilities basically are Functional tests for the desktop installer and configuration
planning and estimate tasks through stories described in the screen were easily automated and executed by testers for MS
product backlog, specifying acceptance criteria for these stories Windows 7-x64 and MS Windows 7-x86 using Sikuli tool
and using testing automation tools to speed up the execution enabling automatic regression testing. These functional
activities of each sprint (iteration). automated tests could be executed in the end of last sprints for
The basic tasks of testing process during a sprint were all project as acceptance tests, speeding up the tests execution.
incremental and iterative. Testers should plan and update test However, due to the distance created between developers and
cases for sprint stories, automate test scripts when it is possible, testers, all testing tasks should be done by testers.
execute all tests, report defects found and run regression tests So, this testing strategy did not allow the prevention of
(run automated tests and manual exploratory tests). Test Leader failures, but just the identification of failures in the code,
also was responsible for monitoring all tasks in the process. similar to the traditional development process.
For confidentiality reasons, the software projects described
in this paper will be called Project 1, Project 2 and Project 3. C. Strategy 2: Developers Automating Unit Tests and
Thus, the unit testing frameworks used in the software projects Testers Automating System Tests
were: GoogleTest1 for Project 1 and JUnit2 for Projects 2 and 3.
Project 2 consisted in the development of a web system to
The functional and GUI tests automation tools were: Sikuli3 for
automate factory tasks on counting material for production.
Project 1, Selenium RC and IDE4 for Project 2, and Fitnesse
Project team was located in the same site and it was composed
test tool5 for Project 3.
of four Developers, one Scrum Master, two full time Testers
B. Strategy 1: Testers Automating Unit and System Tests (one Test Analyst and one Tester dedicated to test automation),
Project 1 was a small software project that consisted in the and one half-time Test Leader responsible for the test strategy.
development of a location API driver to be embedded in a The project complexity was high and its size was medium.
modem. The software is composed of a desktop installer and a A Continuous Integration (CI) environment was configured
screen to configure the installation. The software platforms by developers in the first sprints (1st and 2nd) using the open
used were C++ programming language and Visual Studio IDE. source tool Hudson6. The CI environment could automatically
The business rules were implemented in the embedded API. compile code, execute unit and acceptance GUI tests
The project team was composed of two full time developers, (Selenium), and deploy system versions for: development,
one Scrum master, two half time and geographically separated testing, and production servers.
testers, and one half time Test Leader located in the same site The project team decided that developers were responsible
of developers. for new features development, unit testing, and CI
In this project, the teams accorded that unit tests for API environment, while testers should be responsible just for
rules would be essential to guarantee the accordance between functional and non-functional tests.
code and business rules, because the modem could not simulate Developers performed unit tests using TDD (Test Driven
Development) approach. In parallel, testers adopted an
automated testing strategy for functional (using Selenium
1
GoogleTest URL: http://code.google.com/p/googletest/wiki/ IDE/RC tools) and non-functional testing (security and load
2
JUnit URL: www.junit.org tests – using Jmeter tool) integrated in the CI environment.
3
Sikuli URL: sikuli.org/
4
Selenium RC and IDE URL: seleniumhq.org/
5 6
Fitnesse URL: fitnesse.org/ Hudson URL: http://hudson-ci.org/

442
Thereby, it ensured that each release was covered by unit tests, Analyzing the project team, the division between
acceptance GUI tests, and basic load tests according to Developers, Test Analyst and Tester influenced the testing
customer requirements. automation because it provided lack of synchronization tasks of
Internally, the project team was divided in developers, test the teams and the knowledge transfer do not happened. Just
analyst (responsible for analyze requirements, test plan and Testers executed and developed automated test scripts. Test
process) and tester (who were responsible for test automation). Analyst created test plan and executed manual tests. Developers
Developers did not perform effective unit testing because they stayed focused on new features even using CI environment.
were focused on new features development and they believed
that testers would found the defects. So, many defects, such as D. Strategy 3: Developers and Testers Collaborating to
null pointer exception, screen crashes and illegal exception, Automate Unit Testing and System Tests
were found during functional testing. In consequence, most Project 3 (it is in progress) consists in the development of a
part of code should be modified for next sprint causing server-side system to receive requests from a mobile device,
technical debt. process information and send services and applications back.
Figure 2 represents the automation structure using CI. The project team is located in the same site, and it is composed
Tester and developers committed to send daily code, unit tests of five Developers, one Scrum master, and two Testers. All
and automated acceptance tests through Subversion tool. features and business rules are complex and the application
Hudson monitored changes in Subversion and started the CI does not have graphical interface. The end-user interaction
process. Developers could easily run unit tests and testers could occurs from the mobile device.
execute Selenium functional automated scripts, manual Initially, developers were responsible for code new
exploratory tests, security tests and usability tests. features, unit tests and Continuous Integration (CI), and Testers
should take care of functional and non-functional tests. This
separation hindered the communication and the same problems
of Project 2 starting to appear. In the first retrospective meeting,
all members decided to change this strategy for the next sprints.
Testers suggested that developers continued responsible by
new features and unit tests, but testers started to collaborate
reviewing test scenarios and code by pair programming to
improve the quality of these artifacts. The access to CI
environment was shared among all project members. Thus,
anyone could get and conclude opened tasks, contributing to
the evolution of the software project.
An automation testing environment for integration and
system tests using Fitnesse tool was configured. Thus, all
members were responsible by the success of the stories. Thus,
the definition of done for a backlog story was formalized as:
feature implemented, integrated and tested. Developers and
testers configured tools and programmed in pair test scripts
Figure 2. Automation Structure with CI
according to planned test cases, and all tests were automatically
executed. Developers were enabled to execute automated tests
Quick feedback in this project was observed because
anytime ensuring the new feature wasn’t affecting the system.
Hudson displays reports on real-time and e-mails are sent to
Initially, the test automation environment configuration
project team to fix identified problems in the project.
demanded high effort, but with collaboration, in two sprints its
Test problems were found during sprints. The customer
configuration was done and all test tools (Testlink, Fitnesse,
realized that interface, performance and usability were working
mantis, Jmeter and JUnit) were integrated providing quick
well, but the data accuracy wasn’t correct. It happened because
feedback through Hudson. During 5 sprints, Testers planned
tests were performed for code and GUI layers, but functional
test cases, reviewed unit and integration tests, wrote automated
tests for complex business rules would be executed for the
test scripts, and executed exploratory tests. On the other hand,
layer behind GUI. The base of automation was the acceptance
Developers coded and wrote unit, integrations, and system tests,
tests, but to ensure data accuracy for complex business rules,
reviewed test cases and executed all automated tests. Figure 3
integration tests must be done to validate it.
represents the tasks distribution according to role in the project.
Moreover, the automation of functional GUI tests in the
This suggests that automation tasks are in the intersection and
current stories presented problems. Testers were using a
they can be executed by everyone in the project team.
record-and-play approach to implement test scripts, but the
This strategy promotes harmony in the project team, test
system interface changed during the sprint. Thus, automated
automation environment completed, team collaboration,
test scripts were redesigned and recorded again. The lack of
knowledge transfer, and quick feedback of sprint results. The
time in the sprint to conclude the automated tests resulted in
Developers and Testers felt motivated with the tasks to
back to manual execution of regression tests. Testers had
collaborate and learn about tests, development and automation.
technical debt for next sprint too.

443
claims for Agile Testing Automation. Some practices are
observed to reach this success:
• Involving testers in configuration environment and
Continuous Integration tasks was important to avoid
separation of the teams, encouraging cooperation.
• Asking for help when a task required knowledge of
another area. For example, in Project 3, developers
helped testers to improve the Fitnesse automation tests
and testers supported developers configuring Hudson
and reviewing unit testing to achieve test coverage.
• Testing automation is not just responsibility of testers.
Figure 3. Teams’ Responsibilities Pair programming can be a good exercise to integrate
team. Knowledge transfer motivates the project team.
IV. RESULTS AND LESSONS LEARNED
B. Automate Tests for Each Layer of Software Just for
In this experience on conducting different strategies for Stories in the Sprint
testing automation, we could observe that the strategy 3 was
As was observed in Project 2, when a team occupied a lot
considered by the project team in the retrospective meeting the
of time in one sprint trying to automate all functional GUI
best approach to work with agile development, considering the
possible tests, they wasted time that should be spent on testing
results and the agile values applied. Reaching this strategy
tasks that could add value to the project.
required patience to find the right way to work. Table 1 shows
In Project 2, it was observed that, even doing unit testing,
the projects results for each strategy, where TC represents the
GUI test automation and implementing an efficient CI
number of generated test cases, Failures represents the number
environment, the business rules behind the interface cannot be
of registered failures during the tests execution. The positive
ignored because they detect problems of data accuracy
and negative points from scrum retrospective meetings are also
important to assure the system.
reported. We can observe the size of the test suites for each
project (Project 2 contains the bigger test suite with 234 test C. Test Automation Should Be Simple, Reusable and
cases), confirming its higher complexity when compared to Maintainable for the Project Team
Project 1, and how effective were these test suites by analyzing All team members should be able to use the testing
the number of detected failures. automation tools, running, writing tests and analyzing test
However, some issues need to be managed to avoid the results. Concentrate the knowledge regarding the tools in just
risks introduced by the difficulty of agile methodology one or two people and the adoption of complex tools represent
combination. Thus, was identified some lessons that we learned risks for agile projects. The combination of skills to finish a
for minimizing risks: task achieves good and quick results.
A. Collaboration Supports the Success of Agile Testing In Project 3, the use of friendly test tools promotes the test
Automation tasks collaboration in the project team. Everyone could write,
execute tests, and analyzing test reports.
All main research works in the agile methods field indicate
team collaboration as an important aspect to carry the success
of an agile project. In this experience we could confirm these
TABLE I. RESULTS TABLE

Projects TC Failures Positive Negative


• Poor knowledge transferring from testers to developers
• Testers improved programming skills
• System testing performed after development
1 58 11 • Knowledge sharing on System Architecture
• Separation between testing and development teams
• Unit testing found important defects
• Code improvements postponed
• Poor knowledge transferring
• CI strategy improved testing automation • High effort to automate tests with record-and-play
2 234 176 • High coverage of GUI testing automation approach
• Security and load tests executed early • Absence of integration testing
• Separation between testing and development teams
• CI strategy improved testing automation
• Security and load tests executed early • High initial effort to set the automation environment
• Intense team collaboration
3 197 52
• Knowledge transferring regarding the tools • Rework when customer requires changes in the
• Testing responsibilities distribute for all team system
• Team motivation to learn new solutions

444
D. Automate Stress and Security Tests Early Reduces Risks performed in other development platforms to extract the testing
and Rework effort, number of detected failures pre and post-delivery, and
Security and stress tests executed at the end of the project schedule adherence.
cause overload of tasks in the project. The defects could be ACKNOWLEDGMENT
detected before when intermediate versions were released
The authors would like to thank INdT, FAPEAM, CNPq
avoiding risks and rework in the project.
(process 575696/2008-7) and INCT-SEC (processes
Spending time to do this kind of tests at the beginning of
573963/2008-8 and 08/57870-9) for the financing this research.
the project aggregates value, knowledge and confidence for the
agile team. REFERENCES
E. Use Test Automation for Documentation and Information [1] E. Dustin, J. Rashka, J. Paul (1999), Automated software testing:
Feedback introduction, management, and performance. Boston: Addison-Wesley,
vol. 1,pp- 4.
Test tools are also highlighted in the technical literature as
[2] K. Karhu, T. Repo, O. Taipale, K. Smolander (2009), Empirical
an important element for documenting software artifacts. In the Observations on Software Testing Automation. In Proceedings of the
context of these agile projects, some tools should be cited: 2009 International Conference on Software Testing Verification and
• Testlink (testing management tool) controlled all Validation (ICST '09). IEEE Computer Society, Washington, DC, USA,
information regarding testing activities, test cases pp. 201-209. DOI=10.1109/ICST.2009.16.
specification and validation, creation of new releases, [3] E. Kit (1995), Software Testing in the Real World: Improving the
test running, number of detected failures, and bug Process. Reading, MA: Addison-Wesley.
tracking (creation, correction, and validation). [4] H. Zhi-gen, Y. Quan; Z. Xi (2009), Research on Agile Project
• Hudson to support CI (used in Project 2 and 3). It Management with Scrum Method, IITA International Conference on
provides interface to display tests releases status, Services Science, Management and Engineering (SSME '09). IEEE
Computer Society, Washington, DC, USA, pp. 26-29.
report test log and all integrated tests. It also provides DOI=10.1109/SSME.2009.136.
the overview and metrics regarding the status of
[5] E. Collins, V. Lucena (2010). Iterative Software Testing Process for
testing, and reports quickly problems occurring during Scrum and Waterfall Projects with Open Source Testing Tools
this execution. Experience. In Proceedings of the 22nd IFIP International Conference
on Testing Software and Systems2010( ICTSS’10), pp. 115-120, [ISBN
V. CONCLUSION : 978-2-89522-136-4] .
This paper presented the experience in performing [6] L. Crispin.; J. Gregory (2009); Agile Testing: A Practical Guide for
strategies for test automation in agile software development Testers and Agile Teams, Addison-Wesley, ISBN 0-321-53446-8.
Scrum. We could observe the influence of agile values on team [7] K. Beck, et al. (2001). "Manifesto for Agile Software Development".
organization and test automation. These experiences showed Agile Alliance. Retrieved February 2012.
that it is feasible to project team work in collaboration to solve [8] B. Marick (2007); Everyday Scripting with Ruby: For Teams, Testers,
problems, search for integrated testing tools and keeping the and You; Pragmatic Bookshelf, ISBN 0-9776166-1-4.
management and organization of a software testing and scrum
[9] T. Wissink, C. Amaro (2006). Successful Test Automation for Software
process. The automation testing was a resource to automate Maintenance. 22nd IEEE International Conference on Software
repetitive tasks, document software, reduces cost of project Maintenance, pp. 265-266. DOI: 10.1109/ICSM.2006.63 .
using open source test tools, and task allocation in small parts. [10] L. Damm, L. Lundberg, D. Olsson, D. (2005). Introducing Test
On the other hand, the programmers’ attitude in these Automation and Test-Driven Development: An Experience
scenarios was very important to experiment new approaches Report. Electronic Notes in Theoretical Computer Science, 116
and tools. Some lessons learned could be extracted and they (SPEC.ISS.), pp. 3-15. Elsevier. DOI= 10.1016/j.entcs.2004.02.090.
could support other software engineers when performing agile [11] J. Kasurinen, O. Taipale, K. Smolander, “Software Test Automation in
test automation strategy in a similar environment. Practice: Empirical Observations,” Advances in Software Engineering,
As next steps, we are evaluating the effectiveness of the vol. 2010, Article 4 (January 2010), 13 pages.
DOI=10.1155/2010/620836.
Project 3 agile test automation practices in new software
projects when compared to the scenario where testing are [12] G. Myers (2004): The Art of Software Testing. Ed. John Wiley & Sons,
Inc., Hoboken, New Jersey.

445

You might also like