e2e-test for Hodlnaut
- npm run test:android (ready)
- npm run test:android:bs (need accessibilityId for browserstack)
- npm run test:android (waiting for code)
- npm run test:android:bs (need accessibilityId for browserstack)
- Download and install Node.JS ( at least 10.X or 14.17.0 )
- Install Visual Studio Code
- Clone and checkout the github project
- Go to the terminal and execute "npm install" inside the checked out folder
We defined a default configuration (config/wdio.android.conf.js) for Android which will be executed when you run "npm run test:android".
Be sure that you have:
- installed the latest Android Studio version.
- Set the environment variable called 'JAVA_HOME' to the jre directory (C:\Program Files\Android\Android Studio\jre)
- plugged in any android device into your computer. Leave it unlocked.
- allowed USB-Debugging on the connected android device
- set the platform version inside android config (config/wdio.adndroid.conf.js) to the version on your android device.
We defined a default configuration (config/wdio.android.bs.conf.js) for Android which will be executed when you run "npm run test:android:bs".
We defined a default configuration (config/wdio.ios.bs.conf.js) for iOS which will be executed when you run "npm run test:ios:bs".
We use eslint to lint the typescript files. The prettier plugin in eslint tries to autoformat the code on every run.
All test cases should be coded inside the test folder. There you can organize tests for different apps (e.g. msb-app) and define generic classes with getters and setters to use classes those methods inside other classes.
We work with the Page Object Pattern described in https://webdriver.io/docs/pageobjects.html. The main idea is to encapsulate logic into page classes and use the logic in the spec files to run the tests. For instance we defined the LoginPage and the element as attributes in a class and reuse them in the code.