-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Initial Support for .xctestrun File Format Version 2 #559
Conversation
Polish code for iterating over configs
…nt doesn't require a BundleId.
This reverts commit d94ca21.
…tions on missing or multiple TestConfigurations. Only one TestConfigurations is expected
Co-authored-by: Simon Schaefer <[email protected]>
Co-authored-by: Simon Schaefer <[email protected]>
Skip XCUITest when running xctestrun files
Reset Testlistener at correct place
Refactor xctestrunutils test
The helper method to load the different test targets, required the reader to make a lot of mental jumps to understand which test target was actually used in a test. Tests are not production code and should be as simple to follow along as possible. Now, when a reader wants to know which target is used, they know that they should look at the file that is located at /testdata/format_version2... and they know that they need to look at the first or second entry of the TestConfiguration array. This is important when the reader wants to understand the relation between the xctestrun file and the code.
Refactor tests to be DAMP instead of DRY
Looks good to me. I think PR includes many tests and overall has a good structure. |
// Assert: Validate the returned TestConfig | ||
assert.NoError(t, err, "Error converting to TestConfig") | ||
|
||
return testConfig, mockDevice, mockListener |
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.
mockDevice
and mockListener
are always ignored, we can remove them
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.
done
@@ -0,0 +1,363 @@ | |||
package testmanagerd |
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.
The number of tests can be reduces significantly. There are nine tests using parseXCTestRunFileVersion1
, and that can simply be one. Initialize the schemeData
struct to what you expect and just assert against that. The test output should show you the differences in a easy to read format which also makes the assertion messages like "TestHostBundleIdentifier mismatch"
obsolete
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.
we did restructured the testing file, can you please check again.
We discovered another issue with how we accumulate the test suites, we will have to revisit this today. @dmissmann .
We have two options:
The reset of the TestListener seems to become almost the same, as constructing a new TestListener by now, we could think about just constructing a new one for each target. |
Description :
Enable the execution of XCTest cases using
.xctestrun
configuration files in version 2 format, expanding compatibility and aligning with latest Xcode standards.Context :
Currently, go-ios supports .xctestrun files with format version 1. However, Xcode has introduced version 2 of the
.xctestrun
file format, which brings structural changes and enhancements. To maintain compatibility with modern XCTest setups and improve usability for customers, we need to support this newer format.Reference: new structure of the
.xctestrun
is documented hereTesting :
In this MR we test did test the following scenarios :