Restructure tests

This commit is contained in:
Ben Kreeger 2025-11-21 17:05:09 -06:00
parent c3ba763d38
commit 233b3e9b4f
Signed by: kreeger
GPG Key ID: D5CF8683D4BE4B50
8 changed files with 118 additions and 81 deletions

View File

@ -1,14 +1,12 @@
//
// MeowApp.swift
// App.swift
// Meow
//
// Created by Ben Kreeger on 11/21/25.
//
import SwiftUI
@main
struct MeowApp: App {
struct App: SwiftUI.App {
var body: some Scene {
WindowGroup {
ContentView()

38
App/App.xctestplan Normal file
View File

@ -0,0 +1,38 @@
{
"configurations" : [
{
"id" : "5D7357D7-1506-4A57-9530-34C786CEB64A",
"name" : "Test Scheme Action",
"options" : {
}
}
],
"defaultOptions" : {
"performanceAntipatternCheckerEnabled" : true,
"targetForVariableExpansion" : {
"containerPath" : "container:Meow.xcodeproj",
"identifier" : "C3BB763A2ED0C38800D56534",
"name" : "Meow"
}
},
"testTargets" : [
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:Meow.xcodeproj",
"identifier" : "C3BB76472ED0C38900D56534",
"name" : "AppTests"
}
},
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:Meow.xcodeproj",
"identifier" : "C3BB76512ED0C38900D56534",
"name" : "AppUITests"
}
}
],
"version" : 1
}

View File

@ -1,14 +1,12 @@
//
// MeowTests.swift
// MeowTests
//
// Created by Ben Kreeger on 11/21/25.
// AppTests.swift
// AppTests
//
import Testing
@testable import Meow
@testable import App
struct MeowTests {
struct AppTests {
@Test func example() async throws {
// Write your test here and use APIs like `#expect(...)` to check expected conditions.

View File

@ -1,13 +1,13 @@
//
// MeowUITests.swift
// MeowUITests
// AppUITests.swift
// AppUITests
//
// Created by Ben Kreeger on 11/21/25.
//
import XCTest
final class MeowUITests: XCTestCase {
final class AppUITests: XCTestCase {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.

View File

@ -1,13 +1,11 @@
//
// MeowUITestsLaunchTests.swift
// MeowUITests
//
// Created by Ben Kreeger on 11/21/25.
// AppUITestsLaunchTests.swift
// AppUITests
//
import XCTest
final class MeowUITestsLaunchTests: XCTestCase {
final class AppUITestsLaunchTests: XCTestCase {
override class var runsForEachTargetApplicationUIConfiguration: Bool {
true

View File

@ -29,10 +29,9 @@
/* Begin PBXFileReference section */
C3A5E8D22ED0C5E8002DB10E /* Meow */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Meow; sourceTree = "<group>"; };
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 = "<group>"; };
C3BB763B2ED0C38800D56534 /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
C3BB76482ED0C38900D56534 /* AppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
C3BB76522ED0C38900D56534 /* AppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
@ -41,14 +40,14 @@
path = App;
sourceTree = "<group>";
};
C3BB764B2ED0C38900D56534 /* MeowTests */ = {
C3BB764B2ED0C38900D56534 /* AppTests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = MeowTests;
path = AppTests;
sourceTree = "<group>";
};
C3BB76552ED0C38900D56534 /* MeowUITests */ = {
C3BB76552ED0C38900D56534 /* AppUITests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = MeowUITests;
path = AppUITests;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */
@ -82,11 +81,10 @@
C3BB76322ED0C38800D56534 = {
isa = PBXGroup;
children = (
C3FB37E72ED12593006DBCA1 /* Meow.xctestplan */,
C3A5E8D22ED0C5E8002DB10E /* Meow */,
C3BB763D2ED0C38800D56534 /* App */,
C3BB764B2ED0C38900D56534 /* MeowTests */,
C3BB76552ED0C38900D56534 /* MeowUITests */,
C3BB764B2ED0C38900D56534 /* AppTests */,
C3BB76552ED0C38900D56534 /* AppUITests */,
C3BB763C2ED0C38800D56534 /* Products */,
);
sourceTree = "<group>";
@ -94,9 +92,9 @@
C3BB763C2ED0C38800D56534 /* Products */ = {
isa = PBXGroup;
children = (
C3BB763B2ED0C38800D56534 /* Meow.app */,
C3BB76482ED0C38900D56534 /* MeowTests.xctest */,
C3BB76522ED0C38900D56534 /* MeowUITests.xctest */,
C3BB763B2ED0C38800D56534 /* App.app */,
C3BB76482ED0C38900D56534 /* AppTests.xctest */,
C3BB76522ED0C38900D56534 /* AppUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -104,9 +102,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
C3BB763A2ED0C38800D56534 /* Meow */ = {
C3BB763A2ED0C38800D56534 /* App */ = {
isa = PBXNativeTarget;
buildConfigurationList = C3BB765C2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "Meow" */;
buildConfigurationList = C3BB765C2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "App" */;
buildPhases = (
C3BB76372ED0C38800D56534 /* Sources */,
C3BB76382ED0C38800D56534 /* Frameworks */,
@ -119,17 +117,17 @@
fileSystemSynchronizedGroups = (
C3BB763D2ED0C38800D56534 /* App */,
);
name = Meow;
name = App;
packageProductDependencies = (
C3A5E8D42ED0C60D002DB10E /* Meow */,
);
productName = Meow;
productReference = C3BB763B2ED0C38800D56534 /* Meow.app */;
productReference = C3BB763B2ED0C38800D56534 /* App.app */;
productType = "com.apple.product-type.application";
};
C3BB76472ED0C38900D56534 /* MeowTests */ = {
C3BB76472ED0C38900D56534 /* AppTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = C3BB765F2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "MeowTests" */;
buildConfigurationList = C3BB765F2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "AppTests" */;
buildPhases = (
C3BB76442ED0C38900D56534 /* Sources */,
C3BB76452ED0C38900D56534 /* Frameworks */,
@ -141,18 +139,18 @@
C3BB764A2ED0C38900D56534 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
C3BB764B2ED0C38900D56534 /* MeowTests */,
C3BB764B2ED0C38900D56534 /* AppTests */,
);
name = MeowTests;
name = AppTests;
packageProductDependencies = (
);
productName = MeowTests;
productReference = C3BB76482ED0C38900D56534 /* MeowTests.xctest */;
productReference = C3BB76482ED0C38900D56534 /* AppTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
C3BB76512ED0C38900D56534 /* MeowUITests */ = {
C3BB76512ED0C38900D56534 /* AppUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = C3BB76622ED0C38900D56534 /* Build configuration list for PBXNativeTarget "MeowUITests" */;
buildConfigurationList = C3BB76622ED0C38900D56534 /* Build configuration list for PBXNativeTarget "AppUITests" */;
buildPhases = (
C3BB764E2ED0C38900D56534 /* Sources */,
C3BB764F2ED0C38900D56534 /* Frameworks */,
@ -164,13 +162,13 @@
C3BB76542ED0C38900D56534 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
C3BB76552ED0C38900D56534 /* MeowUITests */,
C3BB76552ED0C38900D56534 /* AppUITests */,
);
name = MeowUITests;
name = AppUITests;
packageProductDependencies = (
);
productName = MeowUITests;
productReference = C3BB76522ED0C38900D56534 /* MeowUITests.xctest */;
productReference = C3BB76522ED0C38900D56534 /* AppUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
@ -210,9 +208,9 @@
projectDirPath = "";
projectRoot = "";
targets = (
C3BB763A2ED0C38800D56534 /* Meow */,
C3BB76472ED0C38900D56534 /* MeowTests */,
C3BB76512ED0C38900D56534 /* MeowUITests */,
C3BB763A2ED0C38800D56534 /* App */,
C3BB76472ED0C38900D56534 /* AppTests */,
C3BB76512ED0C38900D56534 /* AppUITests */,
);
};
/* End PBXProject section */
@ -268,12 +266,12 @@
/* Begin PBXTargetDependency section */
C3BB764A2ED0C38900D56534 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C3BB763A2ED0C38800D56534 /* Meow */;
target = C3BB763A2ED0C38800D56534 /* App */;
targetProxy = C3BB76492ED0C38900D56534 /* PBXContainerItemProxy */;
};
C3BB76542ED0C38900D56534 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C3BB763A2ED0C38800D56534 /* Meow */;
target = C3BB763A2ED0C38800D56534 /* App */;
targetProxy = C3BB76532ED0C38900D56534 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
@ -410,16 +408,17 @@
DEVELOPMENT_TEAM = E6DXP2JAM9;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_CFBundleDisplayName = Meow;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 0.0.1;
PRODUCT_BUNDLE_IDENTIFIER = gr.kree.Meow;
PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = YES;
@ -442,16 +441,17 @@
DEVELOPMENT_TEAM = E6DXP2JAM9;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_CFBundleDisplayName = Meow;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 0.0.1;
PRODUCT_BUNDLE_IDENTIFIER = gr.kree.Meow;
PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = YES;
@ -467,7 +467,6 @@
C3BB76602ED0C38900D56534 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = E6DXP2JAM9;
@ -482,14 +481,13 @@
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Meow.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Meow";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/App";
};
name = Debug;
};
C3BB76612ED0C38900D56534 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = E6DXP2JAM9;
@ -504,7 +502,7 @@
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Meow.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Meow";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/App";
};
name = Release;
};
@ -560,7 +558,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C3BB765C2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "Meow" */ = {
C3BB765C2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C3BB765D2ED0C38900D56534 /* Debug */,
@ -569,7 +567,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C3BB765F2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "MeowTests" */ = {
C3BB765F2ED0C38900D56534 /* Build configuration list for PBXNativeTarget "AppTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C3BB76602ED0C38900D56534 /* Debug */,
@ -578,7 +576,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C3BB76622ED0C38900D56534 /* Build configuration list for PBXNativeTarget "MeowUITests" */ = {
C3BB76622ED0C38900D56534 /* Build configuration list for PBXNativeTarget "AppUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C3BB76632ED0C38900D56534 /* Debug */,

View File

@ -16,8 +16,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3BB763A2ED0C38800D56534"
BuildableName = "Meow.app"
BlueprintName = "Meow"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:Meow.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@ -27,8 +27,16 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:App/App.xctestplan"
default = "YES">
</TestPlanReference>
<TestPlanReference
reference = "container:Meow/Meow.xctestplan">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
@ -36,8 +44,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3BB76472ED0C38900D56534"
BuildableName = "MeowTests.xctest"
BlueprintName = "MeowTests"
BuildableName = "AppTests.xctest"
BlueprintName = "AppTests"
ReferencedContainer = "container:Meow.xcodeproj">
</BuildableReference>
</TestableReference>
@ -47,8 +55,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3BB76512ED0C38900D56534"
BuildableName = "MeowUITests.xctest"
BlueprintName = "MeowUITests"
BuildableName = "AppUITests.xctest"
BlueprintName = "AppUITests"
ReferencedContainer = "container:Meow.xcodeproj">
</BuildableReference>
</TestableReference>
@ -69,8 +77,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3BB763A2ED0C38800D56534"
BuildableName = "Meow.app"
BlueprintName = "Meow"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:Meow.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
@ -86,8 +94,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3BB763A2ED0C38800D56534"
BuildableName = "Meow.app"
BlueprintName = "Meow"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:Meow.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>

View File

@ -1,21 +1,20 @@
{
"configurations" : [
{
"id" : "AF2E63D0-1B32-459D-B05F-34186D0584E0",
"name" : "Test Scheme Action",
"id" : "BBF1C062-7F46-4922-86B3-57EE20358690",
"name" : "Configuration 1",
"options" : {
}
}
],
"defaultOptions" : {
"performanceAntipatternCheckerEnabled" : true
"testTimeoutsEnabled" : true
},
"testTargets" : [
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:",
"containerPath" : "container:Meow",
"identifier" : "MeowTests",
"name" : "MeowTests"
}