Skip to content

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

@Ripcord715

Description

@Ripcord715
  • [√ ] 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions