是的,os.system 是堵塞的,换成 subprocess.Popen 这个可以。现在最主要的问题是我的端口号这样设置不行呢
现在 ios 的支持动态传入端口号吗?之前官网说 ios-target 只支持 8100 的端口号呢?
@zhangzhao_lenovo 大神,Android11 的是不是也没适配,我看了一下和 Android10 一样的报错呢,麻烦更新一下哈,谢谢了
@zhangzhao_lenovo大神,求救。。。。 我是用 xcode 10.1 适配了 iOS14,可以 build 成功,但是一跑 monkey 打开应用就失败了。帮忙看下,谢谢啦! _ = app.descendants(matching: .any).element(boundBy: 0).frame
let monkey = Monkey(frame: app.frame) 感觉是这边没有拿到元素导致失败的。
日志如下:
t = 68.68s Find the Application 'com.xxx
t = 68.68s Snapshot accessibility hierarchy for app with pid 3574
catching internal failure: Failure fetching attributes for Device system-wide element: Error Domain=XCTDaemonErrorDomain Code=39 "Deprecated API. Call _XCT_fetchAttributes:forElement:reply: instead." UserInfo={NSLocalizedDescription=Deprecated API. Call _XCT_fetchAttributes:forElement:reply: instead.} in file: /Users/autotest/Documents/Fastmonkey-master/XCTestWD-master/XCTestWD/XCTestWDUITests/XCTestWDRunner.swift at line: 38
catching internal failure: Failure to determine system application: (null) in file: /Users/autotest/Documents/Fastmonkey-master/XCTestWD-master/XCTestWD/XCTestWDUITests/XCTestWDRunner.swift at line: 38
catching internal failure: Failure fetching attributes for (null): Error Domain=XCTDaemonErrorDomain Code=39 "Deprecated API. Call _XCT_fetchAttributes:forElement:reply: instead." UserInfo={NSLocalizedDescription=Deprecated API. Call _XCT_fetchAttributes:forElement:reply: instead.} in file: /Users/autotest/Documents/Fastmonkey-master/XCTestWD-master/XCTestWD/XCTestWDUITests/XCTestWDRunner.swift at line: 38
catching internal failure: Failure getting list of active applications: (null) in file: /Users/autotest/Documents/Fastmonkey-master/XCTestWD-master/XCTestWD/XCTestWDUITests/XCTestWDRunner.swift at line: 38
catching internal failure: Failure fetching attributes for Device system-wide element: Error Domain=XCTDaemonErrorDomain Code=39 "Deprecated API. Call _XCT_fetchAttributes:forElement:reply: instead." UserInfo={NSLocalizedDescription=Deprecated API. Call _XCT_fetchAttributes:forElement:reply: instead.} in file: /Users/autotest/Documents/Fastmonkey-master/XCTestWD-master/XCTestWD/XCTestWDUITests/XCTestWDRunner.swift at line: 38
catching internal failure: Failure to determine system application: (null) in file: /Users/autotest/Documents/Fastmonkey-master/XCTestWD-master/XCTestWD/XCTestWDUITests/XCTestWDRunner.swift at line: 38
2020-07-13 14:54:28.398855+0800 XCTestWDUITests-Runner[3570:2008392] *** Assertion failure in -[XCUIApplicationMonitor_iOS applicationProcessWithPID:], /Library/Caches/com.apple.xbs/Sources/XCTest_iOS/XCTest-14460.20/Sources/UITesting/Applications/XCUIApplicationMonitor.m:227
t = 68.73s Assertion Failure: XCTestWDRunner.swift:38: failed: caught "NSInternalInconsistencyException", "Invalid pid 0"
(
0 CoreFoundation 0x000000019e02dc7c 334FCE90-3729-30B1-8F52-182B5ACEB454 + 1182844
1 libobjc.A.dylib 0x000000019dd4579c objc_exception_throw + 60
2 CoreFoundation 0x000000019df37718 334FCE90-3729-30B1-8F52-182B5ACEB454 + 173848
3 Foundation 0x000000019e3ab61c E4DEEB39-F560-3043-B1A5-62242DEE0F18 + 505372
4 XCTest 0x0000000104ae81e0 -[XCUIApplicationMonitor applicationProcessWithPID:] + 404
5 XCTest 0x0000000104ae7704 -[XCUIApplicationMonitor_iOS monitoredApplicationWithProcessIdentifier:] + 52
6 XCTest 0x0000000104b43750 +[XCUIApplication applicationWithPID:] + 68
7 XCTestWD 0x000000010a37b1a8 +[XCTestWDApplication createByPID:] + 160
8 XCTestWD 0x000000010a37b024 +[XCTestWDApplication activeApplication] + 368
9 XCTestWD 0x000000010a3c16bc $S8XCTestWD0A9WDSessionC17activeApplicationSo15XCUIApplicationCSgyFZ + 56
10 XCTestWD 0x000000010a3cc7c0 $S8XCTestWD0A18WDFindElementUtilsC9getAppPids5Int32VyFZ + 52
11 XCTestWD 0x000000010a37cee0 $S8XCTestWD6MonkeyC4seed5frameACs6UInt32V_So6CGRectVtcfc + 980
12 XCTestWD 0x000000010a37c9e4 $S8XCTestWD6MonkeyC5frameACSo6CGRectV_tcfc + 684
13 XCTestWD 0x000000010a37c728 $S8XCTestWD6MonkeyC5frameACSo6CGRectV_tcfC + 80
14 XCTestWD 0x000000010a3cdc14 $S8XCTestWD0A8WDMonkeyC11startMonkeySiyF + 2104
15 XCTestWDUITests 0x000000010a09e540 $S15XCTestWDUITests14XCTextWDRunnerC10testRunneryyF + 224
16 XCTestWDUITests 0x000000010a09e5b4 $S15XCTestWDUITests14XCTextWDRunnerC10testRunneryyFTo + 40
17 CoreFoundation 0x000000019e032c94 334FCE90-3729-30B1-8F52-182B5ACEB454 + 1203348
18 CoreFoundation 0x000000019df0ef44 334FCE90-3729-30B1-8F52-182B5ACEB454 + 8004
19 XCTest 0x0000000104b0c610 __24-[XCTestCase invokeTest]_block_invoke_2.202 + 72
20 XCTest 0x0000000104b785d4 -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] + 76
21 XCTest 0x0000000104b151a0 -[XCTestCase assertInvalidObjectsDeallocatedAfterScope:] + 116
22 XCTest 0x0000000104b0c594 __24-[XCTestCase invokeTest]_block_invoke.196 + 212
23 XCTest 0x0000000104b638e0 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 72
24 XCTest 0x0000000104b637f0 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 112
25 XCTest 0x0000000104b0c1e8 __24-[XCTestCase invokeTest]_block_invoke + 840
26 XCTest 0x0000000104b696d0 -[XCUITestContext performInScope:] + 272
27 XCTest 0x0000000104b0bdc0 -[XCTestCase testContextPerformInScope:] + 104
28 XCTest 0x0000000104b0be8c -[XCTestCase invokeTest] + 156
29 XCTest 0x0000000104b0daec __26-[XCTestCase performTest:]_block_invoke_2 + 48
30 XCTest 0x0000000104b638e0 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 72
31 XCTest 0x0000000104b637f0 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 112
32 XCTest 0x0000000104b0da00 __26-[XCTestCase performTest:]_block_invoke.341 + 112
33 XCTest 0x0000000104b74430 +[XCTContext runInContextForTestCase:block:] + 224
34 XCTest 0x0000000104b0d178 -[XCTestCase performTest:] + 684
35 XCTest 0x0000000104b50274 -[XCTest runTest] + 64
36 XCTest 0x0000000104b083e8 __27-[XCTestSuite performTest:]_block_invoke + 300
37 XCTest 0x0000000104b07cc8 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 76
38 XCTest 0x0000000104b07f74 -[XCTestSuite performTest:] + 288
39 XCTest 0x0000000104b50274 -[XCTest runTest] + 64
40 XCTest 0x0000000104b083e8 __27-[XCTestSuite performTest:]_block_invoke + 300
41 XCTest 0x0000000104b07cc8 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 76
42 XCTest 0x0000000104b07f74 -[XCTestSuite performTest:] + 288
43 XCTest 0x0000000104b50274 -[XCTest runTest] + 64
44 XCTest 0x0000000104b083e8 __27-[XCTestSuite performTest:]_block_invoke + 300
45 XCTest 0x0000000104b07cc8 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 76
46 XCTest 0x0000000104b07f74 -[XCTestSuite performTest:] + 288
47 XCTest 0x0000000104b50274 -[XCTest runTest] + 64
48 XCTest 0x0000000104b830ac __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 180
49 XCTest 0x0000000104b831f8 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.80 + 68
50 XCTest 0x0000000104b2083c -[XCTestObservationCenter _observeTestExecutionForBlock:] + 524
51 XCTest 0x0000000104b82e20 -[XCTTestRunSession runTestsAndReturnError:] + 636
52 XCTest 0x0000000104aeccd8 -[XCTestDriver runTestsAndReturnError:] + 428
53 XCTest 0x0000000104b70b0c _XCTestMain + 1440
54 XCTestWDUITests-Runner 0x0000000104763b18 -[_XCTRunnerAppDelegate applicationWillResignActive:] + 0
55 XCTestWDUITests-Runner 0x0000000104763a20 _XCTRunnerRunTests + 0
56 CoreFoundation 0x000000019dfaaed4 334FCE90-3729-30B1-8F52-182B5ACEB454 + 646868
57 CoreFoundation 0x000000019dfaa4dc 334FCE90-3729-30B1-8F52-182B5ACEB454 + 644316
58 CoreFoundation 0x000000019dfa4d90 334FCE90-3729-30B1-8F52-182B5ACEB454 + 621968
59 CoreFoundation 0x000000019dfa4630 CFRunLoopRunSpecific + 564
60 GraphicsServices 0x00000001a9d7e818 GSEventRunModal + 164
61 UIKitCore 0x00000001a2731a38 8B922C39-CE14-3B3F-B9C1-A5414EBE342C + 11782712
62 UIKitCore 0x00000001a2737928 UIApplicationMain + 1876
63 XCTestWDUITests-Runner 0x0000000104763cf8 main + 192
64 libdyld.dylib 0x000000019de3038c 496AD165-6976-3479-8511-BF5BED814142 + 5004
)
t = 68.76s Tear Down
t = 68.76s Pressing Home button
t = 68.79s Pressing Home button
Test Case '-[XCTestWDUITests.XCTextWDRunner testRunner]' failed (68.799 seconds).
Test Suite 'XCTextWDRunner' failed at 2020-07-13 14:54:28.467.
Executed 1 test, with 1 failure (1 unexpected) in 68.799 (68.799) seconds
Test Suite 'XCTestWDUITests.xctest' failed at 2020-07-13 14:54:28.467.
Executed 1 test, with 1 failure (1 unexpected) in 68.799 (68.800) seconds
Test Suite 'XCTestWD.framework' started at 2020-07-13 14:54:28.467
Test Suite 'XCTestWD.framework' passed at 2020-07-13 14:54:28.467.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'All tests' failed at 2020-07-13 14:54:28.467.
Executed 1 test, with 1 failure (1 unexpected) in 68.799 (68.801) seconds
同问,请问解决了吗?
大神,现在 ios13.4 支持了吗?
maven conf 里面的 setting.xml 问题,已解决了
l这里面找到 bundle id 改一下
好的,我看下,谢谢啦
好的,那我们手动传入吧,还有一个问题想请教一下。我在网上搜了一下资料都是通过 application.setName 和 provide 建立联系的(我理解的,不知道对不对),我们这边有 zk 注册中心,然后我领导说可以解析出来接口对应的 IP 的端口号。我现在的疑问是怎么让这两个建立连接。还是根本不需要解析出来 IP 和端口号?还请详细说明一下哈,谢谢了
单独起了一个 java web 服务,作 dubbo 泛化调用的代理这个具体怎么做的能说一下吗?我问了一下我们的开发,他说比较麻烦的是参数的类型的获取,要我去解析 jar 包的 class 文件,然后 zk 服务中心去发现服务地址什么的,我有点不太清楚,能看下你们是怎么具体实现的吗?
好的,谢谢
修改 wda 的 bundleid,类似 Android 的包名,不同包名就可以共存了
我搜了一下 dubbo 泛化调用好像和我想要的不一样,我这边主要是 robot framework 里面做接口自动化,需要把 dubbo 请求封装成一个关键字,传入 dubbo 的待测类、方法、和输入参数,类似 http 的调用。目前通过 python 的 telnetlib 的库封装了一个,但是存在复杂组合类型入参 、接口名称相同而参数不同等情况的 dubbo 接口调用不成功,所以想问下还有没有什么其他的方法可以 python 实现的?
请问一下 airtest 升级后新报告样式有适配吗?目前新版本的报告聚合后图片显示不出来呢
请问一下 dubbo 使用 telnet 方式调用存在 1)、组合类型入参 2)、接口名称相同而参数不同等情况部分接口不支持 invoke 方式调用,无法进行测试覆盖的问题有什么好的解决办法吗?
好的,谢谢
这个不太了解,具体怎么弄,嘿嘿,有示例吗
更新一下 stf,你这个老的 stf 不支持 Android10 的手机吧
请问一下 grpc 接口可以封装成 RF 的关键字进行调用吗
请问一下后面怎么解决多语言切换的问题,我这边试了 adb 的命令切不了,手机没 root 的
请教一下也无需 MAC ios 是怎么实现 xcodebulid 相关 wda 的?
好的,谢谢,新版本可以的
@zhangzhao_lenovo 大神,能否适配一下 Android10 的手机呢,最近跑 Android10 的稳定性,跑不起来呢。