Boilerplate project created live on Twitch.tv/CharlyAutomatiza based on CodeceptJS
Esta documentación está disponible también en Castellano.
- Install a git client such as git bash
Download and install
- Latest version of Node.js
Descargar e instalar
-
Java Development Kit (JDK)
- Make sure you have the environment variable JAVA_HOME set to the path of the respective JDK.
-
Appium Desktop.
-
Android Studio and inside the app install.
- SDK Platform: Android 10 or the required version.
- SDK tools:
- Android SDK Build Tools.
- Andorid SDK Command Line Tools.
- Android Emulator.
- Android SDK Platform-tools.
- Intel x86 Emulator accelerator.
- Configure at least one emulator from Android Virtual Device Manager.
- Make sure to add the following environment variables:
- ANDROID_HOME: Add the directory where the Android SDK is located, for example: C:\Users\USERNAME\AppData\Local\Android\Sdk.
- Then respecting the order add these environment variables:
- %ANDROID_HOME%\emulator
- %ANDROID_HOME%\platform-tools
- %ANDROID_HOME%\tools
- %ANDROID_HOME%\tools\bin
- Starting the emulator from the command line:
- List installed emulators:
- emulator -list-avds
- Iniciar el emulador:
- emulator @emulator_name
- As an alternative to any error it can be started with the following command: %ANDROID_HOME%\emulator\emulator.exe -avd <emulator_name>
- List installed emulators:
-
Appium Doctor: To validate that we have everything necessary to carry out our mobile tests, we must install and execute.
- npm install -g appium-doctor
- This will install the utility that will allow us to validate that everything is correctly configured.
- appium-doctor --android
- If we have correctly carried out all the steps above with this command, a success message and some warnings will be displayed.
- In case of a blocking error, it will be displayed on the screen, it must be corrected and re-executed until everything is ok.
- npm install -g appium-doctor
-
APK to test.
- We use for the example the apk provided by WebdriverIO.
- You can run the following from the command line as an alternative:
- curl https://github.com/webdriverio/native-demo-app/releases/download/v0.4.0/Android-NativeDemoApp-0.4.0.apk --output Android-NativeDemoApp-0.4.0.apk
- For the example to work, the apk must be inside the folder /app in the base of our project with the name configured in the capability app of the file codecept.conf.js.
git clone https://github.com/charlyautomatiza/starter-codeceptjs.git
npm install
npm run codeceptjs
npm run open-report