请先选择标签
<!--
求求了!帮帮忙!花费30秒不到的时间填写一下以下信息,真的求求了
-->
问题描述:非稳定复现,同一个case。重复执行时有时候会遇到不执行的情况,而且用例还算执行成功
Server版本:2.4.2
Agent版本与部署方式:2.4.2
手机型号与系统版本:华为p40
截图:
相关日志:
(我们更建议提供日志文本而不是日志截图,日志文本粘贴到这里,如果是截图请放到上面,上下三个点不要删除)
如果是开发环境,请加上【开发环境】标签
我先贴截图,再复制上日志


第一张图是正常情况,第二张图是异常情况,但是用例还算执行成功
一下是复制过来的日志信息
no.1
2023-05-12 14:01:43.938 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"设置全局步骤间隔","log":"间隔2000 ms","time":"2023-05-12 14:01:43.938","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
[sonic-driver-core] 2023-05-12 14:01:46 [INFO] find element successful.
[sonic-driver-core] 2023-05-12 14:01:47 [INFO] click element 00000000-0000-0173-ffff-ffff0000028f.
2023-05-12 14:01:47.765 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"点击点击文件传输助手","log":"点击xpath: //android.widget.TextView[@resource-id='com.tencent.mm:id/kpm']","time":"2023-05-12 14:01:47.765","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 14:01:49.771 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"设置全局步骤间隔","log":"间隔2000 ms","time":"2023-05-12 14:01:49.771","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
[sonic-driver-core] 2023-05-12 14:01:52 [INFO] find element successful.
[sonic-driver-core] 2023-05-12 14:01:53 [INFO] click element 00000000-0000-0174-ffff-ffff00000338.
[sonic-driver-core] 2023-05-12 14:01:53 [INFO] send key https://dtweb..com/market/#/pages_com/article/detail?sn=caX59lLT.
2023-05-12 14:01:53.287 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"对输入链接输入内容","log":"对xpath: //android.widget.ScrollView[@resource-id='com.tencent.mm:id/kii'] 输入: https://dtweb..com/market/#/pages_com/article/detail?sn=caX59lLT","time":"2023-05-12 14:01:53.287","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
[sonic-driver-core] 2023-05-12 14:01:55 [INFO] find element successful.
[sonic-driver-core] 2023-05-12 14:01:55 [INFO] click element 00000000-0000-0174-ffff-ffff0000034d.
2023-05-12 14:01:55.688 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"点击点击发送","log":"点击xpath: //android.widget.Button[@text='发送']","time":"2023-05-12 14:01:55.688","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 14:01:57.835 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"点击老文章链接","log":"点击坐标(567,2045)","time":"2023-05-12 14:01:57.835","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 14:01:59.846 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"设置全局步骤间隔","log":"间隔1000 ms","time":"2023-05-12 14:01:59.846","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 14:02:00.847 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"开始检测老文章图片相似度兼容","log":"检测与当前设备截图相似度,期望相似度为70.0%","time":"2023-05-12 14:02:00.846","rid":724,"udId":"NAB0220321047965","status":1,"cid":11}
[sonic-driver-core] 2023-05-12 14:02:01 [INFO] get screenshot.
[sonic-vision-core] 2023-05-12 14:02:02 [INFO] similar rate: 0.98
2023-05-12 14:02:02.137 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"检测老文章图片相似度图片相似度","log":"相似度为98.0%","time":"2023-05-12 14:02:02.137","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 14:02:03.142 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"设置全局步骤间隔","log":"间隔10000 ms","time":"2023-05-12 14:02:03.142","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 14:02:13.386 - INFO 96816 --- [android-run-step-task-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"终止应用","log":"应用包名: com.tencent.mm","time":"2023-05-12 14:02:13.386","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
[sonic-driver-core] 2023-05-12 14:02:13 [INFO] close session successful!
2023-05-12 14:02:13.694 - INFO 96816 --- [android-test-task-boot-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"退出连接设备","log":"","time":"2023-05-12 14:02:13.694","rid":724,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 14:02:13.694 - INFO 96816 --- [Thread-40240] o.c.s.a.t.h.AndroidMonitorHandler : NAB0220321047965 rotation service stopped.
2023-05-12 14:02:13.694 - INFO 96816 --- [android-test-task-boot-724-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"status","des":"","log":"","time":"2023-05-12 14:02:13.694","rid":724,"udId":"NAB0220321047965","status":1,"cid":11}
2023-05-12 14:02:13.694 - INFO 96816 --- [Thread-40242] o.c.s.a.t.handlers.AndroidTouchHandler : error: sleep interrupted
no.2
2023-05-12 15:01:54.665 - INFO 96816 --- [android-run-step-task-725-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"点击点击发送","log":"点击xpath: //android.widget.Button[@text='发送']","time":"2023-05-12 15:01:54.665","rid":725,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 15:01:56.790 - INFO 96816 --- [android-run-step-task-725-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"点击老文章链接","log":"点击坐标(567,2045)","time":"2023-05-12 15:01:56.79","rid":725,"udId":"NAB0220321047965","status":2,"cid":11}
java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1597)
at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1630)
at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1628)
at com.alibaba.fastjson2.writer.ObjectWriterImplMap.write(ObjectWriterImplMap.java:418)
at com.alibaba.fastjson2.JSON.toJSONString(JSON.java:2388)
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:2174)
at org.cloud.sonic.agent.tests.LogUtil.send(LogUtil.java:64)
at org.cloud.sonic.agent.tests.LogUtil.sendStepLog(LogUtil.java:145)
at org.cloud.sonic.agent.tests.handlers.AndroidStepHandler.switchType(AndroidStepHandler.java:2253)
at org.cloud.sonic.agent.tests.handlers.AndroidStepHandler.runStep(AndroidStepHandler.java:2217)
at org.cloud.sonic.agent.tests.handlers.NoneConditionHandler.runStep(NoneConditionHandler.java:51)
at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:102)
at org.cloud.sonic.agent.aspect.IteratorAspect.around(IteratorAspect.java:41)
at jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:637)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:627)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:173)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:702)
at org.cloud.sonic.agent.tests.handlers.NoneConditionHandler$$SpringCGLIB$$0.runStep(<generated>)
at org.cloud.sonic.agent.tests.handlers.StepHandlers.runStep(StepHandlers.java:54)
at org.cloud.sonic.agent.tests.android.AndroidRunStepThread.run(AndroidRunStepThread.java:73)
[sonic-driver-core] 2023-05-12 15:01:59 [INFO] close session successful!
2023-05-12 15:01:59.487 - INFO 96816 --- [android-test-task-boot-725-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"step","des":"退出连接设备","log":"","time":"2023-05-12 15:01:59.484","rid":725,"udId":"NAB0220321047965","status":2,"cid":11}
2023-05-12 15:01:59.488 - INFO 96816 --- [Thread-40264] o.c.s.a.t.h.AndroidMonitorHandler : NAB0220321047965 rotation service stopped.
2023-05-12 15:01:59.488 - INFO 96816 --- [android-test-task-boot-725-11-NAB0220321047965] org.cloud.sonic.agent.tests.LogUtil : {"msg":"status","des":"","log":"","time":"2023-05-12 15:01:59.488","rid":725,"udId":"NAB0220321047965","status":1,"cid":11}
我并没有修改源码也没有进行二开。辛苦开发人员帮忙看一下。谢谢
--日志中的url域名缺失问题可以忽略