Saturday, August 1, 2020

Appium up and running (working example)


Contents:

1) Introduction
2) Basic setup
3) Applications
4) Example project
5) Android tests overview

1. Introduction

A few weeks ago I introduced you to multiple Android testing tools. One of them (Appium) was listed on top of the pyramid as the most powerful one. You can do almost everything with Appium, which makes it the perfect choice for automating your E2E test regression. 


In this article, I'd like to introduce you to the Appium setup and show a few examples which were just shared on my GitHub project


2. Basic setup


Mobile tests are difficult mostly because of complicated setup. Assuming you would use Java I recommend those tutorials:


a) Appium Installation guide for Windows - swtestacademy

b) Appium Installation guide for Mac - swtestacademy

c) Appium iOS test setup - Medium

d) Appium Android test setup - Medium


After completing tutorials you should have all of those installed and working:

  • Android Studio
  • XCode
  • Android Emulator 
  • iPhone Simulator
  • Appium server

3. Applications

So here is another hurdle. What do we test? I prepared my code examples for the following applications:

a) iOS (tested with iOS 13.5)
b) Android (testing with API level 28)

4. Example project

Having all of that up&running you can start the fun part: testing. You need to do the following steps:

a) Download my GitHub project (requires Java 11)
b) Run Appium server, Android Emulator, and iPhone Simulator
c) Change paths to applications in config.properties
d) For iOS tests you need to change spring.active.profiles value to iphone
e) Run tests 

5. Android tests overview

For Android I have covered:
- Basic clicking via multiple activities
- Text input via classic API and adb
- Screenshot taking example

6. iOS tests overview

For iOS I have covered:
- Basic clicking via multiple screens
- Text input via classic API
- Screenshot taking example


Enjoy and have fun :)

No comments:

Post a Comment