-
Notifications
You must be signed in to change notification settings - Fork 102
Home
Le Zhou edited this page Jun 21, 2022
·
36 revisions
Welcome to Hydra-Lab Wiki.
- Install Java sdk link (at least jdk 11)
- Install Python 3.7+ link
- Install Android sdk link
- Install Node.js link
- Install Appium execute
npm install -g appium
- Install WinAppdriver 1.2.1
- Config Environment Variables - System variables (take this as a reference)
Type | Variable Name | Value |
---|---|---|
Java | JAVA_HOME | C:\Program Files\Java\jdk-11.0.14 |
Java | CLASSPATH | .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar; |
Java | Path | %JAVA_HOME%\bin |
Java | Path | %JAVA_HOME%\jre\bin |
Python | Path | C:\Python38| |
Python | Path | C:\Python38\Scripts| |
Android | ANDROID_HOME | C:\Users\demo\AppData\Local\Android\Sdk |
Android | ANDROID_PLATFORM_TOOLS | C:\Users\demo\AppData\Local\Android\Sdk\platform-tools |
Android | Path | %ANDROID_HOME% |
Android | Path | %ANDROID_PLATFORM_TOOLS% |
Node | NODE_PATH | C:\Users\demo\AppData\Roaming\npm\node_modules |
Node | Path | C:\Users\demo\AppData\Roaming\npm |
Appium | APPIUM_BINARY_PATH | C:\Users\demo\AppData\Roaming\npm\node_modules\appium\build\lib\main.js |
- Create a storage account https://portal.azure.com/#create/Microsoft.StorageAccount-ARM
- Create 4 containers: pkgstore, images, testsuitestore, testresults
- Change access level of them to Container (anonymous read access for containers and blobs).
Go to react_network_center_portal folder, & run:
npm install
npm run pub
Add a .env file in network_center/src/main/resources. If you want to enable OAuth2, please set up an AAD Client in Azure and modify ${the spring.security.oauth2.enabled} in application.yml to true value. more
BLOB_CONNECTION_STR=${Azure Blob Connection String}
DEFAULT_USER=defaultUser@1234.com
MICROSOFT_PROVIDER_CLIENT_ID=${Microsoft AAD Client ID}
MICROSOFT_PROVIDER_AUTHENTICATION_SECRET=${Microsoft AAD Client Secret}
Register a agent in Hydra Lab Center and then add a .env file in network_agent/src/main/resources.
BLOB_CONNECTION_STR=${Azure Blob Connection String}
AGENT_SECRET=${Generated in Hydra Lab Center}
AGENT_ID=${Generated in Hydra Lab Center}
AGENT_TYPE=${1:Run test in Android, 2:Run test in Winwows+Android, 3:Run test in iOS}
Name | Android | IOS |
---|---|---|
Get Device List | android-ddmlib + Map | xcrun xctrace list devices / tidevice list --json (tidevice) |
Monitor Device Status | android-ddmlib(IDeviceChangeListener) | tidevice watch |
Get Screenshot | android-ddmlib(IDevice) | tidevice screenshot $path_to_save_img |
Wake up Device | adb -s {} shell input keyevent {} | Appium: driver.unlockDevice() |
Grant Permission | adb -s {} shell pm grant packageName permissionName | Appium: driver.runAppInBackground(Duration.ofSeconds(-1)) |
Install/Uninstall App | adb -s {} install/uninstall | tidevice install $path_to_testApp / tidevice uninstall com.microsoft.packageName / tidevice install idb launch com.microsoft.packageName |
Record Video | Screen Record App | Appium |
Introduction:
User manual:
- Deploy Center Docker Container
- Deploy Agent Docker Container
- Test agent setup
- One-Line-Installer Agent Setup
- [DEPRECATED]Deploy a test agent service
- Trigger a test task run in the Hydra Lab test service
- Create an Appium UI Test Automation Project
- Create test build and run XCTest
- Test Task Customization
- FAQ
Developer guideline:
- Start Services with Default Configuration
- Dev Environment Setup
- Technical Design
- Integrate Hydra Lab test center with Microsoft AAD authentication service
- Upgrade the test agent service from center service
News: