Test Automation: Eguide
Test Automation: Eguide
eGuide
COPYRIGHT 2016
TEST AUTOMATION
eGuide
3
Between the mainstream adoption of agile practices and the growing DevOps movement, you may have noticed the word
Bringing the Value of
“continuous” popping up a lot: continuous integration, continuous testing, continuous delivery, continuous deployment.
Your Test Automation
Efforts Front and Center
In today’s continuous-everything, app-centric world, test automation isn’t a nice-to-have; it’s a must-have. To stay competitive in the
marketplace, organizations must automate as many tests as possible to release products as quickly as possible. To maintain an
5 edge in the job market, testers must grow their technical skills to fit into this rapid-release, automated environment.
Why Your Test
Automation Efforts
Should Tackle Data First
COPYRIGHT 2016 2
TEST AUTOMATION
eGuide
3
Bringing the Value of Bringing the Value of Your Test
Automation Efforts Front and Center
Your Test Automation
Efforts Front and Center
5 By Michael Sowers
Why Your Test
Automation Efforts Sometimes, in order to get everyone on board with adopting test au-
Should Tackle Data First tomation, you have to build a business case to highlight the poten-
tial benefits. Once you’ve convinced the organization to make that
7 investment, you should determine whether it’s actually yielding the
predicted benefits—and you’ll want to keep these benefits visible to
Selenium: The Open
key stakeholders to reinforce the value.
Source, the Myth, the
Legend
How do we frame the quantitative and
10 qualitative benefits of test automation
Automation That Learns:
Making Your Computer
in a way that links to the organizational
Work for You objectives and business goals?
13 We tend to have many metrics in place to track the progress of
testing and measure the degree of readiness or risks in our software
The Top 5 Test
products. These metrics include test effectiveness, software quality,
Automation Mistakes
test status, resources, issues, and so forth, but what about metrics
for the test automation platform? How do we frame the quantitative
14 and qualitative benefits of test automation in a way that links to the It’s important to design the dashboard at the beginning of your
The Buzz on Test organizational objectives and business goals? This is an important automation project in order to ensure that the approaches and
Automation element of planning and implementing our automation architecture. tools you choose will yield the measures and metrics you need. Five
dimensions will usually cover the range of information that the team
15 One of the approaches that has worked well for organizations I’ve and key stakeholders require, but of course you can trim or expand
worked with is a test automation dashboard. A useful dashboard these to meet your needs:
Additional Resources for should reflect values that align with the organization and business
Test Automation goals, be agile and adaptable, and contain information that is action- Capabilities include the automation platform features, interface
able and meaningful, with just enough information that it’s still easy capabilities, integrations, types of systems under tests that are sup-
to use and maintain. ported, and scripting languages supported.
COPYRIGHT 2016 3
TEST AUTOMATION
eGuide
3 Usage includes the number of users, teams, and projects; the fre- Challenges capture the constraints or issues with the tools or auto-
Bringing the Value of quency of use of a given automation feature; the rate of automation mation platform.
Your Test Automation adoption; and the frequency of use of test suites.
Efforts Front and Center Investment encompasses the costs (in time or money), such as
Benefits are metrics such as rate of unit test, story test, and non- defects in the automation platform, licenses, platform maintenance,
5 functional automation; ease of learning and use of the automation training and retraining, operation (including hosting, servers, etc.),
platform; scripting or execution efficiency; degree of automation the time to build, maintain, and execute automated tests, and the
Why Your Test suite code coverage; speed and efficiency of the test automation time to investigate defects in the automation test infrastructure or
Automation Efforts infrastructure; hours saved versus manual testing; number of addi- test suites.
Should Tackle Data First tional test cycles achieved per sprint; percent of increased require-
COPYRIGHT 2016 4
TEST AUTOMATION
eGuide
3
Bringing the Value of Why Your Test Automation Efforts
Should Tackle Data First
Your Test Automation
Efforts Front and Center
5 By Linda Hayes
Why Your Test
Automation Efforts
Should Tackle Data First
There is no question that automation poses technical challenges;
you have to get your tool and application to play nice together
If you can’t control, define, and
before automation is even possible. But the most difficult obstacle to predict the state of the data, you
7 success is more mundane: It’s the data. If you can’t control, define,
and predict the state of the data, you won’t have the repeatability
won’t have the repeatability that
Selenium: The Open
Source, the Myth, the that makes automation practical. makes automation practical.
Legend
It starts with the data in the test environment. For a hospital, this gers, or make payments. Defining this data is an integral part of
10 includes which rooms are available, what doctors are on staff, and
which medications are in inventory. For an airline, this means know-
developing your test cases. For a manual test, you can adapt on the
fly by looking for available rooms or experimenting with different
Automation That Learns: ing what routes are flown, which flights are scheduled, and how flights, but an automated test must know the values in advance.
Making Your Computer many seats are available for each trip. You have to control the state Trying to adapt during automated execution is theoretically possi-
Work for You of the data when you start execution because your test must know ble, but usually impractical; it leads to complex logic that introduces
what to expect. ambiguity and instability.
13
Next comes the data you provide during the test. As you execute, Finally, you must be able to predict the result. This is harder than
The Top 5 Test
you will create or transform the data: admit patients, book passen- it sounds. You can’t get away with saying “verify that the value is
Automation Mistakes
14
The Buzz on Test
Automation
15
Additional Resources for
Test Automation
COPYRIGHT 2016 5
TEST AUTOMATION
eGuide
3 correct” like you may be able to in
Bringing the Value of a manual test; you have to specify
Your Test Automation precisely what the correct response
Efforts Front and Center is. Manual testers have so much trib-
al knowledge that they are used to
5 winging it, and reducing experience
to exact values takes extra thought
Why Your Test and effort.
Automation Efforts
Should Tackle Data First Too often, automation projects
start by tackling the technical is-
7 sues first, and only once execution
becomes possible do they start to
Selenium: The Open
trip over the issues with the data.
Source, the Myth, the
In my experience, the data issues
Legend
should come first because they take
15
Additional Resources for
In my experience, the data issues should come first
Test Automation because they take longer to resolve and may involve
other departments and resources.
COPYRIGHT 2016 6
TEST AUTOMATION
eGuide
3
Bringing the Value of Selenium: The Open Source, the
Myth, the Legend
Your Test Automation
Efforts Front and Center
COPYRIGHT 2016 7
TEST AUTOMATION
eGuide
3 Luckily, this is not the reality. While the scenario described here is Open source software compromises security
Bringing the Value of entirely possible, the same can happen with proprietary software. This one I don’t have a problem shouting about. I’ll grant that in
Your Test Automation Also, the developers behind Selenium and similarly successful open organizations with lots of proprietary information it makes sense to
Efforts Front and Center source projects have these challenges much higher on their list of have blanket policies about protection of source code. That being
priorities than you might guess at first. Couple this with the fact that said, I have never heard an argument approaching legitimate claims
5 you can see the source, find the bug, fix it, build it, use it, and share it that supported this point.
with the community, and now you’re firing on all cylinders. If a bug is
Why Your Test problematic enough to frustrate you, it’s frustrating plenty of others. Security is about a lot more than software. It’s about arsenals of
Automation Efforts Call enough attention to it and the community will respond in force. software, and systems designed to protect that software and your in-
Should Tackle Data First formation. I’m not sure what angle people want to take on this, or if
COPYRIGHT 2016 8
TEST AUTOMATION
eGuide
3 tinuous feedback in order to drive long-term improvement in the
Bringing the Value of solution that is delivered. It’s actually that simple.
Your Test Automation
Efforts Front and Center A thousand heads are better than one
There are a lot of smart people in this world. Why not leverage that? A
5 large community of driven people will generate good ideas. This isn’t
a maybe or a likelihood; it happens. Selenium and other open source
Why Your Test projects are what they are today because of their communities.
Automation Efforts
Should Tackle Data First Thanks to the ingenuity, devotion, and real-world experience of
thousands of users, Selenium is constantly progressing toward being
7 a better and more comprehensive browser automation solution. And
this isn’t just a result of the vision of a handful of people, but rather
Selenium: The Open
a reactive and evolutionary process grooming Selenium into the
Source, the Myth, the
solution that real people, doing real work, want it to be.
Legend
COPYRIGHT 2016 9
TEST AUTOMATION
eGuide
3
Bringing the Value of Automation That Learns: Making
Your Computer Work for You
Your Test Automation
Efforts Front and Center
5 By Jeremy Carey-Dressler
Why Your Test
Automation Efforts I have heard it suggested that because automation can only do
Should Tackle Data First checking, automation cannot learn. By “learning,” I will use the
dictionary definition, “the acquisition of knowledge or skills through
7 experience, study, or by being taught.” If I claim that the act of pro-
gramming was teaching a machine, and that was how automation
Selenium: The Open
learns, it would not be a particularly meaningful claim. Instead, what
Source, the Myth, the
I am talking about is the acquisition of knowledge through experi-
Legend
ence and study. I believe automation can, in fact, learn, with a tester
COPYRIGHT 2016 10
TEST AUTOMATION
eGuide
3
Bringing the Value of
Complex search, such as what Google does, is an area that is difficult
to test because of the lack of an oracle. One way to handle this prob-
Given enough searches, you
Your Test Automation
Efforts Front and Center
lem is to take search results between runs and see how different the
results are—this way you can judge if a new version of search is an
demonstrate a trend showing
improvement or not. if the search feature, on
5 average, provided better
One way to do the validation is by looking at the frequency rate of
Why Your Test
Automation Efforts
words you used to search. So, say you search for “Dog” and “Dog”
appears twenty-five times in the top ten items that came back from
results to a user.
Should Tackle Data First your search. You can store this data, then on the next version of
search try “Dog” again. With this, you can create a trend line to individual test that passes or fails, you can consider the entire suite
7 demonstrate whether the search is improving. Maybe the next time of tests as one large test. That is to say, given enough searches, you
you search for “Dog” you find the word twenty-four times. While this demonstrate a trend showing if the search feature, on average, pro-
Selenium: The Open
test might appear like a failure, it doesn’t mean the search engine vided better results to a user.
Source, the Myth, the
is worse overall. Rather than thinking of each search term as an
Legend
In a previous job, we had a system that would take a screenshot of
10 any failed tests. We would manually look at these for patterns before
doing any serious triage because it often was the fastest way. As
Automation That Learns: the number of tests increased, we noticed many fails had similar
Making Your Computer failing screenshots, but the screenshots often were not exactly the
Work for You same. There would be five tests that hit HTTP server errors, but there
would be nothing the automation could find in common because the
13 tests were executed in different browsers.
COPYRIGHT 2016 11
TEST AUTOMATION
eGuide
3 Learn at Runtime
Bringing the Value of There are other ways to leverage knowledge around testing. I
Your Test Automation cowrote a system that automatically did first-level triage on all the
Efforts Front and Center automated tests. We noticed there were patterns we found in our
triage that occurred over and over again. We had an e-commerce
5 website akin to Amazon that had a variety of interesting code paths.
You might use a credit card, or you might use a gift card. You might
Why Your Test order in English, or you might order in Portuguese. You might use
Automation Efforts the search page, the product details page, and cart, but not check
Should Tackle Data First out. When we hand-triaged these tests, we would notice a pattern,
like “All these tests are failing at search . . . better go test that.”
7 It would take thirty minutes to notice the pattern and find the bug.
These were things the automation basically knew about each test,
Selenium: The Open
and it also knew what the ultimate test result was.
Source, the Myth, the
Legend
COPYRIGHT 2016 12
TEST AUTOMATION
eGuide
3
Bringing the Value of
Your Test Automation
The Top 5 Test Automation Mistakes
By Melissa Tondi
Efforts Front and Center
5 I’ve heard from hundreds of people about the biggest mistakes Not Knowing What to Automate
they’ve made in their pursuit of test automation success. Here are The goal should be to automate the right tests. In our selection pro-
Why Your Test five of the most popular answers—and recommendations on how cess, we determine the build verification tests and smoke tests first
Automation Efforts we can stop repeating these mistakes. and automatically make them candidates to automate. These are by
Should Tackle Data First far the most executed tests throughout a cycle for us, so this aligns
Automating Everything well with our strategy. However, we also have clear criteria to ensure
7 Not all tests can or should be automated, so I’m surprised when there is some thought process around determining whether the ROI
I hear that teams are still being measured on the number of tests makes automation worth it.
Selenium: The Open
automated versus the overall value the automation is bringing to the
Source, the Myth, the
Legend team. A better way to approach this is to have a selection process to Thinking Automation Takes Too Much Time
quickly determine when something should be considered for auto- Don’t get caught in the trap of thinking it takes less time to run a test
and technologies available of testing. These engineers should still be intimately involved in the
15 product they are testing.
to ensure their solutions are
Additional Resources for
Test Automation comprehensive and efficient. A good tester will utilize all tools and technologies available to
ensure their solutions are comprehensive and efficient. Test automa-
tion is a valuable process, and if you avoid these common mistakes,
you’ll be able to take full advantage of its effectiveness.
COPYRIGHT 2016 13
TEST AUTOMATION
eGuide
3
Bringing the Value of
Your Test Automation
The Buzz on Test Automation
Efforts Front and Center
INSIGHT FROM AROUND THE INDUSTRY
COPYRIGHT 2016 14
TEST AUTOMATION
eGuide
3
Bringing the Value of
Additional Resources
Your Test Automation MORE INFORMATION FOR SOFTWARE PROFESSIONALS
Efforts Front and Center
13
The Top 5 Test Conferences Providing Innovative Ideas & Solutions for Test/QA Professionals
Automation Mistakes
14 • Keynotes
The Buzz on Test • Tutorials
Automation • Training Classes
• Networking Sessions
15 • Conference sessions
• The Testing Expo
Additional Resources for • The Testing & Quality
Test Automation Leadership Summit
COPYRIGHT 2016 15