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

Missing required module 'Testing' when trying to run UI Tests #1157

Closed
Ripcord715 opened this issue Sep 23, 2024 · 4 comments · Fixed by #1164
Closed

Missing required module 'Testing' when trying to run UI Tests #1157

Ripcord715 opened this issue Sep 23, 2024 · 4 comments · Fixed by #1164

Comments

@Ripcord715
Copy link

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

What did you do?

I tried to run my UI tests.

What did you expect to happen?

I expected them to run.

What actually happened instead?

The build fails and tells me "Missing required module 'Testing'". I created a simple UI test for my app not using Nimble matchers, when I run the test without importing Nimble, the test runs and passes as expected. When I import Nimble, it fails with the error above.

Environment

List the software versions you're using:

  • Quick: 7.6.2
  • Nimble: 13.5.0
  • Xcode Version: Version 16.0 (16A242d)
  • Swift Version: 18.0?

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

  • Swift Package Manager 6.0.0-dev
    We also use CocoaPods, but not for Quick or Nimble, just in case it matters.

Project that demonstrates the issue

'''
import Nimble
import XCTest

final class NimbleTestUITests: XCTestCase {

override func setUpWithError() throws {

    continueAfterFailure = false
}

@MainActor
func testExample() throws {

  let app = XCUIApplication()
  app.launch()
}

}
'''
Thank you for looking at this! I have included a screenshot below as well, from a different project:
Screenshot 2024-09-23 at 12 13 02 PM

@fraune
Copy link

fraune commented Sep 30, 2024

Hello,

I have also experienced this issue.

I have created a new repository to demonstrate the configuration and build error.

https://github.com/fraune/IssueDemo1157

I hope this helps :)

@Primecutz
Copy link

Hi!

Also ran into this issue. Downgrading to 13.4.0 seems to work for me.

It also looks like this is a similar issue with a possible fix: pointfreeco/swift-snapshot-testing#901 (reply in thread)

@fraune
Copy link

fraune commented Oct 11, 2024

I agree with @Primecutz that 13.4.0 is the latest version that works.

@younata
Copy link
Member

younata commented Oct 13, 2024

This should now be fixed with the just-released 13.6.0 version of Nimble.

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

Successfully merging a pull request may close this issue.

4 participants