Monday, April 1, 2013

Why Automate?

For many of you, your initial answer to the question "Why automate?" may be "Because management wants me to."  This is, of course, a valid reason.  But after you have a few automated tests written, you will discover other, more important reasons:


  • It saves you time.
At first it will seem as if automation is a huge time-sink, because it will take several weeks to get your automation system up and running.  But once it's in place, it will save you valuable testing time.  As I am writing this blog, all of my automated smoke tests are running.  Even without looking at our application, I will know if something went wrong with the build this morning.

  • It frees you from some repetitive tasks.
We have a search form in our application that has four editable fields: Last Name, Company, Email, and Phone Number.  In order to test this feature well, I would need to test with every possible permutation: just one field at a time, two fields at a time, three fields at a time, and finally four fields at a time.  This adds up to fifteen searches.  It's rather tedious to do this every time I need to test the search function.  But my automated test is happy to run through these fifteen searches, as many times as I tell it to.

  • It helps you to think more critically about your testing.
When I'm manually testing, I tend to follow a written plan and add in a few ad hoc tests as well.  But when I'm writing an automated test, I need to think about why I'm running the test.  The test engine will not be exploring, so I'm going to need to tell it to do something very specific.  What are the minimum steps required to ensure that the feature works?  Will I need to vary those steps for broader coverage, and what will be the most efficient way to do that?

  • It helps you to understand your development team.
Before I started writing automated tests, I knew a bit about coding from my college courses, but I'd never had real hands-on experience.  Using an IDE and writing in Java helped me have more sympathy for what developers go through in order to code, and it also taught me how programs are structured and how the build process works.  This has helped me become a better tester.


The path to learning automation won't be easy, but it will teach you important skills, streamline your testing process, help you understand the development life-cycle, and improve your thinking about your tests.

No comments:

Post a Comment