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

Failing test succeeds #1115

Open
1 task done
zbencz3 opened this issue Feb 8, 2022 · 2 comments
Open
1 task done

Failing test succeeds #1115

zbencz3 opened this issue Feb 8, 2022 · 2 comments

Comments

@zbencz3
Copy link

zbencz3 commented Feb 8, 2022

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

What did you do?

When running tests, the developer has the option to click on the red diamond on Xcode's gutter to re-run tests. When the top most diamond is actioned, the tests correctly failed, but when the failing test's local diamond is actioned, Xcode reports the test as a success despite the code not being changed. See the sample project and the video demoing the problem.

QuickNimbleFailureSuccess.mov

What did you expect to happen?

I expected the test to correctly fail or succeed.

What actually happened instead?

The test succeeded even though it should have failed.

Environment

List the software versions you're using:

  • Quick: 4.0.0
  • Nimble: 9.2.1
  • Xcode Version: Version 13.2.1 (13C100)
  • Swift Version: Xcode Default

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

  • CocoaPods: 1.11.2

Project that demonstrates the issue

QN.zip

@zbencz3
Copy link
Author

zbencz3 commented Feb 8, 2022

Related note: I was hoping that I could use the control + option + command + U shortcut to re-run the selected current test case, but that seems to only work for XCTest methods, not for Quick/Nimble. See how that menu item is disabled. Any known workaround for that?

Disabled

@MP0w
Copy link
Contributor

MP0w commented Oct 4, 2022

Seems to be a regression introduced by #1143 which reverted 90ec83d .
I'm using Xcode 13.4.1 and when running a focused test testSuiteForTestCaseWithName: is not called so it seems necessary to swizzle testClassSuitesForTestIdentifiers:skippingTestIdentifiers:randomNumberGenerator: .
However @younata tested it as part of #1143 and it worked, perhaps a different Xcode version?

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

No branches or pull requests

3 participants