Appium
Help Documents menu

Appium

Updated on: 2022-09-26 15:57

Appium is an open-source automated test framework for automating mobile apps. Please refer to Appium Official Doc for detailed introduction.

Running Appium Test on WeTest Cloud Servers

WeTest Appium testing is when you upload your existing Appium tests to WeTest Cloud and then, either using the API or the cloud UI, select and start test execution on multiple devices. The benefits of this approach are that you do not need to modify your Appium tests, the execution of tests can be parallelized on multiple devices, and you can view test analysis when the execution is finished.

WeTest installs your uploaded mobile app under test (AUT) into the specified mobile devices and runs your appium automation test script on WeTest’s cloud servers to automate your apps.

Followings are script running environment on WeTest Cloud Servers

  • Operating System : Ubuntu 20.04.2 LTS
  • Python : 2.7 and 3.8
  • Appium : 1.19.1 for Android, 1.20.2 for iOS

WeTest supports running any test framework or environment in customer-defined Docker images. If you want to run tests on your own test environment, please feel free contact us.

WeTest also supports your Appium test running on your local environment with a wide range of WeTest Cloud Mobile Devices. For more information, please refer to Appium Local Testing.

Architecture for Running Appium Test on WeTest Cloud

Technical Solution Architecture

Please follow the steps below to prepare your appium script and your app bundle (.apk or .ipa files) for submitting to WeTest and start your first test!

1. Prepare your app

Android

Make sure you have the app made for testing. It’s an .apkor.aab file for Android app.

iOS

Make sure you have the app made for testing. It’s an .ipa file for iOS app.

2. Prepare your appium test suite(Sample)

Download WeTest Sample

Sample code can be downloaded from our official github repository. Here, we use Python. Please write your tests in Python 2.7 or Python 3.8 or above.

WeTest would automatically analyze result (an XML file %UPLOADDIR%/TEST-ALL.xml generated by xmlrunner) of your test cases written in unittest unit test framework.

You can add your own cases between the lines in demo_cases.py

# your test cases start here

# your test cases end here

Create your script zip file

WeTest accepts a zip file as the Appium script package. Please zip all test script files(.py files) and relevant files into one .zip file.

You can run sh create-zip.sh to zip your file. Sample zip contents(Python):

script.zip
-- demo_cases.py #your test cases in python
-- runTest.sh  #used to start the automation test execution

3. Upload and Run first automation test

Now, your app and test script is ready. It is is time to upload and submit your first test on WeTest Cloud.

  • Go to WeTest Console and choose Automation.
  • Create a new test run for this project.
  • Upload the tested App (apk/aab/ipa) at the first step.
  • Choose Appium framework and upload the above-created zip file.
  • Choose the devices manually or randomly.
  • Select optional advanced options and submit your test run.
  • Test results will be available in the cloud in Test Analysis.

Sample

Android Appium Test Script

Sample Script - Android Appium Test

iOS Appium Test Script

Sample Script - iOS Appium Test