Table of content
The objective of this repository is to describe how is possible:
- To have mobile test automated using
webdriverIO
andCucumber
framework andAppium
libraries.
-
Install Android Studio
-
Install Android SDK
- Android SDK
- Create a new Android Studio Project with default settings for API 30(Or Desired API) and No Activity.
- Continue to import and install any settings suggested by the SDK.
-
Install node modules
- Make sure you have installed node (node version should be 16 or higher).
- After clonning the repository run:
npm install
-
(Optional) Install Appium & Appium inspector: These tools will help to find the locators of the different elements for development
-
Run the android emulator:
- Open the "Android Studio" app.
- Tools -> Device manager -> Create device
- Run the device after it is created
-
Install EriBank application on the emulator:
- Download EriBank apk from: https://experitest.s3.amazonaws.com/eribank.apk
- Drag and drop the apk into the emulator
IMPORTANT: Be sure that the emulator ID is emulator-5554
(default one). If not, update the capabilities
of the wdio config file (See wdio.conf.js).
- To check the list of attached devices, run in a terminal:
adb devices
The available npm commands are defined in package.json
To run any of the commands, execute from a terminal:
npm run <command>
For example, to run all the test cases defined in the suit, execute:
npm run test
After the suite finishes, an html
report is generated in ./reports/html/index.html
:
The available commands are:
test
: To run all the test cases locally
After wirting the new scenario, you can add a unique tag temporary to that test case, for example @test
.
Then you can run the following command to only execute the test case you are working on:
npm test -- --cucumberOpts.tagExpression='@test'
The default log level is error
. Execute the following command to change the suite log level:
npm test -- --logLevel info