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
Deploy to Bitrise.io Steps. Here is why:
ScriptStep executes what you insert in its input field
Deploy to Bitrise.ioStep delivers your test result to the
APPS & ARTIFACTStab of your Build’s page.
Let’s put this all together!
- Insert the
ScriptStep as the first Step in your workflow.
- Click the Step.
Insert the following command to the
Script contentinput 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.ioStep you will be able to download this file from the
APPS & ARTIFACTStab.
- 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 - Apps, Logs, ArtifactsStep to your workflow so that it can export your test results to the
APPS & ARTIFACTStab 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.