MobileNativeFoundation / bluepill

Bluepill is a reliable iOS testing tool that runs UI tests using multiple simulators on a single machine
BSD 2-Clause "Simplified" License
3.19k stars 232 forks source link

How does the -x option work? #139

Closed lyndsey-ferguson closed 7 years ago

lyndsey-ferguson commented 7 years ago

I am passing multiple tests to exclude and bluepill runs them anyway. How is the -x option supposed to be used?

I am using v1.0.1.

For example, I run bluepill with the command with the options:

-x 'RViewTests/testRListsOffline' -x 'RViewTests/testRThings'

to exclude those tests, yet I see:

[20:16:48]: ▸ {88981} 20170510.201648 [ PASSED ] (SIM-2)  39.654648s RViewTests/testRListsOffline

I have tried both with, and without the single quotes (')

oliverhu commented 7 years ago

Wfm. Anyone else seeing this issue?

lyndsey-ferguson commented 7 years ago

@oliverhu perhaps this the order I put those options matters? I will shrink down my command line and play with that to see if it helps.

Could you put in a sample of how you use it? Oh, I am not sure if this matters or not, but this is for UI tests.

lyndsey-ferguson commented 7 years ago

@oliverhu which version of bluepill are you using? I am using v1.0.1 with Xcode 8.3.2.

lyndsey-ferguson commented 7 years ago

Following @nickmshelley 's suggestion, I tried using the config.json file approach and that does not change the behavior. Tests that I listed to be excluded are still tested.

config.json

{
    "app": "/Users/me/Library/Developer/Xcode/DerivedData/workspace-errktneoxlwzywgvsfjkgtekiycp/Build/Products/UI Testing-iphonesimulator/WorldsBestApp.app",
    "scheme-path": "/Users/me/repo/ios/WorldsBestApp/WorldsBestApp.xcodeproj/xcshareddata/xcschemes/XCUI Tests - As.xcscheme",
    "num-sims": "2",
    "failure-tolerance": "3",
    "only-retry-failed": true,
    "device": "iPhone 5s",
    "runner-app-path": "/Users/me/Library/Developer/Xcode/DerivedData/workspace-errktneoxlwzywgvsfjkgtekiycp/Build/Products/UI Testing-iphonesimulator/WorldsBestApp UI Tests-Runner.app",
    "exclude": ["ATests/testAAdditionInLandscape", "RViewTests/testRListsOffline", "ATests/testAccountAdditionStep1"],
    "output-dir": "/Users/me/repo/ios/artifacts/tests"
}
oliverhu commented 7 years ago

Hmm, actually I am able to reproduce this issue with BPSampleApp. The -x works with bluepill-cli but not working well with bluepill (the runner app). We are looking at this.

lyndsey-ferguson commented 7 years ago

That would be great, right now, I have put in code that changes the project so that it does not include test suites in the test target; somewhat ugly.

oliverhu commented 7 years ago

should be fixed in latest master

lyndsey-ferguson commented 7 years ago

@oliverhu how often are releases put out?