testing/integration_test/ENV_SETUP.md
Integration test uses Lynx-E2E as the execution framework and Appium as the underlying execution engine. Therefore, before execution, it is necessary to first set up the local Appium environment.
# First execute the environment preparation in the root directory of Lynx
source tools/envsetup.sh
tools/hab sync -f .
# Install Appium by npm
npm install -g [email protected]
# Install appium-doctor
npm install -g appium-doctor
# Use appium-doctor to check if the environment is set up successfully.
appium-doctor
Check the appium driver list.
appium driver list --installed
✔ Listing installed drivers
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
The above three drivers are essential for running. If they do not exist locally, install them using the following commands:
appium driver install xcuitest
appium driver install uiautomator2
appium driver install espresso
ANDROID_SDK_ROOT environment variableexport ANDROID_SDK_ROOT=<path-to-android-sdk>
java -jar $ANDROID_SDK_ROOT/build-tools/34.0.0/lib/apksigner.jar sign --key $HOME/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.pk8 --cert $HOME/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.x509.pem --out <target-apk-path> <origin-apk-path>
On the iOS side, Appium uses WebDriverAgent as the WebDriver.
First, clone the WebDriverAgent repository to the local machine.
git clone https://github.com/appium/WebDriverAgent.git
Then, open WebDriverAgent/WebDriverAgent.xcodeproj in XCode. And modify following items before building:
Finally, execute the Build operation and install WebDriverAgentRunner onto the device.
appium --port 4723
# The Appium process is a persistent process and needs to be retained throughout the execution of test cases.