Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No visible @interface for 'XCTestSuite' declares the selector 'run' #223

Open
huangzhigangxg opened this issue Feb 5, 2018 · 5 comments

Comments

@huangzhigangxg
Copy link

No visible @interface for 'XCTestSuite' declares the selector 'run'

@orta
Copy link
Member

orta commented Feb 5, 2018

Want to try fix this via a PR? Or provide an example repo? This report doesn't really tell us much.

@RootsarWinner

This comment has been minimized.

@jmoody
Copy link
Contributor

jmoody commented Apr 9, 2018

I am not the original reporter.

I encountered this error while trying to make a pull request to fix another bug.

Reproduce

  • Xcode 9.3
  • macOS High Sierra
$ rake test

Expected

Tests to run.

Found

Testing failed:
        No visible @interface for 'XCTestSuite' declares the selector 'run'
** TEST FAILED **


The following build commands failed:
        CompileC /Users/moody/Library/Developer/Xcode/DerivedData/Specta-dqhgbeebggghepbpafwiexpuhqku/Build/Intermediates.noindex/Specta.build/Debug/SpectaTests.build/Objects-normal/x86_64/TestHelper.o SpectaTests/TestHelper.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

Analysis

The XCTestSuite interface has changed and no longer includes a run method.

Looking at the XCTestSuite private header, I don't see an obvious replacement.

This would be caught by Travis CI if the Xcode version were updated to 9.x.

@DoctorDYL
Copy link

You can fix this problem in Xcode 10.x with the code below.

 XCTestSuite *suite = [XCTestSuite testSuiteForTestCaseClass:testClass];
 [suite runTest];
 result = suite.testRun; 

@jaysonmald35
Copy link

iiccoinsss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants