|
16 | 16 | [What is Hydra Lab?](#what-is) | [Get Started](#get-started) | [Who are using Hydra Lab?](#who-use-it) | [Contribute](#contribute) | [Contact Us](#contact) | [Links](#links) | [Wiki](https://github.com/microsoft/HydraLab/wiki) |
17 | 17 |
|
18 | 18 | <span id="what-is"></span> |
19 | | -## Hydra Lab是什么? |
| 19 | +## Hydra Lab 是什么? |
20 | 20 |
|
21 | | -Hydra Lab 是一个基于Spring Boot & React 构建的服务框架,帮你快速构建一套集测试运行部署、测试设备管理、低代码测试等功能于一身的跨平台云测服务,开箱即用. |
22 | | -It enables dev team to quickly build a self-manageable and intelligent cloud testing infrastructure. With the help of Hydra Lab, you can: |
| 21 | +Hydra Lab 是一个基于 Spring Boot & React 构建的服务框架,帮你快速构建一套集测试运行部署、测试设备管理、低代码测试等功能于一身的跨平台云测服务,开箱即用。 |
| 22 | +它使开发团队能够快速建立一个可自我管理的智能云测试基础设施。在 Hydra Lab 的帮助下,你可以: |
23 | 23 |
|
24 | | -- Either: Create a new cloud testing network. |
25 | | -- Or: Onboard your test device to an existing network with a minimized effort. |
| 24 | +- 搭建:创建一个新的云测试网络。 |
| 25 | +- 加入:以最小的代价将你的测试设备部署到现有的网络上。 |
26 | 26 |
|
27 | | -Capabilities of Hydra Lab include: |
28 | | -- Scalable test device management under the center-agent distributed design; Test task management and test result visualization. |
29 | | -- Powering [Android Espresso Test](https://developer.android.com/training/testing/espresso) |
30 | | -- Appium(Java) test on different platforms: Windows/iOS/Android/Browser/Cross-platform |
31 | | -- Case-free test automation: Monkey test, Smart exploratory test |
| 27 | +Hydra Lab 的特性包括: |
| 28 | +- center-agent 分布式设计下的可扩展测试设备管理;测试任务管理和测试结果可视化。 |
| 29 | +- 支持 [Android Espresso Test](https://developer.android.com/training/testing/espresso)。 |
| 30 | +- 支持在不同平台上进行 Appium(Java) 测试:Windows/iOS/Android/浏览器/跨平台。 |
| 31 | +- 无用例的自动化测试:Monkey test,智能探索测试 |
32 | 32 |
|
33 | | -For more details, see [Introduction: What is Hydra Lab?](https://github.com/microsoft/HydraLab/wiki) |
| 33 | +更多细节,请参见 [介绍:什么是 Hydra Lab?](https://github.com/microsoft/HydraLab/wiki) |
34 | 34 |
|
35 | 35 | <span id="get-started"></span> |
36 | | -## Get Started |
| 36 | +## 入门 |
37 | 37 |
|
38 | | -Please visit our **[GitHub Project Wiki](https://github.com/microsoft/HydraLab/wiki)** to understand the dev environment setup procedure: [Contribution Guideline](https://github.com/microsoft/HydraLab/wiki/Contribute-to-the-Hydra-Lab-GitHub-Project) |
| 38 | +请访问我们的 **[GitHub 项目 Wiki](https://github.com/microsoft/HydraLab/wiki)** 以了解开发环境的配置流程: [贡献指南](https://github.com/microsoft/HydraLab/wiki/Contribute-to-the-Hydra-Lab-GitHub-Project) |
39 | 39 |
|
40 | | -**Supported environments for Hydra Lab agent**: Windows, Mac OSX, and Linux ([Docker](https://github.com/microsoft/HydraLab/blob/main/agent/README.md#run-agent-in-docker)). |
| 40 | +**Hydra Lab agent 支持的环境**:Windows, Mac OSX, 和Linux ([Docker](https://github.com/microsoft/HydraLab/blob/main/agent/README.md#run-agent-in-docker)). |
41 | 41 |
|
42 | | -**Supported platforms and frameworks**: |
| 42 | +**支持的平台和框架**: |
43 | 43 |
|
44 | 44 | | | Appium(Java) | Espresso | |
45 | 45 | | ---- |--------------|---- | |
46 | 46 | |Android| ✔ | ✔ | |
47 | 47 | |iOS| ✔ | x | x | |
48 | 48 | |Windows| ✔ | x | |
49 | | -|Web (Browser)| ✔ | x | |
| 49 | +|Web (浏览器)| ✔ | x | |
50 | 50 |
|
51 | 51 | <span id="quick-start"></span> |
52 | | -### Quick guide on out-of-box Uber experience |
| 52 | +### 开箱即用的 Uber docker 镜像快速指南 |
53 | 53 |
|
54 | | -Hydra Lab uses [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs/) as cloud file storage solution to persist log files, video, app package, etc. Please go to your Azure portal, open an Azure blob storage account, get the [connection string](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string), |
55 | | -and place it in the environment variable with the name of BLOB_CONNECTION_STR. |
| 54 | +Hydra Lab 使用 [Azure Blob 存储](https://azure.microsoft.com/en-us/products/storage/blobs/) 作为云文件存储解决方案,以持久化存储日志文件、视频、应用包等。请访问你的 Azure 门户,打开一个 Azure Blob 存储账户,获取 [connection string](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string) 。 |
| 55 | +并将其放入环境变量中,名称为 BLOB_CONNECTION_STR。 |
56 | 56 |
|
57 | | -Hydra Lab offers an out-of-box experience of docker image. By providing BLOB_CONNECTION_STR simply, you can follow the below steps and start your docker container with a center instance and an agent instance built in: |
| 57 | +Hydra Lab 提供了一个名为 Uber 开箱即用的 docker 镜像。在简单地配置环境变量 BLOB_CONNECTION_STR 后,你可以按照下面的步骤,启动内置了一个 center 实例和一个 agent 实例的 docker 容器: |
58 | 58 |
|
59 | | -**Step 1. pull Docker image from container registry** |
| 59 | +**第1步. 从容器注册中心获取 Docker 镜像** |
60 | 60 | > docker pull ghcr.io/microsoft/hydra-lab-uber:latest |
61 | 61 |
|
62 | | -**Step 2. run on your machine with BLOB_CONNECTION_STR** |
| 62 | +**第2步. 在你的机器上运行,并使用 BLOB_CONNECTION_STR 作为参数** |
63 | 63 | > docker run [-p 9886:9886] [--name=hydra-lab] -e BLOB_CONNECTION_STR=${BLOB_CONNECTION_STR} ghcr.io/microsoft/hydra-lab-uber:latest |
64 | 64 |
|
65 | | -**Step 3: visit front-end page and view your connected devices** |
| 65 | +**第3步. 访问前端页面并查看你的已连接设备** |
66 | 66 |
|
67 | | -> Url: http://localhost:9886/portal/index.html#/ (or your custom port). |
| 67 | +> Url: http://localhost:9886/portal/index.html#/ (或自定义的端口号). |
68 | 68 |
|
69 | | -Enjoy starting your journey of exploration! |
| 69 | +开始享受你的探索之旅吧! |
70 | 70 |
|
71 | | -**Note: out-of-box Uber now only provides the Espresso test feature for Android, please refer to this section for more features: [For Hydra Lab User](#for-user)** |
| 71 | +**注意:Uber 现在只提供安卓系统的Espresso测试功能,更多的功能请参考本节:[对于 Hydra Lab 用户](#for-user)** |
72 | 72 |
|
73 | | -### Quick guide on build and run |
| 73 | +### 构建和运行的快速指南 |
74 | 74 |
|
75 | | -You can also run the center java Spring Boot service (a runnable Jar) separately with the following commands: |
| 75 | +你也可以用以下命令单独运行中心 java Spring Boot 服务(一个可运行的 Jar): |
76 | 76 |
|
77 | | -> The build and run process will require JDK | NPM | Android SDK platform-tools in position. |
| 77 | +> 构建和运行过程需要用到 JDK | NPM | Android SDK 平台工具。 |
78 | 78 |
|
79 | | -**Step 1: build and run Hydra Lab center service.** |
| 79 | +**第1步. 构建并运行 Hydra Lab center 服务。** |
80 | 80 |
|
81 | 81 | ```bash |
82 | | -# In project root, switch to react folder to build the Web front. |
| 82 | +# 在项目根目录,切换到 react 文件夹来构建 Web 前端文件。 |
83 | 83 | cd react |
84 | 84 | npm ci |
85 | 85 | npm run pub |
86 | | -# Get back to the project root, and build the center runnable Jar. |
87 | | -# For the gradlew command, if you are on Windows please replace it with `./gradlew` or `./gradlew.bat` |
| 86 | +# 回到项目根目录,构建 center 可运行的 Jar 。 |
88 | 87 | cd .. |
| 88 | +# 对于 gradlew 命令,如果你使用的是 Windows 系统,请用`./gradlew`或`./gradlew.bat`替换。 |
89 | 89 | gradlew :center:bootJar |
90 | | -# Run it, and then visit http://localhost:9886/portal/index.html#/ |
| 90 | +# 运行并访问 http://localhost:9886/portal/index.html#/ |
91 | 91 | java -jar center/build/libs/center.jar |
92 | | -# Then visit http://localhost:9886/portal/index.html#/auth to generate a new agent ID and agent secret. |
| 92 | +# 然后访问 http://localhost:9886/portal/index.html#/auth 来生成新的 agent ID 和 agent secret 。 |
93 | 93 | ``` |
94 | 94 |
|
95 | | -**Step 2: build and run Hydra Lab agent service.** |
| 95 | +> 如果你遇到了以下错误: `Error: error:0308010C:digital envelope routines::unsupported`, 设置环境变量 `NODE_OPTIONS` 的值为 `--openssl-legacy-provider` 并重启命令行。 |
| 96 | +
|
| 97 | +**第2步. 构建并运行 Hydra Lab agent 服务。** |
96 | 98 |
|
97 | 99 | ```bash |
98 | | -# In project root, copy the sample config file and update the: |
99 | | -# YOUR_AGENT_NAME, YOUR_REGISTERED_AGENT_ID, and YOUR_REGISTERED_AGENT_SECRET. |
| 100 | +# 在项目根目录下,复制示例配置文件并更新: |
| 101 | +# YOUR_AGENT_NAME, YOUR_REGISTERED_AGENT_ID 和 YOUR_REGISTERED_AGENT_SECRET 。 |
100 | 102 | cp agent/application-sample.yml application.yml |
101 | | -# Then build agent jar and run it |
| 103 | +# 然后构建 agent jar 并运行它 |
102 | 104 | gradlew :agent:bootJar |
103 | 105 | java -jar agent/build/libs/agent.jar |
104 | 106 | ``` |
105 | 107 |
|
106 | | -**Step 3: visit http://localhost:9886/portal/index.html#/ and view your connected devices** |
| 108 | +**第3步. 访问 http://localhost:9886/portal/index.html#/ 并查看你的已连接设备** |
107 | 109 |
|
108 | 110 | **Technical design overview:** |
109 | 111 |
|
|
0 commit comments