This application is a simple native Android Profile Manager application that allows users to log in, update their information, and log out. The focus of this project is testing the application using Appium with WebdriverIO written in TypeScript.
Assuming you already have NodeJS installed on your machine, install application dependencies using the following:
npm install
You will also need to have all associated Appium dependencies and an Android emulator installed on your machine. Check out my blog, Test a Native Android App with Appium and WebdriverIO for helpful links to get setup.
Configuration files live in the config
directory. The Page Object Model is used to organize framework code and lives in the test/pageObjects
directory. Test data lives in the test/data
directory. Finally, tests live in the test/specs
directory.
There are two scripts to run the test. The first script runs the application locally:
npm run wdio
The second script runs the application on BrowserStack:
npm run wdio.browserstack
You will need to have a BrowserStack account with environment variables set for BROWSERSTACK_USERNAME
, BROWSERSTACK_ACCESS_KEY
, and BROWSERSTACK_APP_ID
to run tests on their platform.
AllureReport reports are created after each test run and are stored in the allure-results folder. Use the following script to generate an HTML viewable report:
npm run report
Junit Reporter reports are created after each test run and are stored in the junit-report folder.
A Jenkinsfile
is located in the project root if running tests on a Jenkins server is desired.