Giter VIP home page Giter VIP logo

microsoft / hydralab Goto Github PK

View Code? Open in Web Editor NEW
1.1K 20.0 89.0 139.45 MB

Intelligent cloud testing made easy.

License: MIT License

PowerShell 2.16% Batchfile 0.14% Java 69.21% Dockerfile 0.30% Shell 0.31% Groovy 0.49% JavaScript 16.27% HTML 6.64% CSS 0.90% SCSS 0.03% TypeScript 1.24% Kotlin 1.20% Python 1.10%
testing mobile-development testing-framework cross-platform test-automation spring-boot developer-tools e2e-testing ui-testing azure

hydralab's Introduction

Hydra Lab

Build your own cloud testing infrastructure

中文(完善中)

Build Status Spring Boot Appium License


Hydra.Lab.External.With.Subtitle.mp4

What is Hydra Lab? | Get Started | Contribute | Contact Us | Wiki

What is Hydra Lab?

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.

Capabilities of Hydra Lab include:

  • Scalable test device management under the center-agent distributed design; Test task management and test result visualization.
  • Powering Android Espresso Test, and Appium(Java) test on different platforms: Windows/iOS/Android/Browser/Cross-platform.
  • Case-free test automation: Monkey test, Smart exploratory test.

For more details, you may refer to:

Get Started

Please visit our GitHub Project Wiki to understand the dev environment setup procedure: Contribution Guideline.

Supported environments for Hydra Lab agent: Windows, Mac OSX, and Linux (Docker).

Supported platforms and frameworks matrix:

Appium(Java) Espresso XCTest Maestro Python Runner
Android x
iOS x
Windows x x x
Web (Browser) x x x

Quick guide on out-of-box Uber docker image

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:

Step 1. Download and install Docker

Step 2. Download latest Uber Docker image

docker pull ghcr.io/microsoft/hydra-lab-uber:latest

This step is necessary. Without this step and jump to step 3, you may target at the local cached Docker image with latest tag if it exists.

Step 3. Run on your machine

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:

docker run -p 9886:9886 --name=hydra-lab ghcr.io/microsoft/hydra-lab-uber:latest

We strongly recommend using Azure Blob Storage service as the file storage solution, and Hydra Lab has native, consistent, and validated support for it.

Step 3. Visit the web page and view your connected devices

Url: http://localhost:9886/portal/index.html#/ (or your custom port).

Enjoy starting your journey of exploration!

Step 4. Perform the test procedure with a minimal setup

Note: For Android, Uber image only supports Espresso/Instrumentation test. See the "User Manual" section on this page for more features: Hydra Lab Wikis.

To run a test with Uber image and local storage:

  • On the front-end page, go to the Runner tab and select HydraLab Client.
  • Click Run and change "Espresso test scope" to Test app, click Next.
  • Pick an available device, click Next again, and click Run to start the test.
  • When the test is finished, you can view the test result in the Task tab on the left navigator of the front-end page.

Test trigger steps

Build and run Hydra Lab from the source

You can also run the center java Spring Boot service (a runnable Jar) separately with the following commands:

The build and run process will require JDK11 | NPM | Android SDK platform-tools in position.

Step 1. Run Hydra Lab center service

# In the project root, switch to the react folder to build the Web front.
cd react
npm ci
npm run pub
# Get back to the project root, and build the center runnable Jar. 
cd ..
# For the gradlew command, if you are on Windows please replace it with `./gradlew` or `./gradlew.bat`
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.

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.

Step 2. Run Hydra Lab agent service

# In the project root
cd android_client
# Build the Android client APK
./gradlew assembleDebug
cp app/build/outputs/apk/debug/app-debug.apk ../common/src/main/resources/record_release.apk
# If you don't have the SDK for Android ,you can download the prebuilt APK in https://github.com/microsoft/HydraLab/releases
# Back to the project root
cd .. 
# In the project root, copy the sample config file and update the:
# YOUR_AGENT_NAME, YOUR_REGISTERED_AGENT_ID and YOUR_REGISTERED_AGENT_SECRET.
cp agent/application-sample.yml application.yml
# Then build an agent jar and run it
gradlew :agent:bootJar
java -jar agent/build/libs/agent.jar

Step 3. visit http://localhost:9886/portal/index.html#/ and view your connected devices

More integration guidelines:

Contribute

Your contribution to Hydra Lab will make a difference for the entire test automation ecosystem. Please refer to CONTRIBUTING.md for instructions.

Contributor Hero Wall:

Contact Us

You can reach us by opening an issue or sending us mails.

Microsoft Give Sponsors

Thank you for your contribution to Microsoft employee giving program in the name of Hydra Lab:

@Germey(崔庆才), @SpongeOnline(王创), @ellie-mac(陈佳佩), @Yawn(刘俊钦), @White(刘子凡), @597(姜志鹏), @HCG(尹照宇)

License & Trademarks

The entire codebase is under MIT license.

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

We use the Microsoft Clarity Analysis Platform for front end client data dashboard, please refer to Clarity Overview and https://clarity.microsoft.com/ to learn more.

Instructions to turn off the Clarity:

Open MainActivity, comment the line which call the initClarity(), and rebuild the Hydra Lab Client apk, repalce the one in the agent resources folder.

Telemetry/data collection notice

hydralab's People

Contributors

ac-phoenix avatar aqinqin48 avatar bipin-k avatar davidasulin1 avatar dependabot[bot] avatar dexterdreeeam avatar dinghong2233 avatar ellie-mac avatar eltociear avatar germey avatar hydraxman avatar jkfhklh avatar jzp1996 avatar lastsource avatar lifesaver0129 avatar mahoshojohcg avatar marianconstantinmarica avatar microsoft-github-operations[bot] avatar microsoftopensource avatar microsoftran avatar nathan2win avatar olivershen-wow avatar raccoonli avatar sangling avatar spongeonline avatar taoran6 avatar tedaliez avatar wwmmssyster avatar ying-star avatar zhou9584 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hydralab's Issues

Monkey Test中Task configuration页的含义是什么?/ The meaning of Task configuration Page in Monkey Test

很喜欢这个应用,但是Task configuration Page页中Test config、Needed Permission和Device Actions的三个参数设置不是很明白。
I like Hydra Lab. However, I don't understand how to set Test config, Needed Permission and Device Actions in Task configuration Page.

image

举例来说,我想在一次Monkey Test中进行250000次事件,并且我希望在一个小时内完成。我发现如果仅在Max step count和Test time out second中进行设置,Test会在三分钟左右完成。我该如何设置才能实现我的目的?我知道Android ADB中的Monkey可以设置一系列的参数来进行控制,我该在哪里设置类似 --throttle 的参数?
For example, I would like to perform 250,000 steps in a single Monkey test, and I would like to finished it in about one hour. I figured that if I only set Max step count and Test time out second as the picture above, the test will be finished in 3 minutes. How should I set to satisfy it? I know in Android ADB's Monkey, I can set parameter like -- throttle to do it. What should I do in Hydra Lab?

非常你们的帮助!
Thank you very much!

Replace log file path when run install script

          I'm not sure if actionable, but could we further automate these 2 steps?

image

Like we could create a new install.bat/install.ps with the following pseudo-code:

$currentPath=Get-Current-Absolute-Path
Replace-Text-In-File AgentService.xml '{LOG_FILE_LOCATION}' "$currentPath\service-log"
.\AgentService.exe install

So that all the user need to do is to run the install.bat with admin permission.

Feel free to do this in another PR.

Originally posted by @hydraxman in #227 (comment)

Smart test readiness

Smart test is currently broken in the project due to the confidentiality of the screen comprehension model. We need to figure out a substitute solution.

Readability of page 'Deploy-a-test-agent-service'

Hey, I just follow steps in this page Deploy-a-test-agent-service

I found it doesn't make much sense.
I need to do E2E test.
I expect the guide should be:

Choose Test Type: 1. Xxxx 2. E2E test 3. Xxxx

Once I select Second Choice. The following steps are all about E2E test.
But I have to say flow is not easy to read.
I follow a lot steps of Android-only Agent setup steps, and it doesn't work.
Next line in guide told me, 'Yeah, these steps doesn't work for E2E, these are E2E test steps.'

I think this is very normal for a person who is not very familiar with this project.
Could we org these wiki more readable for specific occasion.

Disable the lockscreen pragmatically thru ADB or HydraLabClient

Could Hydra Lab add an icon aside the private device/agent?

In the portal, it's hard for group manager and admin to check whether the agent/device is private. Whether Hydra Lab can show an icon near by the private device and show a tooltips contains the team/group name who have the access to use the device? Sample:
image
Pop up an tooltips contains to information of owners
image

whoever made this needs to be fired

this code sucks, it's design is horrible. whoever made this or even contributed needs to step up there game because they just don't know how to code

设备,设备组访问,使用权限重新设计

现状

设置Private

设备

  1. 调用center接口修改设备属性,并保存至agent本地数据库,设备下次接入时,继承数据库中属性
  2. 调用center接口接口生成key,并立即发送给center,以便center校验

Group

  1. 调用center接口,修改Group属性,仅限Group Owner / team admin
  2. 调用center接口,生成Key,仅限Group Owner / team admin

校验

设备校验

  1. 可以在首页看到public的设备以及team内的private设备
  2. 通过设备SerialNum调用设备执行任务,校验team关联 ? 通过 : 校验key
  3. 将设备添加进Group,校验key

Group校验

  1. 通过Group运行测试任务,校验team关联 ? 通过 : 校验key

测试报告界面不能播放测试录屏

我现在使用的版本是[email protected]_161441,在进行Monkey Test后,测试报告界面的录屏视频始终为黑色,不能在网页中播放也无法下载(提示没有权限)。我使用的浏览器是Edge 115版本,请问这是一个有待实现的功能还是Bug?感谢回复!

[New Feature] Support `.xctestproducts` and Test Plan for XCTest

Hello,

I would like to suggest adding support for the .xctestproducts file in XCTest, which includes all the products necessary to execute the test. The .xctestproducts file has been added since Xcode 13.3. The main advantages of using .xctestproducts are:

  • It is very suitable for executing XCTest in a pipeline.
  • It supports choosing which Test Plan to execute (currently, HydraLab relies on the supplied .xctestrun file specific to one test plan).

The suggested changes are:

  • Adding support for .xctestproducts.
  • Adding a new option in the UI that enables the selection of a Test Plan.

These changes should enhance the usability and flexibility of XCTest.

I would love to contribute by working on the backend implementation ☺️

Lanuch center.jar failed

D:\HydraLab-main\HydraLab-main>java -jar center/build/libs/center.jar

██ ██ ██ ██ ██
?██ ?██ ██ ██ ?██ ?██ ?██
?██ ?██ ??██ ██ ?██ ██████ ██████ ?██ ██████ ?██
?██████████ ??███ ██████??██??█ ??????██ ?██ ??????██ ?██████
?██??????██ ?██ ██???██ ?██ ? ███████ ?██ ███████ ?██???██
?██ ?██ ██ ?██ ?██ ?██ ██????██ ?██ ██????██ ?██ ?██
?██ ?██ ██ ??██████?███ ??████████?████████??████████?██████
?? ?? ?? ?????? ??? ???????? ???????? ???????? ?????

?█???█???█?█??█??█???█?▄
?█???█???█?█??█??█???█?▄
????????????????????????

2023-03-07 16:24:24,670 WARN (o.s.h.c.j.Jackson2ObjectMapperBuilder - CompositeLog.java:127)[background-preinit] - For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
2023-03-07 16:24:24,700 INFO (c.m.h.c.RegisterCenterApplication - StartupInfoLogger.java:55)[main] - Starting RegisterCenterApplication on CNXRO000154 with PID 3936 (D:\HydraLab-main\HydraLab-main\center\build\libs\center.jar started by bing80.hu in D:\HydraLab-main\HydraLab-main)
2023-03-07 16:24:24,705 DEBUG (c.m.h.c.RegisterCenterApplication - StartupInfoLogger.java:56)[main] - Running with Spring Boot v2.2.5.RELEASE, Spring v5.3.16
2023-03-07 16:24:24,705 INFO (c.m.h.c.RegisterCenterApplication - SpringApplication.java:651)[main] - No active profile set, falling back to default profiles: default
2023-03-07 16:24:38,063 ERROR (c.a.s.b.BlobServiceClientBuilder - ClientLogger.java:387)[main] - Invalid connection string.
2023-03-07 16:24:38,068 WARN (o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - AbstractApplicationContext.java:591)[main] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contextStartup': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deviceAgentManagementService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDataService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachmentService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageServiceClientProxy' defined in class path resource [com/microsoft/hydralab/center/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.hydralab.common.file.StorageServiceClientProxy]: Factory method 'storageServiceClientProxy' threw exception; nested exception is java.lang.IllegalArgumentException: Invalid connection string.
2023-03-07 16:24:38,203 ERROR (o.s.b.SpringApplication - SpringApplication.java:826)[main] - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contextStartup': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deviceAgentManagementService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDataService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachmentService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageServiceClientProxy' defined in class path resource [com/microsoft/hydralab/center/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.hydralab.common.file.StorageServiceClientProxy]: Factory method 'storageServiceClientProxy' threw exception; nested exception is java.lang.IllegalArgumentException: Invalid connection string.
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at com.microsoft.hydralab.center.RegisterCenterApplication.main(RegisterCenterApplication.java:26)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deviceAgentManagementService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDataService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachmentService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageServiceClientProxy' defined in class path resource [com/microsoft/hydralab/center/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.hydralab.common.file.StorageServiceClientProxy]: Factory method 'storageServiceClientProxy' threw exception; nested exception is java.lang.IllegalArgumentException: Invalid connection string.
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 25 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDataService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachmentService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageServiceClientProxy' defined in class path resource [com/microsoft/hydralab/center/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.hydralab.common.file.StorageServiceClientProxy]: Factory method 'storageServiceClientProxy' threw exception; nested exception is java.lang.IllegalArgumentException: Invalid connection string.
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 39 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachmentService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageServiceClientProxy' defined in class path resource [com/microsoft/hydralab/center/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.hydralab.common.file.StorageServiceClientProxy]: Factory method 'storageServiceClientProxy' threw exception; nested exception is java.lang.IllegalArgumentException: Invalid connection string.
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 53 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageServiceClientProxy' defined in class path resource [com/microsoft/hydralab/center/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.hydralab.common.file.StorageServiceClientProxy]: Factory method 'storageServiceClientProxy' threw exception; nested exception is java.lang.IllegalArgumentException: Invalid connection string.
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 67 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.hydralab.common.file.StorageServiceClientProxy]: Factory method 'storageServiceClientProxy' threw exception; nested exception is java.lang.IllegalArgumentException: Invalid connection string.
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 83 common frames omitted
Caused by: java.lang.IllegalArgumentException: Invalid connection string.
at com.azure.storage.common.implementation.connectionstring.ConnectionSettings.fromConnectionString(ConnectionSettings.java:81)
at com.azure.storage.common.implementation.connectionstring.StorageConnectionString.create(StorageConnectionString.java:105)
at com.azure.storage.blob.BlobServiceClientBuilder.connectionString(BlobServiceClientBuilder.java:279)
at com.microsoft.hydralab.common.file.impl.azure.AzureBlobClientAdapter.(AzureBlobClientAdapter.java:50)
at com.microsoft.hydralab.common.file.StorageServiceClientProxy.initCenterStorageClient(StorageServiceClientProxy.java:33)
at com.microsoft.hydralab.center.config.AppConfig.storageServiceClientProxy(AppConfig.java:62)
at com.microsoft.hydralab.center.config.AppConfig$$EnhancerBySpringCGLIB$$59df3f27.CGLIB$storageServiceClientProxy$5()
at com.microsoft.hydralab.center.config.AppConfig$$EnhancerBySpringCGLIB$$59df3f27$$FastClassBySpringCGLIB$$c72b5b3d.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
at com.microsoft.hydralab.center.config.AppConfig$$EnhancerBySpringCGLIB$$59df3f27.storageServiceClientProxy()
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 84 common frames omitted

Android screenshot can not be shown in center agent page

Issue:
In center agent web page, the Android devices screenshot is broken.
Could you do me a favor?
image

version:
versionName=1.7.0.153478

"OS:"
ubuntu 18

Agent log: by hydra_lab_current.log
2023-02-07 16:05:27,898 INFO (c.m.h.a.s.AgentWebSocketClientService - AgentWebSocketClientService.java:61)[WebSocketConnectReadThread-20] - onMessage Receive bytes message Message(method=GET, sessionId=null, code=0, message=null, agentId=null, type=null, path=/api/device/list, params=null, body=null, bodyType=null)
2023-02-07 16:05:27,899 WARN (c.m.h.a.r.DeviceTaskControlExecutor - DeviceTaskControlExecutor.java:34)[WebSocketConnectReadThread-20] - All device count 1
2023-02-07 16:05:27,910 INFO (c.m.h.a.s.DeviceControlService - ADBOperateUtil.java:111)[ScreenshotExecutor1] - >> adb -s 8UR4C19C16012215 shell input keyevent KEYCODE_WAKEUP
2023-02-07 16:05:28,242 INFO (c.m.h.c.u.ADBOperateUtil - ADBOperateUtil.java:88)[ScreenshotExecutor1] - getScreenshot
2023-02-07 16:05:30,001 ERROR (c.m.h.c.m.DeviceStabilityMonitor - DeviceStabilityMonitor.java:148)[scheduling-1] - [Stability] State change window of device 8UR4C19C16012215 is null
2023-02-07 16:05:31,346 INFO (c.m.h.c.u.b.BlobStorageClient - BlobStorageClient.java:143)[ScreenshotExecutor1] - Get a BlobContainerClient for container images for file D:\Tools\Hydra_Agent_Installer_Windows\storage\devices\screenshot\huawei-oxf_an00-8UR4C19C16012215-8UR4C19C16012215.jpg
2023-02-07 16:05:32,518 ERROR (c.m.h.c.m.i.AndroidDeviceManager - AndroidDeviceManager.java:430)[Device List Monitor] - Status code 404, "ContainerNotFoundThe specified container does not exist.
RequestId:715ebd93-901e-0039-19ca-3a1be2000000
Time:2023-02-07T08:05:33.0571960Z"
com.azure.storage.blob.models.BlobStorageException: Status code 404, "ContainerNotFoundThe specified container does not exist.
RequestId:715ebd93-901e-0039-19ca-3a1be2000000
Time:2023-02-07T08:05:33.0571960Z"
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at com.azure.core.http.rest.RestProxy.instantiateUnexpectedException(RestProxy.java:365)
at com.azure.core.http.rest.RestProxy.lambda$ensureExpectedStatus$5(RestProxy.java:405)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125)
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
at reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.signalCached(MonoCacheTime.java:337)
at reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.onNext(MonoCacheTime.java:354)
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2398)
at reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.onSubscribe(MonoCacheTime.java:293)
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:192)
at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
at reactor.core.publisher.MonoCacheTime.subscribeOrReturn(MonoCacheTime.java:143)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157)
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:130)
at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:119)
at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:220)
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:130)
at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:184)
at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
at reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:128)
at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260)
at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:142)
at reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:400)
at reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:419)
at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:473)
at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:684)
at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:93)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1372)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1235)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1284)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:835)
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:99)
at reactor.core.publisher.Mono.block(Mono.java:1704)
at com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout(StorageImplUtils.java:128)
at com.azure.storage.blob.BlobClient.uploadFromFileWithResponse(BlobClient.java:389)
at com.azure.storage.blob.BlobClient.uploadFromFile(BlobClient.java:361)
at com.azure.storage.blob.BlobClient.uploadFromFile(BlobClient.java:334)
at com.microsoft.hydralab.common.util.blob.BlobStorageClient.uploadBlobFromFile(BlobStorageClient.java:151)
at com.microsoft.hydralab.common.management.impl.AndroidDeviceManager.getScreenShot(AndroidDeviceManager.java:393)
at com.microsoft.hydralab.common.management.impl.AndroidDeviceManager.deviceInfoUpdate(AndroidDeviceManager.java:428)
at com.microsoft.hydralab.common.management.impl.AndroidDeviceManager$1.deviceConnected(AndroidDeviceManager.java:63)
at com.android.ddmlib.AndroidDebugBridge.deviceConnected(AndroidDebugBridge.java:966)
at com.android.ddmlib.DeviceMonitor.updateDevices(DeviceMonitor.java:230)
at com.android.ddmlib.DeviceMonitor.access$500(DeviceMonitor.java:60)
at com.android.ddmlib.DeviceMonitor$DeviceListUpdateListener.deviceListUpdate(DeviceMonitor.java:708)
at com.android.ddmlib.DeviceMonitor$DeviceListMonitorTask.processIncomingDeviceData(DeviceMonitor.java:922)
at com.android.ddmlib.DeviceMonitor$DeviceListMonitorTask.run(DeviceMonitor.java:856)
... 1 common frames omitted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.