Skip to content

[WIP] Add parameters to include or exclude XcTestFile#414

Open
miguelslemos wants to merge 1 commit intoMobileNativeFoundation:masterfrom
nubank:add-include-exclude-xcfile
Open

[WIP] Add parameters to include or exclude XcTestFile#414
miguelslemos wants to merge 1 commit intoMobileNativeFoundation:masterfrom
nubank:add-include-exclude-xcfile

Conversation

@miguelslemos
Copy link
Copy Markdown

@miguelslemos miguelslemos commented Jan 27, 2020

Hello, the purpose of this PR is to enable the ability to include or exclude the whole suite. In our case, we created a schema(AllTests) that builds all modules and then creates only a single * .xctestrun file that contains all the test suites. But we don't want to run all tests at once, because we do sharding by macOS nodes. So we built it once and share the artifact between the nodes, so we select few suites to run on each node

@miguelslemos miguelslemos force-pushed the add-include-exclude-xcfile branch from de17646 to 0517835 Compare January 27, 2020 18:38
Copy link
Copy Markdown
Collaborator

@chenxiao0228 chenxiao0228 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate your use case please?

Do you intend to skip a whole test suite? In that case you can just not pass that target to Bluepill.

Comment thread bluepill/src/BPPacker.m
NSUInteger numBundles = [config.numSims integerValue];
NSMutableArray *filteredXcTestFiles = [NSMutableArray new];

for (BPXCTestFile *xcFile in xcTestFiles) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it Github or the indentation is off?

Comment thread bluepill/src/BPPacker.m
}

if (config.xcTestFileToSkip) {
for (BPXCTestFile *xcFile in [NSArray arrayWithArray:filteredXcTestFiles]) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge these 2 for loops?

Comment thread bp/src/BPConfiguration.h
@property (nonatomic, strong) NSNumber *failureTolerance;
@property (nonatomic) BOOL onlyRetryFailed;
@property (nonatomic, strong) NSArray *testCasesToSkip;
@property (nonatomic, strong) NSArray *xcTestFileToSkip;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xcTestFile -> testSuites please, closer to Xcode terminology

@miguelslemos
Copy link
Copy Markdown
Author

Hey, I'm sorry this branch isn't ready for merging, I supposed this PR was open on my fork.

@miguelslemos miguelslemos changed the title Add parameters to include or exclude XcTestFile [WIP] Add parameters to include or exclude XcTestFile Jan 29, 2020
@ravimandala
Copy link
Copy Markdown
Contributor

@miguelslemos Can you please rebase, resolve the conflicts and incorporate the code review comments? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants