skip to Main Content

After upgrading to Xcode 16, the UITests target started getting a compilation error: Missing required module 'Testing'.

The problem affects only UITest. In Xcode 15 everything works fine.

Any ideas what can be done?

I tried to connect manually testing framework but the result is the same.

Related thread on swift forum

2

Answers


  1. I have the same problem. I noticed one of external dependency swift-snapshot-testing use framework Testing. I have swift-snapshot-testing in local package AppTestUtils. Target AppUITests use AppTestUtils in «Build phases» -> «Link binary with libraries» and was imported in several files. I remove all import AppTestUtils from files for UI tests and it worked. It’s strange, but it’s not necessary to remove AppTestUtils package from the AppTestUtils target, remove imports is enough.

    Login or Signup to reply.
  2. i had the same issue after upgrading to xcode 16. here are a few quick things you can try:

    1.  clean the build folder and rebuild your project.
    2.  check if your UITests target has XCTest linked in the build phases.
    3.  make sure your swift version is compatible with xcode 16.
    4.  update any dependencies you’re using-—might help.
    5.  if nothing works, try creating a new UITest target to see if that compiles.
    

    if the issue is still there let me know, I’ll see if I can do something.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search