Beginning to Automate Our Systems
Long time lurker, first time poster here. Recently at work I've been given the task of "heading up the automation effort". Which basically means examining our systems (iOS app, Android app, and cloud) and (1) figuring out what CAN be automated, and (2) automating it.
That being said, I have zero automation experience. I believe I was chosen for the task because I have a CS minor, and have a little experience in Python, Ruby, C, Objective-C, and Unix. So technically it shouldn't be a big problem.
My question is essentially: do you know of any good articles or books, or have any advice yourself, on how to get started with automation. As in, what questions or concerns that I should resolve before actually beginning automating? What do I look for in determining whether something can be automated? Also, what are some good resources for someone looking to learn automation? Just dive right in and RTFM? Or are there some general practices that I should be aware of?
Sorry for the long post, but thanks for reading!
Without knowing your testing experience, this is going to be a bit generic, but it should give you some ideas on where to start.
First off, just because something CAN be automated doesn't mean it SHOULD be. You have come experience with coding, so you know how "interesting" programming can get. When you strip down to the basics, automation is writing code that wraps around another application and simulates a user in order to act on the application - so it can get very complex indeed.
Your first goal should probably be to identify where the 80/20 rule falls for your applications - the 20% of the application that gets 80% of the use. That's your first automation target.
Next, refine that 20% to identify its 80/20 rule. Things like logging on, remembering user credentials, and navigation generally fall into this group. Those are where you look to automate first.
What you'll discover very quickly is that automation code faces a constant tension between DRY and keeping the tests self-contained. Whichever direction you take, you'll find yourself refactoring a LOT. You'll also realize pretty quickly that you need a number of helper routines in your code to do things like give yourself a known starting environment (precisely how you do this will depend on your application(s) under test - for business software connected to a database it's common to code restoring a known backup and working from that), perform setup and teardown, and export results. You may need to have your setup routines perform an installation.
For more specifics, I'd suggest browsing the SQA Stack Exchange site test-automation tag. (Software Quality Assurance & Testing Stack Exchange). There's a lot of good, specific information there.
Now to tools: you will need some kind of automation tool. For web applications, Selenium WebDriver is popular, free, and supports multiple languages, which makes it a pretty good choice to start working with if it suits your AUTs. For iOS and Android the choices are more limited and someone is likely to have to find budget for them (the same applies to Windows applications). If your workplace doesn't already have a tool that can operate with everything you use, you'll need to evaluate several and produce some kind of business case to support your evaluation. I'd strongly recommend having gone as far as you can with free tools before you make that case.
Great advice from katepaulk, although I would like to suggest using Selendroid (Selendroid: Selenium for Android) for Android testing if you are going to go the Selenium way. It's just as free and integrates nicely with Selenium.
katepaulk made many great points.
not only will 'what to automate' be a major player, but also 'how to automate' because longevity of tests as your application evolves will have a large impact on your test framework success over time.
here's an article that discusses some items to look for called Adaptive Automated GUI Testing
there are many other articles out there, each with their own bias, so best to read each stand point, investigate and then form your own conclusion based on what you've learned and how it applies to your specific case.