Appium is a popular testing framework to catch defects in native, hybrid, and web apps. You can easily integrate your Appium UI tests into your own Bitrise workflow using our
Script Step. This way you can have the whole testing screen recorded and can visually verify if your app is doing what it’s supposed to do.
In this guide we’ll show how to kickstart Appium and run your UI test specified in the
test.js file, then retrieve the test results and view them on bitrise.io.
We will use our Script and Deploy to Bitrise.io Steps. Here is why:
The Script Step executes what you insert in its input field.
The Deploy to Bitrise.io Step delivers your test result to the APPS & ARTIFACTS tab of your Build’s page.
Let’s put this all together!
Insert the Script Step as the first Step in your Workflow.
Insert the following command to the Script content input field.
appium &> $BITRISE_DEPLOY_DIR/logs.txt & disown npm test
You will find the above mentioned logs.txt file in the Bitrise deploy directory (
BITRISE_DEPLOY_DIR). This logs.txt file contains the outputs of the Appium server. With the help of the Deploy to Bitrise.io Step, you will be able to download this file from the APPS & ARTIFACTS tab.
Once you have pulled the test results (which in this case can be videos and screenshots) from the emulator, make sure you move them to the Bitrise deploy directory (
Insert the Deploy to Bitrise.io Step to your workflow so that it can export your test results to the APPS & ARTIFACTS tab on your Build’s page.
Start a build!
If all went well, you should be able to view the generated test results on the APPS & ARTIFACTS tab of your Build’s page.