facebookarchive / xctool

An extension for Apple's xcodebuild that makes it easier to test iOS and macOS apps.
Apache License 2.0
6.91k stars 738 forks source link

xctool run-tests --listTestsOnly only shows targets #765

Open AnneTheAgile opened 5 years ago

AnneTheAgile commented 5 years ago

Hello , I would love to be able to get a list of all my tests, eg for counting and ensuring that when a suite is done that it did actually test the expected number of tests.

However, when I try to use the listTestsOnly feature, I only get back the target, not the tests. In other words, if I pass a value on the commandline I get its value back.

Is this as it is designed? Or am I missing something?

$ xctool -project MYAPP.xcodeproj -scheme Enterprisefly   -sdk "iphonesimulator12.2" run-tests   -listTestsOnly -only 'MYAPPTests'

[Info] Loading settings for scheme 'Enterprisefly' ... (8454 ms)

=== RUN-TESTS ===

  [Info] Collecting info for testables... (3154 ms)
  run-test MYAPPTests.xctest (iphonesimulator12.2, iPhone 5s, logic-test)

** RUN-TESTS SUCCEEDED: 0 passed, 0 failed, 0 errored, 0 total ** (3159 ms)

If I run it without the -only , then it shows just a list of all our Kits, again not including the tests inside them.

References. 1.FYI, An old Ticket on this feature was xctool hangs at run-tests --listTestsOnly (Xcode 7.3) #689 2.Initial implementation : Add new flag to run-tests/test action: -listTestsOnly #356 Merged LegNeato merged 1 commit into master from nekto/add_list_tests_flag on Apr 27, 2014 3.Code https://github.com/facebook/xctool/search?utf8=✓&q=onlylist&type= 4.SO https://stackoverflow.com/questions/45268746/how-to-list-all-test-cases-using-xcodebuild-without-running

valerio-castelli commented 4 years ago

Hello, I'm facing the same issue with xctool 0.3.7 and Xcode 11 on macOS Mojave. I'd love to see this feature fixed, it'd open up some interesting continuous integration scenarios and is currently not available with xcodebuild. Are there plans to look into it in the future? Thanks!