From c3ba763d38c5bf4635ef6edcfaaa7a5283df26cd Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Fri, 21 Nov 2025 16:57:50 -0600 Subject: [PATCH] Add a TestPlan --- Meow.xcodeproj/project.pbxproj | 2 + Meow.xctestplan | 25 ++++++ .../xcshareddata/xcschemes/Meow.xcscheme | 85 +++++++++++++++++++ Meow/Tests/MeowTests/MeowTests.swift | 4 +- 4 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 Meow.xctestplan create mode 100644 Meow/.swiftpm/xcode/xcshareddata/xcschemes/Meow.xcscheme diff --git a/Meow.xcodeproj/project.pbxproj b/Meow.xcodeproj/project.pbxproj index c85a586..f928e12 100644 --- a/Meow.xcodeproj/project.pbxproj +++ b/Meow.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ C3BB763B2ED0C38800D56534 /* Meow.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meow.app; sourceTree = BUILT_PRODUCTS_DIR; }; C3BB76482ED0C38900D56534 /* MeowTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeowTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; C3BB76522ED0C38900D56534 /* MeowUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeowUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + C3FB37E72ED12593006DBCA1 /* Meow.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Meow.xctestplan; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ @@ -81,6 +82,7 @@ C3BB76322ED0C38800D56534 = { isa = PBXGroup; children = ( + C3FB37E72ED12593006DBCA1 /* Meow.xctestplan */, C3A5E8D22ED0C5E8002DB10E /* Meow */, C3BB763D2ED0C38800D56534 /* App */, C3BB764B2ED0C38900D56534 /* MeowTests */, diff --git a/Meow.xctestplan b/Meow.xctestplan new file mode 100644 index 0000000..a6b64be --- /dev/null +++ b/Meow.xctestplan @@ -0,0 +1,25 @@ +{ + "configurations" : [ + { + "id" : "AF2E63D0-1B32-459D-B05F-34186D0584E0", + "name" : "Test Scheme Action", + "options" : { + + } + } + ], + "defaultOptions" : { + "performanceAntipatternCheckerEnabled" : true + }, + "testTargets" : [ + { + "parallelizable" : true, + "target" : { + "containerPath" : "container:", + "identifier" : "MeowTests", + "name" : "MeowTests" + } + } + ], + "version" : 1 +} diff --git a/Meow/.swiftpm/xcode/xcshareddata/xcschemes/Meow.xcscheme b/Meow/.swiftpm/xcode/xcshareddata/xcschemes/Meow.xcscheme new file mode 100644 index 0000000..6ff8bb1 --- /dev/null +++ b/Meow/.swiftpm/xcode/xcshareddata/xcschemes/Meow.xcscheme @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meow/Tests/MeowTests/MeowTests.swift b/Meow/Tests/MeowTests/MeowTests.swift index c442d0e..77729bc 100644 --- a/Meow/Tests/MeowTests/MeowTests.swift +++ b/Meow/Tests/MeowTests/MeowTests.swift @@ -17,13 +17,13 @@ struct MeowTests { return URLSession(configuration: configuration) }() - @Test + @Test("constructor retains baseURL") func constructor() async throws { let instance = vendInstance() #expect(instance.baseURL == baseURL) } - @Test + @Test("getFacts calls the appropriate API and returns a result") func getFacts() async throws { let instance = vendInstance() let count = 5