Test automation strategies

you are likely to get three answers. readers will learn the benefits and drawbacks of test automation. Part of this is because ―automation‖ covers a great deal of ground. The issue is that most people are looking to automation to fix all their testing ills. the question revolves around what people hope to achieve from automation.Test automation strategies You’re the QA director or CIO at a growing software Contents The benefits and drawbacks of test automation Devising a test automation strategy: Getting started organization. if you have problems with manual testing. as well as key strategies for test automation. Depending on your situation. Most are looking to reduce costs or speed the testing process or make testing more efficient or ―better‖ in some way. This is fine as far as it goes. allowing good testers to examine the results carefully for anomalies that may inform their testing effort. all of which is dependent on the context they work in. The benefits and drawbacks of test automation By: Peter Walen What are the benefits of automation in software testing? What are the drawbacks? This is a question that. Page 2 of 8 Sponsored by . if you ask two knowledgeable people. But like many software organizations. In reality. it can also help you create scenarios that are not capable of being tested manually. provide quick feedback and manage technical debt. automation can help you by executing mundane tasks. Where do you get started? In this E-Guide. From my experience. The simple fact is. They are looking for a silver bullet to address their problems. They are hoping that automation tools will address problems that manual testing practices have not been able to address. You’re sold on the idea that test automation is necessary in order to keep your team on track. you have none at all. automation will not fix them – it is likely to compound them.

I believe this is the greatest benefit of test automation – not reducing testing. In this way. you may send an invalid transaction to a system you are testing to make sure it is handled correctly.Test automation strategies For example. This can free up testers to focus on less mundane tests that can reveal interesting behavior about the system. result-oriented work. gave it to the test team. Allowing a series of basic processes to run. so the company bought a vendor GUI test automation tool. more directed tests. To send 300 or 400 transactions. some basic automation exercising happy-path functions can allow more detail-oriented work to be done by the testers to investigate aspects of the application they may not be able to otherwise. hands-down success is in a continuous integration environment. customers to provide examples of desired behavior. may be more than a manual test effort can absorb. invalid in a combination of ways. you have none at all. It must be done with the same care and thought that goes into writing production code. exercising sample functions of the application. can quickly find problems that would delay or prevent other. Contents The benefits and drawbacks of test automation Devising a test automation strategy: Getting started Devising a test automation strategy: Getting started By: Lisa Crispin You’re the QA director or CIO at a growing software organization. programmers to design maintainable tests and more. Here’s the news: automating tests is software development. provide quick feedback and manage technical debt. You may send three or four other invalid transactions. but allowing more productive. And it needs a diversity of people and skills: testers to know the right things to test. and waited for the magic to happen. Where do you get started? The whole-team approach The history of test automation is littered with failed ―test automation projects. You’re sold on the idea that test automation is necessary in order to keep your team on track.‖ Test automation sounded like a good idea. One area where I believe automation is an absolute. Page 3 of 8 Sponsored by . But like many software organizations.

Test automation strategies Test automation succeeds when the whole development team treats it as an Contents The benefits and drawbacks of test automation Devising a test automation strategy: Getting started integral part of software development. Learning to do it well takes time. Then we brought in an expert to do training on it. First we tried brown bag sessions at lunch where the whole team tried writing unit tests. Should you tackle automating unit tests with test-driven development? Would GUI tests be the easy win? It’s helpful to outline a strategy for automating tests. but finally we just had to budget time to get traction on it. Change is hard. and people are motivated to change when they feel pain. Page 4 of 8 Sponsored by . when my team wanted to try test-driven development (TDD). the best approach is to identify the biggest obstacle. They can then write manual regression testing scripts to ensure those areas work. then try a small experiment to get around it. Believe me. get everyone on the team together to divide up these manual test scripts and execute the manual regression testing. In my experience. effort and lots of small experiments. Start by sharing the pain of manual regression testing. For example. right? Ask the testers to work with customers to identify the most critical areas of the application. having to slog through tedious manual regression test scripts provides major motivation for automating tests! Overcome barriers to automation Your cross-functional team has all the skills needed to overcome barriers to test automation. The last day or two of each iteration. Your product can’t be released to production without regression testing. It’s not any harder or easier than writing production code. That helped. Get together for some time-boxed brainstorming meetings to identify the impediments standing in the way of automating tests. I’ve been on three teams that took this approach. which involves automating unit-level tests. we couldn’t figure out how to do that with our nasty legacy code.

quick to run and provide a good safety net as part of a continuous integration process. They form the solid base of just about any test automation strategy.Test automation strategies Plan your automation strategy Contents The benefits and drawbacks of test automation Devising a test automation strategy: Getting started There are so many tests to automate and so little time. it pays to focus on the automation that will provide you with the best return on investment (ROI). learning to automate unit tests is the obvious place to start. and provide the best return on investment. They are quick to write. If your team has no test automation. Unit and component tests verify our code design and architecture. Mike Cohn’s Test Automation Pyramid provides a good guideline. Page 5 of 8 Sponsored by .

Writing and maintaining them takes more time than unit tests. Even so. and compare actual and expected results. you might have a domain where specifying inputs and expected outputs in a spreadsheet works better. Once you’ve found a format to try. you can get some quick wins with simple GUI tests covering the most critical functionality. at the API or service level. These tests generally take the place of the user interface. Does a given/when/then format work well for your business experts? Perhaps your business domain lends itself to a tabular test format. While the team masters TDD and grows its unit test library.Net. more GUI tests than anything else. you just use the flavor of xUnit that goes with your production programming language. For API and GUI level tests. In my experience. Most teams start with an ―upside-down‖ pyramid. and may require more frequent updating. Or. Today’s test libraries and frameworks allow us to automate and maintain GUI tests more cheaply than the old-school record/playback tools. obtain results. they run more slowly than unit or API-level tests. They pass test inputs to production code. you might be able to ―grow your own. look for a test library or framework that supports that. The test automation pyramid represents our long-term goal. such as JUnit for Java or NUnit for . a two-pronged approach to start automating tests on a legacy system works well. but they provide crucial feedback. If your team has enough bandwidth. and they generally run more slowly. but you won’t get there overnight. Choosing tools We don’t have a wide array of tools at the unit test level.‖ Use retrospectives to evaluate whether your experiment is Contents The benefits and drawbacks of test automation Devising a test automation strategy: Getting started Page 6 of 8 Sponsored by . You can ―flip‖ the pyramid over time. Some businesses prefer working with a time-based scenario. start by experimenting with how you’d like to specify your tests.Test automation strategies The next-best return on investment is the middle layer of the triangle.

my team had zero automated tests. and do a small experiment to overcome it. we must continually look for the most effective ways to automate our tests. The right choices now will mean big returns in the long term. Just take that first step.Test automation strategies having good results. Automated test code deserves the same respect. Contents The benefits and drawbacks of test automation Devising a test automation strategy: Getting started Collaborating Automating tests is coding. In December 2003. For each defect that your team fixes. Once the test passes. check in the test and the code. It makes sense for the people writing production code to also write the test automation code. As our application changes. Testers are expert at knowing the right tests to automate. with data and scenarios that represent production.000 JUnits. Get started Pick one problem to solve. Eight years later. It took us eight months just to get traction on automating unit tests via TDD. Other team members contribute expertise that helps us get timely feedback. It just makes sense to have everyone on the team work together to automate tests. care and feeding as production code. This is a big investment. first write a unit test to reproduce the problem. and to create a suite of GUI regression tests for the most critical parts of the legacy code. If not.‖ an idea from Jared Richardson. start a different experiment. We know within 45 minutes of any code check-in whether it broke anything. try ―defect-driven development. Each of these contains multiple assertions. This is a journey. we have over 6. If automating unit tests seems too daunting. over 500 FitNesse test pages and over 122 GUI test scripts. then correct the code. Page 7 of 8 Sponsored by . not a destination.

virtual trade shows. developing strategy and making cost-effective purchase decisions. and the ability to interact with peers—all to create compelling and actionable information for enterprise IT professionals across all industries and markets. Our live events and virtual seminars give you access to vendor neutral. the networking and face-to-face opportunities of events and virtual events. Our team of editors and network of industry experts provide the richest. What makes TechTarget unique? TechTarget is squarely focused on the enterprise IT space. We leverage the immediacy of the Web. independent content and analysis and the Web’s largest library of vendor-provided white papers. research reports and more —drawing on the rich R&D resources of technology providers to address market trends.Test automation strategies Contents The benefits and drawbacks of test automation Devising a test automation strategy: Getting started Free resources for technology professionals TechTarget publishes targeted technology media that address your need for information and resources for researching products. expert commentary and advice on the issues and challenges you face daily. videos. challenges and solutions. podcasts. Our network of technology-specific Web sites gives you access to industry experts. most relevant content to IT professionals and management. Our social community IT Knowledge Exchange allows you to share real world information in real time with peers and experts. webcasts. Related TechTarget Websites Page 8 of 8 Sponsored by .