Micro Focus is now part of OpenText. Learn more >

You are here

You are here

Coding is key to a test automation career: Are you prepared?

T.J. Maher Software Test Engineer, Verily Life Sciences
Clone trooper legos frantic on a keyboard

I've put a lot of time and effort into studying automation development, but I haven't been an automation developer for long. I spent many years laying the groundwork, and now I am putting together a proof of concept for an Appium/Java mobile test automation framework. 

The biggest wake-up call for me, a manual tester trying to get into automation, was that automation isn't about relying on learning a single testing tool, as it was in the old days, when Rational Rose, Segue SilkTest, and Mercury Quick Test Pro dominated. Now it's much more difficult. In order to do really well in test automation, you must learn how to code.

I am not saying that all QA engineers must know how to code. But if you're a manual tester attempting to break into test automation, your time may be better spent learning a programming language than learning the ins and outs of an automation tool. 

I taught myself how to code and gained employment as an automation developer—and you can too. All it takes is five difficult steps. 


Why learn automation development? 

Traditionally, a QA engineer's role has been a non-coding one. As a software quality assurance engineer, your primary role on the software development team is to be an end-user advocate, seeing the product through the eyes of the customer. You need to use—and abuse—the product just as end users would. You can do this through processes such as exploratory testing, described in Cem Kaner's Testing Computer Software:

“What are the boundaries expected for a certain input? What happens if you push beyond those boundaries, giving unexpected or illegal responses, just to see how the system under test will behave?”

By automating the regression test suite, you'll have more time to explore the system you're testing and how it behaves. 

During April's Lean Coffee for the Ministry of Testing Meetup in Boston, I asked, "How can manual testers looking to move to automation learn how to code?" This quickly turned into another question: Should QA engineers learn to code?

Llewellyn Falco, author of The Mob Programming Guidebook, responded, "Everyone should know how to code! It's like reading and writing. You may not have authored a book, but you should know how to read and write."  

I agree. When I was in school studying software engineering, my testing was enhanced once I started learning more about the business analyst role, database development, and software development. So here's what to do:

Step 1: Pick a language, any language

It doesn't matter what you pick as your first programming language: Java, JavaScript, Python, and even Ruby are all good candidates if you want to break into automated testing. Here's a quick rundown:

  • Selenium WebDriver/Java is a favorite pairing for testing enterprise software, and a good all-around language to know. But note that companies are still transitioning from Java 7 to Java 8, even though the latest version came out many years ago. 
  • JavaScript pairs nicely with many different JavaScript front-end frameworks, such as VueJS. Protractor was created by Google to test AngularJS apps. Nightwatch.JS and SeleniumJS pair well with Node.JS and server-side JavaScript. Also try learning E6, the latest versions of JavaScript.
  • With Python, you can quickly hack together things that work. Selenium with Python is a lot less verbose.
  • Ruby is another easy-to-learn language. When Ruby on Rails was at its peak, developers used it whenever they wanted to create a simple web app. But there doesn't seem to be as much demand for it in automation anymore.  


Step 2: Code, code, code

Not long ago I was an out-of-work software tester without much experience coding. I had some coding experience back in grad school, but that was ten years in the past. So, to get used to coding again, I worked through all of the examples in the free eBook Learning Python the Hard Way. If you need a lot of hand-holding, this is the book for you.

Working with Python also helped, since the language has a relatively shorter ramp-up time. Then I purchased Java for Testers, to ease me into the Java programming language. Anything by The Evil Tester, himself, Alan Richardson, is gold.

But reading about coding is not enough. You must code! I remember when I first started trying to learn from Richardson's Selenium WebDriver in Java online course. I'd listen to the lectures and watch the videos everywhere—even on trains, planes, and subways. But because I wasn't actually coding along with the instructor, it didn't sink in.  

When you're working through an online course, if the video shows the instructor typing code into IntelliJ, you should be doing the same. In my case, I set up the left half of my screen with the video playing in a browser, while in the right half I typed away and attempted to run the code examples. 

If you still need more hand-holding, consider enrolling in a massive open online course (MOOC). Many organizations offer online courses that are free or cheap. Here are just a few:

  • edX, part of Mooc.org, describes itself as "offering high-quality courses from the world’s best universities and institutions to learners everywhere."
  • Khan Academy, which "offers practice exercises, instructional videos, and a personalized learning dashboard that empower learners to study at their own pace in and outside of the classroom."
  • Udemy, "a global marketplace for learning and teaching online where students are mastering new skills and achieving their goals by learning from an extensive library of over 45,000 courses taught by expert instructors."

Looking for information on coding in Java? EdX, Harvard, and MIT's MOOC offer three new introductory Java courses:

If you are a mobile tester, learning about the inner workings of Android app development will help you figure out how to set up Appium. I also recommend the Google Android Developer's site, which:

While bootcamps won't make you a coder, much of the documentation for open-source tools, languages, and frameworks is available online, as are free online tutorials. It's all just a Google search away. 

Step 3: Create a GitHub account and explore 

If you haven't already, sign up for a GitHub account. GitHub is a magical place where you can examine the latest open-source automation toolsets and receive instruction and the most up-to-date information from the creators of the tools themselves. They also provide sample tests, so others can learn their toolsets. You'll find tools such as:

  • SeleniumHQ, which has documentation on all the latest bindings of this number-one GUI automation tool in C#, JavaScript, Java, Ruby, and Python
  • Appium, the Selenium WebDriver for mobile applications
  • Protractor, a Node.JS-based automation tool you can use to help test AngularJS applications
  • REST Assured, the Java-based framework that helps you test RESTful APIs

The beauty of GitHub is that as long as you allow the code in your GitHub repository to be displayed publicly, it is completely free! 

Do you have any code samples or projects that you want to include in an online coding portfolio? Upload them to GitHub and include a link to your account on your résumé. GitHub has an extensive help section on how to create an account and upload your code. You also will learn about how code is processed, from branching to merging to creating pull requests!

Step 4: Write a quick-and-dirty automated test

Now it's time to go public by writing your first automated test on your favorite site and placing the results on GitHub. Once I got a hang of things, I started looking around for things to automate, such as Dave Haeffner's The Internet, a practice test site created for beginning automation developers.

Do you have your own automation solution you have created? Share it, and get feedback!

Step 5: Think you know it? Keep practicing.

The most important thing is not to stop practicing to code once you're hired as a test automation engineer. Learning is a never-ending journey.

Whenever I learn something valuable, I come up with sample code, then attempt to write a few code walkthroughs, which I place on my blog. I started off simply, with The Internet as my test site. Then, after a few more months of work experience, I tried to figure out how to automate a bit of Amazon's site. From there, I started tinkering with API testing, first with Apache's HTTP Components, then with Postman, and finally with the Java REST Assured library. Currently, I am in the middle of figuring out Appium Desktop, a tool I want to use to explore mobile applications.  

To keep yourself motivated to continuously learn, chart your progress in a blog, then list it with the Ministry of Testing.

The rest is up to you

I can tell you from firsthand experience that, if you go through this process, you're far more likely to be hired as an automation developer. Why? Because you can prove to an employer the most important skill of all: that you are a self-starter who is willing to teach yourself.

Want to know more? Team up with your peers. If you're in the Boston area, stop by one of the Ministry of Testing's Lean Coffees I attend, or go to a meetup in your area. And if you want to bounce around more ideas and best practices, leave me a comment below. 


Image credit: Flickr

Keep learning

Read more articles about: App Dev & TestingTesting