The Screen Design pattern is the same pattern to mobile applications as the Page Object creation pattern is to web application testing.

The Screen Design pattern uses a software object to interact with the mobile screen visible to the user. Other objects use it in testing use cases.


  • Easy maintenance and refactoring
  • Less time and cost than other methods (play-and-record, etc.) for creating and maintaining test code
  • Extendable features and separation of implementation class to drive the tests
  • Allows for elegant, smart, object-oriented design and make testing entirely data-driven (ie, drive many test cases without needing to do any programming)

The orange lines connecting the layers indicate which layers are interacted with by the other layers.

Let's get started!

Step 1 - Install (if needed) the required software to run the example

  • Java for iOS
  • Apache Ant (latest version)
  • XCode v5.1
  • Node.js (install using Brew and NOT the UI version that requires admin password)
  • Appium - v1.0 or later - Install Inspector and command-line tools
  • Make sure all of these executable are in your $PATH variable

Step 2 - Download the SQAEvangelist open-source automated testing framework (Java-based) and compile

Step 3 - Download the mobile and test applications

Step 4 - Configure and Run

  • In the official_ios/SQAEvangelistTestAppTest/tests/conf/, edit this line to your
    location on your local system. Example:
  • Open a terminal/command prompt window and "cd" to the directory: official_ios/SQAEvangelistTestAppTest/tests
  • Type:

Step 5 - Watch the tests run and be happy!

  • Example screen shot of the example mobile app being displayed in the XCode iPhone simulator

  • Example screen shot of a successful login: positive test case

  • Example output from ant and display perfect test results :)