Automation Testing for Mobile Applications

by Dhaval Chavada under the Software Testing KA.

A testing technique primarily used to reduce the additional time dedicated to features that are already in existence. It also assists in DevOps practices like CI/CD such that the product is always ready to be deployed at any instant of time.

Classification of the Skill

Test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes. Test automation can automate some repetitive but necessary tasks in a formalized testing process already in place, or perform additional testing that would be difficult to do manually.[1]

Therefore, Automation testing can be considered as technical skill.

A Minisurvey for the CSST Technologies, Inc.

Web site indicate that 40% (102 out of 258 respondents) see software testing methods/process implementation as doing the most to facilitate their testing work.[2]


Pre-requisites of the Skill

The skill set of a tester is not the same as the skill set needed for a automation test engineer, a role that bridges between the tester and the tool. The automation test engineer is responsible for designing, writing, and maintaining the automation software, the scripts, the data, the expected results, and additional tools and utilities.

Now, in a more general sense, a test automation engineer may have the roles combined. If a tester is also a good programmer, then that person could be both a tester and a test automator—we are talking about different roles, not necessarily different individuals. Bottom line, if they don’t have a programming background, they won’t know how to build solid (automation) code, so what they produce may be very costly to maintain when any changes occur to the software being tested that result in changes needed to the automation code[2]

There are (at least) two major abstraction levels (or layers) needed for successful test execution automation:

  • separate the tool and tool-specific detail from the structured testware
  • separate the tests (i.e., what the testers work with) from the structured testware

These are more general requirements gathered from a job posting for automation test engineer[5][6][7]:

  • Experience with programming language
  • Prior Functional and automation testing experience
  • Experience with agile methodologies such as SCRUM
  • Understanding of databases and CI/CD tools such as gitlab
  • Should have proven experience with modern automation tools such as Selenium, Appium, Detox, Jmeter or Rspec
Some additional pre-requisites

Being a automation test engineer not only requires proficient technical knowledge, but also very competent communication skills and attention to details. Many firms do also require knowledge about DevOps practices and with performance and load testing.


Software testing is related to, but different from, static software quality management techniques, proofs of correctness, debugging, and program construction. However, it is informative to consider testing from the point of view of software quality analysts and of certifiers.[4] Here are some of the related areas:

  • Static Software Quality Management Techniques
  • Correctness Proofs and Formal Verification
  • Debugging
  • Program Construction

Rationale for Skill

Automation Testing increases the overall quality of the software. There are various factors in the play like improved test coverage, increased testing efficiency, and a superior level of accuracy which cannot be matched by manual testing.

Benefits of Automation Testing Importance of Automation Testing and its influence on the key aspects of the project[10]

Automation Testing software can playback predefined actions repeatedly. It can compare the results with the expected behavior and this can be repeated at any instant of the development which frees up personnel. In addition to that, test engineers will gain more insight into the development process as they need to create and execute scripts which lets them acquire a better perspective on the technical aspect of the project.


Roles for skill

Roles involved in the process would be Automation test engineer, Test Manager, Tester(Manual), DevOps Engineer and DevOps Manager.

The DevOps members would be involved for creating Test Environment and adding capabilities of Continuous Integration(CI) and Continuous Deployment(CD) for the testing process to automate as much as they can.


The work for this skill scatter into the following:

  • Prepare a Test Plan describing scope, strategy, test types, deadlines and deliverables
  • Test the overall System using appropriate testing techniques and tools
  • Determine testing infrastructure and tools for the project
  • Need to have a cross-plaform testing framework depending on the type of software that is to be tested(Android/iOS).
  • Write test scripts to execute automated tests on the software
  • Document the test artifacts, testing process, defects and linked risks for the current iteration/lifecycle/sprint.
  • Become expert in the installation, operation and features of the mobile application.
  • Scalable and performant automation of tests

Real-World Example/Scenario of Skill

Automation Testing Automation Testing Process

Testing process consists of manual as well as automation testing. Although, most of the steps are common to both of them.[1]

Automation testing process progress in following step:

  1. Test tool Selection

    Every project has their own requirement and the end goal. There are multiple frameworks available catering various features targeting Android,iOS or both. Test Tool should be carefully selected as it affects the whole test automation process as it might ease or decrease the productivity.[8]

  2. Scope of Automation

    Scope defines the functional, features and non-functional requirements of the software. It is very important to define scope of testing which shows which features are targeted and allows testers/developers to narrow down the issues in case of bugs being raised. Moreover, in an agile environment, it helps the testing team to focus the user stories targeted in the current sprint. Scope also lists down which tests are manual and which are automated. It classifies the areas between automation and manual testing.[9]

  3. Planning, Design and Development

    Test Plan is the principle document that contains scope, planning of the process, designing and defining type of tests and development deadlines.[9]

    Automation Testing Example Example of a Automation Test Script[11]

    Here, a significant difference between manual and automation testing is that the latter will have test scripts that will automate the process whereas the former is performed by a Manual Tester. Both are to be well documented with all the steps and expected behaviour. Scripts will be hosted on some VCS(Version Control System) and can be accessed by the testing team.

  4. Test Execution

    Test scripts will be executed in this step. The results will produce test reports which will link test scripts to test cases.

  5. Maintenance

    All the deliverables will be used here to further maintain the project. All the new features in the project will have some effect on the existing test scripts so therefore the deliverables will be helpful to maintain the efficiency of the Automation Test Scripts.


Role of Academia or Industry in Cultivating the Skill

As mentioned above, there are multiple prerequisites for the skill. To develop and inculcate the skill, there are various factors involved in the process.

Academia helps one to develop multiple capabilities that serve as catalysts for the skill. One of the most important would be Documentation. It is a thread that ties everything and keeps it intact. Documentation is the key to traverse back and forth between test cases, bugs, or the feature to which the test case is tied to.

Now to develop this, Academia plays a vital role in supporting and establishing a foundation of documenting various types of projects, scenarios, requirements etc.. Good Documentation is not something that can be learned overnight. It requires a lot of practice that helps to improve on every iteration of the activity.

All that being said, proficiency in programming and knowledge about various programming languages, understanding of version control systems, and planning the process are the major factors that academia assists in developing. Be it theoretical or practical, academia supports in both of the aspects with the help of theoretical concepts, projects, assignments.


Tools Supporting the Skill

Automation testing consists of many frameworks that are used to automate the testing process. So, essentially the test scripts will execute based on the framework chosen and each framework have their own requirement of how to write the test scripts. Each framework might require a specific programming language and that might affect the decision of selecting the framework. However, most important criteria would be framework support for the specific mobile OS and some of them(framworks) are cross-platform i.e they support both of the Operating systems.

Continous Integration(CI) and Continous Delivery(CD) is increasingly popular and automation testing takes a step further. Any web-based CI tool like Gitlab or CircleCI will automate the process humongously. It will bridge the CI/CD process by providing smooth transitions between the Devlopment-Testing-Production environments. Scripts can be configured to run in a pipelines which will automatically push the build to production once it has passed all the test cases. In this way, it enables the Team to provide the ability to have Continous Delivery and is production ready at any instance of time. These are the most popular tools used in the process:

  • Detox [Open source, Cross platform]
  • Cypress [Open source]
  • Mocha [Testing framework for NodeJs programs, can be used as test runner]
  • Calabash [Cross-platform, Used for functional UI testing]
  • Appium [Open source, Cross-platform, Used for functional UI testing]
  • JMeter[Performance and Stress testing]
  • RSpec[Ruby Framework used as test runner]
  • Gitlab, Jenkins, CircleCI [For CI/CD pipelining]
  • Popular IDEs like Intellij IDEA, Webstorm and Visual studio Code

Skill Self-Assessment

Self-Assigned Score = 7/10

Reasons for the score are as follows:

  • Have researched multiple frameworks and tested them extensively for projects before starting with automation.
  • Worked on Cross Platform Automation frameworks like Appium, Detox, Cypress.
  • Have written scripts for both Android and iOS platforms automating almost every interaction on the app.
  • Referred and studied practices from official documentation of the frameworks.
  • Gaining practical exposure by currently working part-time as Developer and Automation Test Engineer.

References

  1. Wikipedia - Test Automation
  2. MOSLEY, D. J., & POSEY, B. A. (2002). Just enough software test automation. Upper Saddle River, NJ, Yourdon Press.
  3. Dorothy Graham and Mark Fewster - Experiences of Test Automation: Case Studies of Software Test Automation ISBN-13: 978-0321754066 Addison-Wesley Professional 2012
  4. SWEBOK v3 - Guide to Software Engineering Body of Knowledge
  5. Test Automation Engineer LinkedIn Job Posting
  6. Senior Test Automation Engineer LinkedIn Job Posting
  7. Test Automation Engineer LinkedIn Job Posting
  8. Automation Testing Tutorial: What is, Process, Benefits & Tools
  9. Test Plan Template: Sample Document with Web Application Example
  10. Importance of Automation Testing
  11. Example of Selenium Webdriver Test Script