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

Quick tests are not executed when there are some XCTestCase tests in the target #1190

Open
1 task done
tomekfab opened this issue Dec 19, 2022 · 2 comments
Open
1 task done
Labels
Milestone

Comments

@tomekfab
Copy link

  • I have read CONTRIBUTING and have done my best to follow them.

What did you do?

I have some tests in my project written with Quick and some as XCTestCase. For some time they were working along each other just fine, but now whenever I run test target only XCTestCase ones are being executed. If I comment all XCTestCase tests, Quick tests are being executed as expected.

What did you expect to happen?

XCTestCase and Quick tests to be executed along each other.

What actually happened instead?

Only XCTestCase are being executed when both types are present.

Environment

List the software versions you're using:

  • Quick: 6.1.0 (though same thing happened on 5.1.0)
  • Nimble: 11.1.0 (though same thing happened on 10.0.0)
  • Xcode Version: 14.1 (14B47b)
  • Swift Version: Xcode Default

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Carthage: 0.38.0

Project that demonstrates the issue

https://github.com/tomekfab/quickandnormaltests (Quick and Nimble are added here with SPM but issue can still be observed)

@younata younata added the bug label Dec 21, 2022
@younata younata added this to the v7.0.0 milestone Dec 21, 2022
@killobatt
Copy link

I'm also facing the same issue. Are there any temporary workarounds?

@rakaramos
Copy link

I've fully triaged it but what I've noticed is that within a mixed project (XCTest and Quick) swizzling doesn't work, hence no Quick tests are discovered:

+ (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name {
NSArray<NSString *> *components = [name componentsSeparatedByString:@"/"];
return [QuickTestSuite selectedTestSuiteForTestCaseWithName:[components firstObject] testName:[components count] > 1 ? [components lastObject] : nil];
}

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

No branches or pull requests

4 participants