You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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
18
</div>
18
19
20
+
21
+
19
22
<spanid="what-is"></span>
20
23
## What is Hydra Lab?
21
24
22
-
As mentioned in the above video, Hydra Lab is a framework that can help you easily build a cloud-testing platform utilizing the test devices/machines in hand.
25
+
Hydra Lab is a framework that can help you easily build a cloud testing platform utilizing the test devices/machines in hand.
26
+
It enables dev team to quickly build a self-manageable and intelligent cloud testing infrastructure. With the help of Hydra Lab, you can:
27
+
28
+
- Either: Create a new cloud testing network.
29
+
- Or: Onboard your test device to an existing network with a minimized effort.
23
30
24
31
Capabilities of Hydra Lab include:
25
32
- Scalable test device management under the center-agent distributed design; Test task management and test result visualization.
26
-
- Powering [Android Espresso Test](https://developer.android.com/training/testing/espresso), and Appium(Java) test on different platforms: Windows/iOS/Android/Browser/Cross-platform.
Hydra Lab offers an out-of-box experience of the Docker image, and we call it `Uber`. You can follow the below steps and start your docker container with both a center instance and an agent instance:
58
+
Hydra Lab offers an out-of-box experience of docker image called Uber. You can follow the below steps and start your docker container with a center instance and an agent instance built in:
59
+
60
+
**Step 1. download and install Docker from https://www.docker.com**
51
61
52
-
**Step 1. Download and install [Docker](https://www.docker.com)**
62
+
**Step 2. run on your machine**
53
63
54
-
**Step 2. Run on your machine**
64
+
Simply choose one of the following commands to start your experience on Hydra Lab:
55
65
56
-
By Default, Hydra Lab will use the local file system as a storage solution, and you may type the following in your terminal to run it:
66
+
**1. use local storage service**
67
+
68
+
Hydra Lab Uber image uses local file system as default storage, no extra environment variable is needed:
57
69
58
70
```bash
59
71
docker run -p 9886:9886 --name=hydra-lab ghcr.io/microsoft/hydra-lab-uber:latest
60
72
```
61
73
62
-
> We strongly recommend using [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs/) service as the file storage solution, and Hydra Lab has native, consistent, and validated support for it.
74
+
**2. use third-party storage service**
75
+
76
+
Hydra Lab currently supports [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs/) as cloud file storage solution to persist various file types such as log files, video, app package, etc.
77
+
Any contribution to integrating other third-party storage services is welcome. (Here's the UML class diagram for this module as a reference: [storage service structure](https://github.com/microsoft/HydraLab/blob/main/docs/images/UML/storage_system_design.png).)
78
+
79
+
Some extra environment variables need to be specified in the command according to the storage service type.
80
+
81
+
If you want to use Azure Blob storage, please go to your Azure portal, open an Azure Blob storage account, and get the [connection string](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string).
82
+
Brief steps: [Login Azure](https://azure.microsoft.com/) -> [Portal](https://portal.azure.com/#home) -> [Storage Accounts](https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Storage%2FStorageAccounts) -> Create new storage account (you may disable the public access for the container) -> In the created storage account, find `Access Keys` tab -> copy `Connection string`.
You may write the following content in an env file (e.g. env.properties):
86
+
```
87
+
STORAGE_TYPE=AZURE
88
+
BLOB_CONNECTION_STR=${YOUR_BLOB_CONNECTION_STR}
89
+
```
90
+
91
+
Then pass the path of the file to docker container
92
+
93
+
```bash
94
+
docker run --env-file env.properties -p 9886:9886 --name=hydra-lab ghcr.io/microsoft/hydra-lab-uber:latest
95
+
```
63
96
64
-
**Step 3. Visit the web page and view your connected devices**
97
+
Or simply run with the env parameter -e:
98
+
99
+
```bash
100
+
docker run -e STORAGE_TYPE=AZURE -e BLOB_CONNECTION_STR=${YOUR_BLOB_CONNECTION_STR} -p 9886:9886 --name=hydra-lab ghcr.io/microsoft/hydra-lab-uber:latest
101
+
```
102
+
103
+
**Step 3. visit front-end page and view your connected devices**
65
104
66
105
> Url: http://localhost:9886/portal/index.html#/ (or your custom port).
67
106
68
107
Enjoy starting your journey of exploration!
69
108
70
109
**Step 4. Perform the test procedure with a minimal setup**
71
110
72
-
Note: For Android, Uber image only supports **Espresso/Instrumentation** test. See the "User Manual" section on this page for more features: [Hydra Lab Wikis](https://github.com/microsoft/HydraLab/wiki).
111
+
Note: For Android, Uber image only supports **Espresso/Instrumentation** test. See "User manual" section on this page for more features: [Hydra Lab Wikis](https://github.com/microsoft/HydraLab/wiki).
73
112
74
-
**To run a test with Uber image and local storage:**
75
-
- On the front-end page, go to the `Runner` tab and select `HydraLab Client`.
113
+
**1. To run a test with Uber image and local storage:**
114
+
- On the front-end page, go to `Runner` tab and select `HydraLab Client`.
76
115
- Click `Run` and change "Espresso test scope" to `Test app`, click `Next`.
77
116
- Pick an available device, click `Next` again, and click `Run` to start the test.
78
117
- When the test is finished, you can view the test result in the `Task` tab on the left navigator of the front-end page.
**2. To run a test with Uber image and any third-party storage service, additional steps are required before the same steps in `1.`:**
122
+
- Download [record_release.apk](https://github.com/microsoft/HydraLab/tree/main/common/src/main/resources/record_release.apk) and [record_androidTest.apk](https://github.com/microsoft/HydraLab/tree/main/common/src/main/resources/record_androidTest.apk) from GitHub.
123
+
- On the front-end page, go to `Runner` tab and click `Upload`.
124
+
- Select the downloaded app `record_release.apk` for `APK/IPA FILE` and test app `record_androidTest.apk` for `TEST APK/JAR/JSON FILE`.
125
+
- Click `Upload` and wait for it to finish.
126
+
- Follow the steps of 1. to run the test.
127
+
128
+
Notice:
129
+
- The package record shown on the page is preloaded for LOCAL storage only. If you try to run it with a different storage type, you will get an error.
130
+
- You need to upload the package again if you want to use your own storage service instead of LOCAL storage.
131
+
- You can never use more than one storage type in the official service. The above specific situation only occurs in Uber image where the context and database are set up with LOCAL storage as the default option for new users.
> If you encounter the error: `Error: error:0308010C:digital envelope routines::unsupported`, set the System Variable `NODE_OPTIONS` as `--openssl-legacy-provider` and then restart the terminal.
106
159
107
-
**Step 2. Run Hydra Lab agent service**
160
+
**Step 2. build and run Hydra Lab agent service.**
-[Trigger a test task run in the Hydra Lab test service](https://github.com/microsoft/HydraLab/wiki/Trigger-a-test-task-run-in-the-Hydra-Lab-test-service)
132
-
-[Deploy Center Docker Container](https://github.com/microsoft/HydraLab/wiki/Deploy-Center-Docker-Container)
188
+
-[Deploy a test agent service](https://github.com/microsoft/HydraLab/wiki/Deploy-a-test-agent-service)
189
+
-[Create an Appium UI Test Automation Project](https://github.com/microsoft/HydraLab/wiki/Create-an-Appium-UI-Test-Automation-Project)
190
+
191
+
> Note: If you are a Microsoft FTE and want to onboard to the internal Hydra Lab testing service, please visit [our SharePoint site](https://microsoftapc.sharepoint.com/teams/MMXDocument/SitePages/Hydra-Lab-test-automation-service-onboarding-guideline.aspx) to learn more about the internal service instance.
192
+
193
+
<spanid="who-use-it"></span>
194
+
## Who are using Hydra Lab?
195
+
196
+
It's already powering the UI test automation of the following Microsoft products:
197
+
- Microsoft Phone Link (Windows UWP app) and Link to Windows (Android app)
198
+
- Microsoft Launcher (Android)
199
+
- Microsoft Outlook/Edge (Android/iOS)
200
+
- Microsoft Fluent UI Android/Yammer Android
133
201
134
202
<spanid="contribute"></span>
135
203
## Contribute
136
204
137
-
Your contribution to Hydra Lab will make a difference for the entire test automation ecosystem. Please refer to **[CONTRIBUTING.md](CONTRIBUTING.md)** for instructions.
205
+
Your contribution to Hydra Lab will make a difference for the entire test automation ecosystem. Please refer to **[CONTRIBUTING.md](CONTRIBUTING.md)** for contribution instructions.
138
206
139
207
### Contributor Hero Wall:
140
208
@@ -145,8 +213,17 @@ Your contribution to Hydra Lab will make a difference for the entire test automa
145
213
<spanid="contact"></span>
146
214
## Contact Us
147
215
148
-
You can reach us by [opening an issue](https://github.com/microsoft/HydraLab/issues/new) or [sending us mails](mailto:[email protected]).
216
+
Feel free to dive in! If you have questions about Hydra Lab, or you would like to reach out to us about an issue you're having, you can reach us as follows:
217
+
-[Open an issue](https://github.com/microsoft/HydraLab/issues/new) or submit PRs.
-[Hydra Lab: the next generation cross-platform software testing infrastructure open-sourced by Microsoft](https://medium.com/@nathanbu/we-open-sourced-a-new-test-framework-on-github-in-microsoft-fd31f8861d1e)
224
+
-[Release Notes](https://github.com/microsoft/HydraLab/releases), [Hydra Lab on Up For Grabs](https://up-for-grabs.net/#/filters?names=438)
225
+
-[Appium: Cross-platform automation framework for all kinds of your apps built on top of W3C WebDriver protocol.](https://github.com/appium/appium)
226
+
-[Google Android Tools Ddmlib: A ddmlib jar that provides APIs for talking with Dalvik VM.](https://android.googlesource.com/platform/tools/base/+/master/ddmlib/)
150
227
151
228
<spanid="ms-give"></span>
152
229
## Microsoft Give Sponsors
@@ -155,6 +232,8 @@ Thank you for your contribution to [Microsoft employee giving program](https://a
0 commit comments