【iOS 自动化】xcode编译webdriveragent这个三方库的时候报错

1.Xcode编译webdriveragent报错

Xcode编译第三方库(http://airtest.netease.com/docs/en/1_quick_start/3_get_started_with_iOS_test.html),一直报错,使用的使用的Xcode 11.5编译

报错文件是UITestingUITests,报错方法是testrunner

【iOS 自动化】xcode编译webdriveragent这个三方库的时候报错_第1张图片

2020-07-06 10:41:04.949168+0800 WebDriverAgentRunner-Runner[871:796107] Running tests...

Test Suite 'All tests' started at 2020-07-06 10:41:07.281

Test Suite 'WebDriverAgentRunner.xctest' started at 2020-07-06 10:41:07.282

Test Suite 'UITestingUITests' started at 2020-07-06 10:41:07.282

Test Case '-[UITestingUITests testRunner]' started.

    t =     0.00s Start Test at 2020-07-06 10:41:07.294

    t =     0.00s Set Up

2020-07-06 10:41:07.295600+0800 WebDriverAgentRunner-Runner[871:796107] -[UITestingUITests internalImplementation]: unrecognized selector sent to instance 0x2830bc5a0

    t =     1.00s     Assertion Failure: :0: failed: caught "NSInvalidArgumentException", "-[UITestingUITests internalImplementation]: unrecognized selector sent to instance 0x2830bc5a0"

(

0   CoreFoundation                      0x000000019f4257a8 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 1222568

1   libobjc.A.dylib                     0x000000019f147bcc objc_exception_throw + 56

2   CoreFoundation                      0x000000019f329f18 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 192280

3   CoreFoundation                      0x000000019f42989c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 1239196

4   CoreFoundation                      0x000000019f42b7cc _CF_forwarding_prep_0 + 92

5   WebDriverAgentLib                   0x0000000106775378 -[FBFailureProofTestCase setUp] + 96

6   XCTest                              0x0000000100adac88 __48-[XCTestCase _performSetUpSequenceWithSelector:]_block_invoke_2 + 492

7   XCTest                              0x0000000100b300d8 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 84

8   XCTest                              0x0000000100b2ffdc -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 132

9   XCTest                              0x0000000100adaa7c __48-[XCTestCase _performSetUpSequenceWithSelector:]_block_invoke + 116

10  XCTest                              0x0000000100b41d7c -[XCTContext _runActivityNamed:type:block:] + 248

11  XCTest                              0x0000000100ae3480 -[XCTestCase startActivityWithTitle:type:block:] + 200

12  XCTest                              0x0000000100ae3630 -[XCTestCase startActivityWithTitle:block:] + 72

13  XCTest                              0x0000000100ada9f8 -[XCTestCase _performSetUpSequenceWithSelector:] + 108

14  XCTest                              0x0000000100ad8d68 -[XCTestCase invokeTest] + 728

15  XCTest                              0x0000000100ada8b8 __26-[XCTestCase performTest:]_block_invoke_2 + 44

16  XCTest                              0x0000000100b300d8 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 84

17  XCTest                              0x0000000100b2ffdc -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 132

18  XCTest                              0x0000000100ada7f0 __26-[XCTestCase performTest:]_block_invoke.366 + 96

19  XCTest                              0x0000000100b4248c +[XCTContext runInContextForTestCase:block:] + 212

20  XCTest                              0x0000000100ada0dc -[XCTestCase performTest:] + 540

21  XCTest                              0x0000000100b1d86c -[XCTest runTest] + 60

22  XCTest                              0x0000000100ad45c8 __27-[XCTestSuite performTest:]_block_invoke + 268

23  XCTest                              0x0000000100ad3e58 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40

24  XCTest                              0x0000000100b4248c +[XCTContext runInContextForTestCase:block:] + 212

25  XCTest                              0x0000000100ad3e00 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 156

26  XCTest                              0x0000000100ad4150 -[XCTestSuite performTest:] + 320

27  XCTest                              0x0000000100b1d86c -[XCTest runTest] + 60

28  XCTest                              0x0000000100ad45c8 __27-[XCTestSuite performTest:]_block_invoke + 268

29  XCTest                              0x0000000100ad3e58 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40

30  XCTest                              0x0000000100b4248c +[XCTContext runInContextForTestCase:block:] + 212

31  XCTest                              0x0000000100ad3e00 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 156

32  XCTest                              0x0000000100ad4150 -[XCTestSuite performTest:] + 320

33  XCTest                              0x0000000100b1d86c -[XCTest runTest] + 60

34  XCTest                              0x0000000100ad45c8 __27-[XCTestSuite performTest:]_block_invoke + 268

35  XCTest                              0x0000000100ad3e58 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40

36  XCTest                              0x0000000100b4248c +[XCTContext runInContextForTestCase:block:] + 212

37  XCTest                              0x0000000100ad3e00 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 156

38  XCTest                              0x0000000100ad4150 -[XCTestSuite performTest:] + 320

39  XCTest                              0x0000000100b1d86c -[XCTest runTest] + 60

40  XCTest                              0x0000000100b545f0 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 176

41  XCTest                              0x0000000100b546f0 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.100 + 108

42  XCTest                              0x0000000100aee354 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 588

43  XCTest                              0x0000000100b54388 -[XCTTestRunSession runTestsAndReturnError:] + 592

44  XCTest                              0x0000000100ab8bbc -[XCTestDriver runTestsAndReturnError:] + 428

45  XCTest                              0x0000000100b3e424 _XCTestMain + 2396

46  WebDriverAgentRunner-Runner         0x00000001007bb818 -[_XCTRunnerAppDelegate applicationWillResignActive:] + 0

47  WebDriverAgentRunner-Runner         0x00000001007bb720 _XCTRunnerRunTests + 0

48  CoreFoundation                      0x000000019f3a3a4c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 690764

49  CoreFoundation                      0x000000019f3a31d8 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 688600

50  CoreFoundation                      0x000000019f39e33c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 668476

51  CoreFoundation                      0x000000019f39dce8 CFRunLoopRunSpecific + 424

52  GraphicsServices                    0x00000001a94e838c GSEventRunModal + 160

53  UIKitCore                           0x00000001a34cc444 UIApplicationMain + 1932

54  WebDriverAgentRunner-Runner         0x00000001007bb9e4 main + 192

55  libdyld.dylib                       0x000000019f2258f0 3D6D64B4-CB2B-3CC4-A7E9-02774DF7AE74 + 6384

)

    t =     1.00s Tear Down

Test Case '-[UITestingUITests testRunner]' failed (1.005 seconds).

Test Suite 'UITestingUITests' failed at 2020-07-06 10:41:08.298.

Executed 1 test, with 1 failure (1 unexpected) in 1.005 (1.016) seconds

Test Suite 'WebDriverAgentRunner.xctest' failed at 2020-07-06 10:41:08.299.

Executed 1 test, with 1 failure (1 unexpected) in 1.005 (1.017) seconds

Test Suite 'WebDriverAgentLib.framework' started at 2020-07-06 10:41:08.299

Test Suite 'WebDriverAgentLib.framework' passed at 2020-07-06 10:41:08.300.

Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds

Test Suite 'All tests' failed at 2020-07-06 10:41:08.300.

Executed 1 test, with 1 failure (1 unexpected) in 1.005 (1.019) seconds

 

2.解决办法

Xcode降级,降到Xcode 11.3.1,重新编译就正常了

 

你可能感兴趣的:(Xcode,webdriveragent)