Modern testing for modern stacks

GUI automation: DIY guides

GUI automation is great for broad stack testing. GUI tests (in general) run slower, take longer to develop and are harder to maintain than API automation and unit tests. So balance your GUI automation with API automation and unit tests. If you are the first professional tester at your company, we strongly recommend you start with GUI automation for a simple reason - GUI tests have enormous social ROI. An under-appreciated aspect of GUI automation are their inherent theatrical nature. Testing performances rarely evoke positive emotion. Good testing is usually not memorable. Not many testing artifacts make testing memorable. Story-telling seems to be our best bet to make good testing memorable within our companies. GUI tests are a visual spectacle. People see the application being exercised automagically. This visual display evokes positive emotions in non-testers. The emotion causes people to relate positively to testing and the testers. It makes the testing (technically "checking") performance a memorable event.

Here are several tutorials we have written on GUI automation. These cover popular tools like Selenium and Appium.

1. SELENIUM, PYTHON AND THE PAGE OBJECT MODEL Intermediate
This post will show you how to use Selenium and Python to implement the Page Object pattern. We wrote this for people already familiar with Selenium and Python but need help making their test scripts more robust.

2. BATMAN AND PAGE OBJECTS Beginner
We have taken the creative route to explaining the page object pattern. If you are new to the page object pattern, start here. No code, just the concept and nananananananana ... BATMAN!

3. HOW TO WRITE ROBUST XPATHS Intermediate
Every tester I onboard knows how to write xpaths but the xpaths are not robust. Poor xpaths cause automation to fail often and in turn give Selenium a bad rep. This post will teach you how to write robust xpaths.
Looking for good advice on CSS selectors? Someone else wrote this piece much better than we could!

4. MOBILE AUTOMATION: GET STARTED WITH APPIUM ON AN EMULATOR Beginner
Stop fearing mobile automation! Its easy to get started. This tutorial is ideal for rank beginners and has helped many testers start with Appium and mobile automation.

5. MOBILE AUTOMATION: SELENDROID Beginner
This tutorial is aimed at rank beginners. We will show you how to get setup with an Android emulator and how to use Selendroid. Our best guess is that Appium is going to be the default choice for mobile GUI automation. But it does not hurt to know another technology.

6. MOBILE AUTOMATION: APPIUM, PYTHON WITH PHYSICAL MOBILE DEVICES Beginner
This tutorial will show you how to run your Appium tests against real, physical Android devices. This step by step guide is perhaps the most popular tutorial we have ever written!

7. MOBILE AUTOMATION: IDENTIFYING UI ELEMENTS Beginner
We have Firebug and xpather to identify UI elements in web applications. Ever wondered what the equivalent was for mobile apps? This blog post is a comprehensive guide showing different ways and tools to identify UI elements in mobile applications.

8. MOBILE AUTOMATION: RUNNING AUTOMATION ON MULTIPLE DEVICES Advanced
Make your mobile automation more robust! This tutorial will show you how to run the same test against a range of devices and OS versions.

9. MOBILE AUTOMATION: PINCH, ZOOM AND SWIPE! Intermediate
Learn how to perform gestures using Appium and Python.

10. MOBILE AUTOMATION: SCROLLING THROUGH TABLES AND SEARCH RESULTS Advanced
In this post we show you how to scroll through a table and identify elements. We also tackle the case where the table spans multiple pages. This is a natural and common workflow on most mobile devices. A typical use case involves the user performing a search within a mobile application. The app returns a table of results. The user then scrolls through the results and clicks on the result she likes.

paper cut