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 theAPPS & ARTIFACTS
tab of your Build’s page.
Let’s put this all together!
- Insert the
Script
Step as the first Step in your workflow. - Click the Step.
-
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 theDeploy to Bitrise.io
Step you will be able to download this file from theAPPS & ARTIFACTS
tab. - Since screen recoding is not supported through Javascript, we advise you to add the screen recording / screen capturing and the file retrieving shell commands to your own
test.js
file. - 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 (
BITRISE_DEPLOY_DIR
). - Insert the
Deploy to Bitrise.io - Apps, Logs, Artifacts
Step to your workflow so that it can export your test results to theAPPS & 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.