-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Test Plans #716
Add Test Plans #716
Conversation
Sources/ProjectSpec/Scheme.swift
Outdated
|
||
static var pathProperties: [PathProperty] { | ||
[ | ||
.string("testPlans") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is getting large, gonna split it up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -194,10 +194,18 @@ public class SchemeGenerator { | |||
let launchVariables = scheme.run.flatMap { $0.environmentVariables.isEmpty ? nil : $0.environmentVariables } | |||
let profileVariables = scheme.profile.flatMap { $0.environmentVariables.isEmpty ? nil : $0.environmentVariables } | |||
|
|||
var testPlans: [XCScheme.TestPlanReference]? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use let
let testPlanns: [XCScheme.TestPlanReference]? = scheme.test?.testPlans.map { plans in
return plans.enumerated().map { index, path in
.init(reference: "container:\(path)", default: index == 0)
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah there’s a few ways to do it. The property has to be nil if there are no test plans though, as that’s what XcodeProj expects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Points of my comment was avoiding using mutable variables as we can.
Type should be [XCScheme.TestPlanReference]?
Sorry.
@yonaskolb any updates on release for this? would love to start migrating to test plans. |
I really like to use XcodeGen but our project is build up on test plans. Is here any update. |
Really looking forward to this! Thanks for your effort on this feature! <3 |
Looking forward to this! Any ETA on when this will become available? |
hey @yonaskolb / @giginet is there anything one can do to help out finializing this? I would like to give it a try and pick this up. |
Went ahead and created an up-to-date version of the branch, tried my best to resolve the conflicts, but i really need some hints what the actual code was lacking. :D Edit 1: Started with the simplest one: Adding documentation Edit 2: Guess I understand the to-dos now. First up ill add the option to define a default test plan, after that ill try to add spec validation. |
Would love this feature! |
Hi! Any updates on when this PR is going to be merged? |
+1 to test plans! |
also, +1 for test plans! |
Just in case you missed this, I won't spam anymore, promised :D |
+1 to test plans |
1 similar comment
+1 to test plans |
+++++++1 :) |
# Conflicts: # Sources/ProjectSpec/Scheme.swift # Sources/XcodeGenKit/SourceGenerator.swift # Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj # Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme # Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme # Tests/Fixtures/TestProject/project.yml # Tests/ProjectSpecTests/SpecLoadingTests.swift # Tests/XcodeGenKitTests/SchemeGeneratorTests.swift
# Conflicts: # Sources/ProjectSpec/Scheme.swift # Tests/Fixtures/paths_test/included_paths_test.yml # Tests/ProjectSpecTests/SpecLoadingTests.swift
# Conflicts: # Tests/ProjectSpecTests/ProjectSpecTests.swift
# Conflicts: # Sources/ProjectSpec/FileType.swift
Ok, have found some time to pick this up! I've pulled in changes from #846 and also made some further additions.
I hope this is useable in its current state for some people. The plan is to release this in the next version. In terms of fully specced and generated test plans that is a whole bunch more work:
|
Released in 2.29.0 |
Adds test plan support
Resolves #684
Possible changes:
testPlans
which are then referenced in schemes, similar to the newprojectReferences
?