From e7561f5c108d8122e0fea1c39172168cdbf17c32 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 15 Jan 2026 13:40:59 -0600 Subject: [PATCH] Signed-off-by: Matt Bruce --- Documentation/Testing.md | 17 +++++++++++++++++ Tests/TestPlan.xctestplan | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 Tests/TestPlan.xctestplan diff --git a/Documentation/Testing.md b/Documentation/Testing.md index cde6a98..96b7192 100644 --- a/Documentation/Testing.md +++ b/Documentation/Testing.md @@ -31,3 +31,20 @@ Run all tests from the package root: ```bash swift test ``` + +### Xcode Test Plans +For granular control (enabling/disabling specific tests or trying different configurations), use **Xcode Test Plans**: + +1. **Create a Test Plan**: + - Go to **Product > Test Plan > New Test Plan...** + - Save it in your `Tests/` directory as `LocalData.xctestplan`. +2. **Configure Tests**: + - Open the `.xctestplan` file. + - You will see a list of all test targets, classes, and individual test methods. + - Use the **check/uncheck** boxes to include or exclude specific tests. +3. **Run the Plan**: + - Hold down the **Play** button for the test action or go to **Product > Test > [Plan Name]**. + - You can also run it via terminal: `xcodebuild test -plan LocalData`. + +> [!TIP] +> Test plans are excellent for CI/CD environments where you might want to run a "Smoke Test" plan (subset of tests) or a "Full Integration" plan. diff --git a/Tests/TestPlan.xctestplan b/Tests/TestPlan.xctestplan new file mode 100644 index 0000000..9433d36 --- /dev/null +++ b/Tests/TestPlan.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "D2951487-F388-4A07-A1E8-3A4B179619B9", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + "testTimeoutsEnabled" : true + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:", + "identifier" : "LocalDataTests", + "name" : "LocalDataTests" + } + } + ], + "version" : 1 +}