From 98e8d4d06f279f429df9c38d98c8f44175d0ea24 Mon Sep 17 00:00:00 2001 From: ZhouYixun <291028775@qq.com> Date: Fri, 24 Dec 2021 19:56:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=A9=E5=BA=A6?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E5=92=8Cwda=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 28 ++++--------------- README_CN.md | 28 ++++--------------- .../sonic/agent/bridge/ios/TIDeviceTool.java | 27 +++++++++--------- .../tests/android/AndroidTemperThread.java | 10 ++++++- 4 files changed, 33 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index d7ae6a03..8f59256b 100644 --- a/README.md +++ b/README.md @@ -56,32 +56,14 @@ For Example mvn package -Pwindows-x86_64 ``` -## Deployment mode +## Sponsors -### Docker Mode +--- +Thank you to all our sponsors! -> Can only be used on Linux or Mac! -> -> [Click Here!](https://hub.docker.com/repository/docker/sonicorg) - -### jar Mode - -| ENV Name | Description | -| ---- | ---- | -| RABBITMQ_HOST | RabbitMQ service host,default **localhost** | -| RABBITMQ_PORT | RabbitMQ service port,default **5672** | -| RABBITMQ_USERNAME | RabbitMQ service username,default **sonic** | -| RABBITMQ_PASSWORD | RabbitMQ service password,default **sonic** | -| RABBITMQ_VHOST | RabbitMQ service virtual-host,default **sonic** | -| SONIC_FOLDER_URL | Sonic-server-folder url,default **http://localhost:8094/api/folder** | -| SONIC_AGENT_HOST | IPv4 running locally,default **127.0.0.1** | -| SONIC_AGENT_KEY | Agent's key for sonic-server,default random key | +[< img src="https://ceshiren.com/uploads/default/original/3X/7/0/70299922296e93e2dcab223153a928c4bfb27df9.jpeg" alt="霍格沃兹测试开发学社" width="500">](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com) -Folder: mini,chromeDriver and language - -``` -java -jar -D{your_env1} -D{your_env2} sonic-agent-linux_86.jar -``` +> [霍格沃兹测试开发学社](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=sonic&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。[进入测试开发技术能力测评!](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com/t/topic/14940) ## LICENSE diff --git a/README_CN.md b/README_CN.md index fb448100..a3d9c124 100644 --- a/README_CN.md +++ b/README_CN.md @@ -56,32 +56,14 @@ mvn package -P{你的平台} mvn package -Pwindows-x86_64 ``` -## 部署方式 +## 赞助商 -### Docker模式 +--- +感谢所有赞助商! -> 仅Linux和Mac可用! -> -> [点击这里!](https://hub.docker.com/repository/docker/sonicorg) - -### jar模式 - -| 变量名 | 描述 | -| ---- | ---- | -| RABBITMQ_HOST | RabbitMQ 服务host,默认 **localhost** | -| RABBITMQ_PORT | RabbitMQ 服务port,默认 **5672** | -| RABBITMQ_USERNAME | RabbitMQ 服务用户名,默认 **sonic** | -| RABBITMQ_PASSWORD | RabbitMQ 服务用户密码,默认 **sonic** | -| RABBITMQ_VHOST | RabbitMQ service 虚拟host,默认 **sonic** | -| SONIC_FOLDER_URL | Sonic-server-folder 经gateway反向代理后url,默认 **http://localhost:8094/api/folder** | -| SONIC_AGENT_HOST | Agent本地运行IPv4,默认 **127.0.0.1** | -| SONIC_AGENT_KEY | 创建的已知Agent key,默认随机生成一个key(当然这个key不可用) | +[< img src="https://ceshiren.com/uploads/default/original/3X/7/0/70299922296e93e2dcab223153a928c4bfb27df9.jpeg" alt="霍格沃兹测试开发学社" width="500">](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com) -文件夹: mini,chromeDriver and language - -``` -java -jar -D{变量1} -D{变量2} sonic-agent-linux_86.jar -``` +> [霍格沃兹测试开发学社](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=sonic&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。[进入测试开发技术能力测评!](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com/t/topic/14940) ## 开源许可协议 diff --git a/src/main/java/com/sonic/agent/bridge/ios/TIDeviceTool.java b/src/main/java/com/sonic/agent/bridge/ios/TIDeviceTool.java index c6fbd876..53378214 100644 --- a/src/main/java/com/sonic/agent/bridge/ios/TIDeviceTool.java +++ b/src/main/java/com/sonic/agent/bridge/ios/TIDeviceTool.java @@ -170,19 +170,20 @@ public static int startWda(String udId) throws IOException, InterruptedException } else if (system.contains("linux") || system.contains("mac")) { wdaProcess = Runtime.getRuntime().exec(new String[]{"sh", "-c", commandLine}); } - BufferedReader stdInput = new BufferedReader(new - InputStreamReader(wdaProcess.getInputStream())); - String s; - while (wdaProcess.isAlive()) { - if ((s = stdInput.readLine()) != null) { - if (s.contains("WebDriverAgent start successfully")) { - break; - } - } else { - Thread.sleep(500); - } - logger.info(s); - } +// BufferedReader stdInput = new BufferedReader(new +// InputStreamReader(wdaProcess.getInputStream())); +// String s; +// while (wdaProcess.isAlive()) { +// if ((s = stdInput.readLine()) != null) { +// if (s.contains("WebDriverAgent start successfully")) { +// break; +// } +// } else { +// Thread.sleep(500); +// } +// logger.info(s); +// } + Thread.sleep(4000); processList = new ArrayList<>(); processList.add(wdaProcess); IOSProcessMap.getMap().put(udId, processList); diff --git a/src/main/java/com/sonic/agent/tests/android/AndroidTemperThread.java b/src/main/java/com/sonic/agent/tests/android/AndroidTemperThread.java index 4ed375a7..b2d72e18 100644 --- a/src/main/java/com/sonic/agent/tests/android/AndroidTemperThread.java +++ b/src/main/java/com/sonic/agent/tests/android/AndroidTemperThread.java @@ -11,8 +11,16 @@ public class AndroidTemperThread extends Thread { @Override public void run() { - while (AndroidDeviceBridgeTool.androidDebugBridge != null) { + while (true) { IDevice[] deviceList = AndroidDeviceBridgeTool.getRealOnLineDevices(); + if(deviceList==null){ + try { + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + break; + } List detail = new ArrayList<>(); for (IDevice iDevice : deviceList) { JSONObject jsonObject = new JSONObject(); From 40ef12822ea1db494ce0882259c878f4c002ca3e Mon Sep 17 00:00:00 2001 From: ZhouYixun <291028775@qq.com> Date: Fri, 24 Dec 2021 19:57:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B5=9E=E5=8A=A9?= =?UTF-8?q?=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +-- README_CN.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8f59256b..dadbb505 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,9 @@ mvn package -Pwindows-x86_64 ## Sponsors ---- Thank you to all our sponsors! -[< img src="https://ceshiren.com/uploads/default/original/3X/7/0/70299922296e93e2dcab223153a928c4bfb27df9.jpeg" alt="霍格沃兹测试开发学社" width="500">](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com) +[霍格沃兹测试开发学社](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com) > [霍格沃兹测试开发学社](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=sonic&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。[进入测试开发技术能力测评!](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com/t/topic/14940) diff --git a/README_CN.md b/README_CN.md index a3d9c124..68e3722f 100644 --- a/README_CN.md +++ b/README_CN.md @@ -58,10 +58,9 @@ mvn package -Pwindows-x86_64 ## 赞助商 ---- 感谢所有赞助商! -[< img src="https://ceshiren.com/uploads/default/original/3X/7/0/70299922296e93e2dcab223153a928c4bfb27df9.jpeg" alt="霍格沃兹测试开发学社" width="500">](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com) +[霍格沃兹测试开发学社](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com) > [霍格沃兹测试开发学社](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=sonic&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。[进入测试开发技术能力测评!](https://qrcode.testing-studio.com/f?from=sonic&url=https://ceshiren.com/t/topic/14940) From 3a35a90b4e524b16c85f400206993947188b1a59 Mon Sep 17 00:00:00 2001 From: ZhouYixun <291028775@qq.com> Date: Fri, 24 Dec 2021 20:02:29 +0800 Subject: [PATCH 3/3] beta1.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 016e9094..5923e85d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.sonic sonic-agent - v1.3.0-beta1 + v1.3.0-beta1.1 jar