-
Notifications
You must be signed in to change notification settings - Fork 101
Dev Environment Setup
This wiki will guide you through the dev environment set, build, and project run. Please refer to CONTRIBUTING.md if you care more about the collaboration model, PR review, or coding conventions.
We recommend using IntelliJ IDEA as the Java/SpringBoot project IDE, and the community edition would suffice.
Select correto-11 JDK in project structure and click apply.
Add-ons including JPA Buddy and PlantUML Integration are strongly recommended.
For code design we leverage the PlantUML as UML tools. Therefore, you can install the PlantUML Integration plugin to preview the design diagrams. For instance, you can view agent side code design in folder: agent/doc/UML.
And for the front-end React powered Web UI, the code lives in react folder, you may take Visual Studio Code as editor. Please refer to the react/README.md to understand the setup procedures.
To learn how to build the code and run tests, follow the instructions in the README.
- Install Java SDK link (at least jdk 11, or skip this if you are using the IDEA provided JDK)
- Install Python 3.7+ link
- Install Android SDK link
- Install Node.js link, Win-ARM64
- [Optional] Install Appium execute
npm install -g appium
- [Optional] Install WinAppdriver 1.2.1
- [Optional] Install FFmpeg: Download ffmpeg-release-essentials.7z from link, unzip and add bin folder into PATH
- Install Gradle as the build tool by using the gradlew/gradlew.bat commandline.
- Config Environment Variables - System variables (take this as a reference)
Type | Variable Name | Example 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;C:\Program Files\nodejs |
Appium | APPIUM_BINARY_PATH | C:\Users\demo\AppData\Roaming\npm\node_modules\appium\build\lib\main.js |
FFmpeg | Path | C:\Program Files\ffmpeg-4.4.1-essentials_build\bin |
Go to react folder, & run:
cd react
npm ci
npm run pub
You may refer to the README to learn more about the WebUI project.
If you want to enable OAuth2, please set up an AAD Client in Azure and set the spring.security.oauth2.enabled
in application.yml
to true
. Learn more.
If you want a quick pilot and don't care about the Oauth2 enablement, then simply leave the spring.security.oauth2.enabled
with false
, and build and run the Hydra Lab center service in localhost with the following commands.
Note: Hydra Lab uses Azure Blob Storage as a cloud file storage solution to persist log files, video, app packages, etc. Please go to your Azure portal and open an Azure blob storage account, and get the connection string, and place it in the env var with the name BLOB_CONNECTION_STR. Then you can run the center jar with the following command:
# In the project root, switch to react folder to build the Web front.
cd react
npm ci
npm run pub
# Get back to the project root, and assemble the center runnable Jar
cd ..
gradlew :center:bootJar
# Run it, and then visit http://localhost:9886/portal/index.html#/
java -jar center/build/libs/center.jar
# Then visit http://localhost:9886/portal/index.html#/auth to generate a new agent ID and agent secret.
Register a agent in Hydra Lab Center and then add modify the application.yml file in Hydra-Lab root folder.
app:
# register to Hydra Lab Center
registry:
# The server hostname:port of Hydra Lab Center. If nginx enabled, switch to port of nginx
server: {SERVER_HOSTNAME_PORT}
# The Agent info registered in Hydra Lab Center
id: {YOUR_REGISTERED_AGENT_ID}
secret: {YOUR_REGISTERED_AGENT_SECRET}
# TODO Maybe we can save this effort, user can provide name in the center portal and we can get the name from center.
name: {YOUR_AGENT_NAME}
# Agent Type {1 : 1*WINDOWS + n*ANDROIDS , 2 : 1*WINDOWS+1*ANDROID , 3 : iOS}
agent-type: {YOUR_AGENT_TYPE_INDEX}
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: