From 175d505fbe4a4a2e3f8aa490157fb7d201e9b4cf Mon Sep 17 00:00:00 2001 From: Steffen Matthischke Date: Mon, 17 Mar 2025 14:50:10 +0100 Subject: [PATCH 1/2] Write generated test plan with sorted keys to mimic Xcode --- .../xctestplanner/Core/Helper/TestPlanHelper.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TestConfigurator/xctestplanner/Core/Helper/TestPlanHelper.swift b/Sources/TestConfigurator/xctestplanner/Core/Helper/TestPlanHelper.swift index fb9be9f..542fc28 100644 --- a/Sources/TestConfigurator/xctestplanner/Core/Helper/TestPlanHelper.swift +++ b/Sources/TestConfigurator/xctestplanner/Core/Helper/TestPlanHelper.swift @@ -22,7 +22,7 @@ public class TestPlanHelper { static func writeTestPlan(_ testPlan: TestPlanModel, filePath: String) throws { Logger.message("Writing updated test plan to file: \(filePath)") let encoder = JSONEncoder() - encoder.outputFormatting = .prettyPrinted + encoder.outputFormatting = [.prettyPrinted, .sortedKeys] let updatedData = try encoder.encode(testPlan) let url = URL(fileURLWithPath: filePath) From 1f26166ee3181c8c6a682ba851cc66b33e626246 Mon Sep 17 00:00:00 2001 From: Steffen Matthischke Date: Mon, 17 Mar 2025 14:50:52 +0100 Subject: [PATCH 2/2] Parse DefaultOptions.targetForVariableExpansion --- .../xctestplanner/Core/Entity/TestPlanModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/TestConfigurator/xctestplanner/Core/Entity/TestPlanModel.swift b/Sources/TestConfigurator/xctestplanner/Core/Entity/TestPlanModel.swift index 8cc33db..d0f441b 100644 --- a/Sources/TestConfigurator/xctestplanner/Core/Entity/TestPlanModel.swift +++ b/Sources/TestConfigurator/xctestplanner/Core/Entity/TestPlanModel.swift @@ -40,6 +40,7 @@ public struct DefaultOptions: Codable { public var testRepetitionMode: String? public var maximumTestRepetitions: Int? public var maximumTestExecutionTimeAllowance: Int? + public var targetForVariableExpansion: Target? } // MARK: - CommandLineArgumentEntry