-
Notifications
You must be signed in to change notification settings - Fork 101
Home
Hydra Lab is a framework that can help you easily build an intelligent cloud testing platform utilizing the devices in hand.
Hydra Lab enables dev team to quickly build a self-manageable and intelligent cloud testing infrastructure. With the help of Hydra Lab, you can:
- Either: Build a new cloud testing network with Hydra Lab released packages.
- Or: Onboard your test device to an existing network with low-cost and small effort. Hydra Lab support automated test cases based on Appium(Java) for Android/iOS/Windows/Web(Browser), or Android Espresso.
And more specifically, with the help of this cloud testing infrastructure, the dev team can gain the ability to:
- Check the status & manage the connected devices.
- Upload test app binaries/packages, and then specify and deploy a test task.
- Query test results and view visuals and videos of the test run.
- Manage user permissions and access to test agent.
In short, any dev team can leverage this and quickly (within 1 week) set up a test automation infrastructure using a few local machines and real phones in hand and share it with another team to support the mobile (Android/iOS/Appium) testing workflow.
If you are a Microsoft FTE and want to onboard to the internal Hydra Lab testing service, please visit our SharePoint site to learn more about the internal service instance.
Context diagram:
Containers and Components diagrams:
Hydra Lab Center service container:
Hydra Lab Agent service container:
Code diagrams:
Test runner relation design:
classDiagram
direction RL
class TestRunner {
<<Abstract>>
}
class TestRunEngine {
<<interface>>
TestReport run(TestTask, TestRunDevice)
}
class TestRunLifecycle {
<<interface>>
setup(TestTask, TestRunDevice)
execute(TestRun) throws Exception
analyze(TestRun)
teardown(TestRun)
report(TestRun, TestResult)
help(TestRun testRun, TestResult)
}
interface TestRunningCallback
TestRunner --> TestRunningCallback
TestRunner *--> DeviceManager
TestRunner --|> TestRunEngine
TestRunner --|> TestRunLifecycle
AppiumRunner --|> TestRunner
EspressoRunner --|> TestRunner
AdbMonkeyRunner --|> TestRunner
T2CRunner --|> AppiumRunner
SmartRunner --|> TestRunner
AppiumCrossRunner --|> AppiumRunner
The test center service (running in the cloud) and test agent service (running on the test agent machine) communicate thru a websocket connection.
- In agent project, com.microsoft.launcher.devices.socket.AgentWebSocketClient deals with the Client side connection, data transferring and scheme parsing. com.microsoft.launcher.devices.service.AgentWebSocketClientService deals with the business logic.
- In center project, com.microsoft.devices.network.center.socket.CenterDeviceSocketEndpoint deal with serving the WebSocket clients, com.microsoft.devices.network.center.socket.CenterDeviceSocketEndpoint deals with session management, business logic and auth.
All known issues are tracked in HydraLab issues
We started the Hydra Lab project within Microsoft around mid-2021, leveraging the Microsoft Hackathon opportunity, to power the testing of Link to Windows and Microsoft Launcher projects. And after months of endeavor by the team, the project is becoming more and more full-fledged and supporting more teams' testing practices within Microsoft, making the test automation ecosystem a little better place to live. Kudos to the team!
Hydra is a many-headed serpent in Greek mythology, and we use this to demonstrate the multifunctional and scalability of the framework:
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: