Story of test automation using Appium [Android / java]

WithOne AdventCalendar This is the article on the 15th day.

Today's theme is about test automation with appium.

1. What is appium?

It is an open source test framework that extends selenium for mobile, and the supported OS is Android, ios, Firefox OS. There are many types of tools for test automation, but these are the two features of appium.

  1. Can't touch the app to be tested (⇒ Can be tested with the app to be released)
  2. Supports many languages (java, Ruby, Python, C #, Objective-C, JavaScript, php)

2. Environment construction

2.1 Preparation

・ Write a test case

2.2 Installation

Install the following 3 -Java JDK (http://www.oracle.com/technetwork/jp/java/javase/overview/index.html) ・ Android studio (https://developer.android.com/studio/index.html?hl=ja) ・ Aappium (http://appium.io/)

3. Procedure

3.1 Implementation

In test automation, we will write the operation parts (clicking a button, closing a window, scrolling, etc.).

Image 1.png

The above are just a few of the most commonly used. In addition, it is also possible to automatically acquire evidence while operating automatically with a single click, such as outputting the output of expected value and result value to text. With this, the evidence is easy to understand, and design collapses and bugs can be easily found.

3.2 Test execution

  1. Enable adb for the real or virtual device you want to test

  2. Start appium, write the terminal details before pressing Droid, and press the play button. Appium.png

  3. Stream the source from android studio

… After this, it will move automatically without any clicks! !!

4. In the end

By automating the test, it is possible to shorten the test period (time), reduce the test man-hours, and prevent human error. After all, it's quite interesting to see the screen of the smartphone moving automatically without doing anything. If you have a chance, please try it! !!

Recommended Posts

Story of test automation using Appium [Android / java]
The story of pushing Java to Heroku using the BitBucket pipeline
[Java version] The story of serialization
Story of passing Java Gold SE8
Handling of time zones using Java
Summary of object-oriented programming using Java
I tried using GoogleHttpClient of Java
[Android] Implementation of side-scrolling ListView using RecyclerView
Introduction memo of automatic test using Jenkins
Test the integrity of the aggregation using ArchUnit ②
Memorandum of Understanding for Using Appium desktop Inspector with Emulator (Android App)
Sobel filter using OpenCV on Android (Java)
[Java] Test S3 upload / download using "S3 ninja"
Status monitoring of java application using Elasticsearch
Acquisition of input contents using Scanner (Java)
The story of writing Java in Emacs
[Java] [Spring] Test the behavior of the logger
Test the integrity of the aggregation using ArchUnit ③
Try using Firebase Cloud Functions on Android (Java)
Try using JobScheduler's REST-API --Java RestClient Test class-
The story of low-level string comparison in Java
The story of making ordinary Othello in Java
[Android] [Java] Manage the state of CheckBox of ListView
Verification of performance impact when using Java volatile
The story of learning Java in the first programming
Story of implementing login function using gem sorcery
The story of tuning android apps with libGDX
Automatic creation of Java unit test result report
Try similar search of Image Search using Java SDK [Search]
Example of using addition faster than using StringBuilder (Java)
Try communication using gRPC on Android + Java server
Primality test Java
Java static story
[Java] Overview of Java
Java initializer story
Java generic story
Json Request in Unit Test of Controller using MockMvc
[Rails] Test of star evaluation function using Raty [Rspec]
[Android] Display of input candidates using List Popup Window
Try image classification using TensorFlow Lite on Android (JAVA)
Story of passing Java Silver SE8 (Oracle Certified Java Programmer, Silver SE 8)
The story of making Dr. Oakid using LINE BOT
[Java10] Be careful of using var and generics together
The story of making dto, dao-like with java, sqlite