# What's the best way to try swift-testing 6.1 development snapshots in Xcode?

**URL:** <https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803>\
**Category:** Swift Testing\
**Created:** [February 11, 2025, 7:23pm UTC](https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803 "2025-02-11T19:23:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![noremac](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/noremac/32/7222_2.png) [@noremac](https://forums.swift.org/u/noremac)\
**Post date:** [February 11, 2025, 7:23pm UTC](https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803/1 "2025-02-11T19:23:09Z")

</div>

I would like to try out the official snapshots of the [new test scoping work](https://forums.swift.org/t/proposal-test-scoping-traits/76676/3).

I have downloaded the [current latest snapshot](https://download.swift.org/swift-6.1-branch/xcode/swift-6.1-DEVELOPMENT-SNAPSHOT-2025-02-10-a/swift-6.1-DEVELOPMENT-SNAPSHOT-2025-02-10-a-osx.pkg) for Xcode. I have then selected `Swift 6.1 Development Snapshot 2025-02-10 (a)` in `Xcode -> Toolchains`. Compilation fails due to:

> Cannot find type 'TestScoping' in scope

Compiling/running is successful though with this terminal command:

`xcrun -toolchain org.swift.610202502101a swift test`

Is there anything else that needs to be done to test development snapshots within Xcode? (Is this just a bug and I should file a radar?)

---

<div class="post-metadata">

**Author:** ![smontgomery](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/smontgomery/32/965_2.png) [@smontgomery](https://forums.swift.org/u/smontgomery)\
**Post date:** [February 11, 2025, 10:20pm UTC](https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803/2 "2025-02-11T22:20:48Z")

</div>

Hi @noremac, I'm happy to hear you're interested in trying Test Scoping Traits in a development snapshot toolchain!

I was able to reproduce the issue you're describing when attempting to use Xcode for this workflow. I consider that a bug, so please do file a Feedback with Apple about that.

For now, I would encourage you to use the `swift test` CLI tool as a workaround since that's the easiest and best-supported mechanism currently. It is technically possible, with enough effort, to manually add compiler flags and runtime environment variables such that Xcode will use the copy of Swift Testing included in a development snapshot toolchain, but the steps are quite onerous and easy to get wrong, so I don't necessarily recommend trying to do that. I can try to provide guidance if you have a strong desire to get that working, but otherwise I'd recommend sticking with `swift test`. Hope that helps!

---

<div class="post-metadata">

**Author:** ![noremac](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/noremac/32/7222_2.png) [@noremac](https://forums.swift.org/u/noremac)\
**Post date:** [February 11, 2025, 10:38pm UTC](https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803/3 "2025-02-11T22:38:58Z")

</div>

`swift test` is fine for now. Thanks for checking, and I’ll file a radar!

---

<div class="post-metadata">

**Author:** ![noremac](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/noremac/32/7222_2.png) [@noremac](https://forums.swift.org/u/noremac)\
**Post date:** [February 12, 2025, 6:10pm UTC](https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803/4 "2025-02-12T18:10:30Z")

</div>

Filed a feedback here: FB16490332! 👀

---

<div class="post-metadata">

**Author:** ![smontgomery](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/smontgomery/32/965_2.png) [@smontgomery](https://forums.swift.org/u/smontgomery)\
**Post date:** [February 27, 2025, 8:32pm UTC](https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803/5 "2025-02-27T20:32:57Z")

</div>

Thanks for filing the Feedback, @noremac! There are several changes needed to begin supporting this, including some within Xcode itself. But one of the changes is underway in the [swift-build](https://github.com/swiftlang/swift-build) project which recently became open source. If you're curious you can follow along with the PR below:

> <https://github.com/swiftlang/swift-build/pull/232>
>
> This adds a special case to the logic which configures additional build settings… when \`ENABLE\_TESTING\_SEARCH\_PATHS\` is enabled so that it inserts an additional library search path to locate Swift Testing from the toolchain if it's present.
> 
> Motivation: This is one step towards a larger goal of ensuring that if a user installs an open source Swift.org toolchain and selects it in Xcode, the copy of Swift Testing in that toolchain will be preferred over the analogous copy (\`Testing.framework\`) built in to Xcode. This matches existing precedent with other Swift standard libraries, which are used from the toolchain when available.
> 
> Fixes rdar://145689942

Also, in the days since your original post, Xcode 16.3 Beta has been posted and it includes the new [`TestScoping` APIs](https://developer.apple.com/documentation/testing/testscoping), so another way you can try them out is by using that beta version of Xcode.

---

<div class="post-metadata">

**Author:** ![0xTim](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/0xtim/32/27968_2.png) [@0xTim](https://forums.swift.org/u/0xTim)\
**Post date:** [February 27, 2025, 10:54pm UTC](https://forums.swift.org/t/whats-the-best-way-to-try-swift-testing-6-1-development-snapshots-in-xcode/77803/6 "2025-02-27T22:54:53Z")

</div>

(Note that the current Xcode beta contains testing traits)
