# Missing required module 'Testing'

**URL:** <https://forums.swift.org/t/missing-required-module-testing/74675>\
**Category:** Using Swift\
**Tags:** testing, xctest\
**Created:** [September 18, 2024, 4:36am UTC](https://forums.swift.org/t/missing-required-module-testing/74675 "2024-09-18T04:36:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunpullur25](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/varunpullur25/32/36207_2.png) [@varunpullur25](https://forums.swift.org/u/varunpullur25)\
**Post date:** [September 18, 2024, 4:36am UTC](https://forums.swift.org/t/missing-required-module-testing/74675/1 "2024-09-18T04:36:52Z")

</div>

Recently i saw an error in the Xcode 16, when ever i try to build the app for testing it is throwing this error **missing required module 'Testing'**.  
Everything was working fine in Xcode 15 but now my UI tests are not compiling at all.

---

<div class="post-metadata">

**Author:** ![renep](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@renep](https://forums.swift.org/u/renep)\
**Post date:** [September 26, 2024, 12:12pm UTC](https://forums.swift.org/t/missing-required-module-testing/74675/2 "2024-09-26T12:12:17Z")

</div>

I have the same problem an no clue yet ☹

---

<div class="post-metadata">

**Author:** ![MaxMission](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@MaxMission](https://forums.swift.org/u/MaxMission)\
**Post date:** [September 27, 2024, 3:45pm UTC](https://forums.swift.org/t/missing-required-module-testing/74675/3 "2024-09-27T15:45:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![renep](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@renep](https://forums.swift.org/u/renep)\
**Post date:** [February 4, 2025, 11:04am UTC](https://forums.swift.org/t/missing-required-module-testing/74675/4 "2025-02-04T11:04:00Z")

</div>

I have found now found the problem. I have some test helper classes in a framework. This framework had also helpers to swift testing. This framework was also included in the UITests. After moving the swift testing related helpers to its own framework, that is only uses by swift testing tests and not UITests solved this problem.

---

<div class="post-metadata">

**Author:** ![mbrandonw](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mbrandonw/32/349_2.png) [@mbrandonw](https://forums.swift.org/u/mbrandonw)\
**Post date:** [February 4, 2025, 3:37pm UTC](https://forums.swift.org/t/missing-required-module-testing/74675/5 "2025-02-04T15:37:10Z")

</div>

> [@MaxMission](#):
>
> I noticed one of external dependency `swift-snapshot-testing` use framework Testing.

Currently UI tests and Swift Testing are completely incompatible. You cannot even import Testing into a UI test target. This means you also can't import any library that uses Swift Testing either.

So, if you are using something like swift-snapshot-testing, which does provide snapshot helpers that work with Swift Testing, then you cannot import SnapshotTesting into a UI test target.
