Skip to content
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

Fix iOS CLI #563

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Fix iOS CLI #563

merged 1 commit into from
Jun 18, 2019

Conversation

bootstraponline
Copy link
Contributor

@bootstraponline bootstraponline commented Jun 18, 2019

Fix #562

@codecov-io
Copy link

Codecov Report

Merging #563 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #563   +/-   ##
=========================================
  Coverage     79.01%   79.01%           
  Complexity      577      577           
=========================================
  Files            79       79           
  Lines          2163     2163           
  Branches        279      279           
=========================================
  Hits           1709     1709           
  Misses          274      274           
  Partials        180      180

@bootstraponline bootstraponline merged commit b63fc7f into master Jun 18, 2019
@bootstraponline bootstraponline deleted the ios_cli branch June 18, 2019 13:22
@v-ahadke
Copy link

Thanks you @bootstraponline for fixing the issue 👍 Now I am able to run only those tests which I passed via CLI using below command
java -jar ./build/tools/flank.jar firebase test ios run --config ./fastlane/flank.ios.yml --test-targets=MyClassA/testA,MyClassB/testB

Can you please comment one below questions?

  1. It didn't update the flank/flank.ios.yml file with the test-targets that I passed via CLI. Can you please confirm if its correct?
  2. When I try to pass only test class names to test-targets as below
    java -jar ./build/tools/flank.jar firebase test ios run --config ./fastlane/flank.ios.yml --test-targets=MyClassA,MyClassB

it didn't find any tests & hence no tests are triggered

[20:25:37]: ▸ test-targets:
[20:25:37]: ▸ - MyClassA
[20:25:37]: ▸ - MyClassB
[20:25:37]: ▸ disable-sharding: false
[20:25:37]: ▸ project: mobile-15
[20:25:37]: ▸ local-result-dir: flank
[20:25:37]: ▸ RunTests
[20:25:57]: ▸ Uploading FirebasePayload.zip ..
[20:25:57]: ▸ Found xctest: /Volumes/DATA/KIF/build/firebase_build/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/KIFTests.xctest
[20:25:57]: ▸ isMacOS = true (Mac OS X)
[20:25:57]: ▸ nm -U "/Volumes/DATA/KIF/build/firebase_build/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/KIFTests.xctest/KIFTests"
[20:25:59]: ▸ nm -gU "/Volumes/DATA/KIF/build/firebase_build/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/KIFTests.xctest/KIFTests" | xargs -s 262144 xcrun swift-demangle
[20:26:08]: ▸ Smart Flank cache hit: 0% (0 / 0)
[20:26:08]: ▸ Shard times:
[20:26:08]: ▸ 0 test / 0 shard
[20:26:08]: ▸ 0 matrix ids created in 0m 30s
[20:26:08]: ▸ https://console.developers.google.com/storage/browser/mobile-15/2019-06-18_14-55-37.782000_fMEr/
[20:26:08]: ▸ PollMatrices
[20:26:08]: ▸ FetchArtifacts
[20:26:08]: ▸ CostReport
[20:26:08]: ▸ No cost. 0m
[20:26:08]: ▸ MatrixResultsReport
[20:26:08]: ▸ 0 / 0 (�%)

Do I need to explicitly pass the className/testName? Do you have any plan to allow passing only class names to test-targets?

Thank you

@bootstraponline
Copy link
Contributor Author

Reposting my comment from Slack in case anyone finds this via search.

  1. The CLI doesn't update the flank.ios.yml file. CLI flags overwrite whatever is in the yaml. The idea is to match the gcloud CLI behavior where possible.

  2. You can either fully specify the test name or use a regular expression. A regex will allow you to specify only a class name. For example .*?className/.*$ will match the class name.

Thanks for providing feedback

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.

Pass multiple values to --test-targets argument via CLI
3 participants