SwiftInfo
SwiftInfo copied to clipboard
Test and archive times not available
- SwiftInfo 2.3.5
- Fastlane 2.130.0
- Xcode 10.3
Running both locally and with Danger, I get this when building or testing with Fastlane:
* Extracting total_test_duration
* **total_test_duration:** Total test duration (TEST SUCCEEDED) not found in the logs. Did the tests fail?
* Extracting test_count
* Extracting longest_test_duration
* Extracting ipa_size
* Extracting warning_count
* Extracting largest_asset
* Extracting archive_time
* **archive_time:** Total archive time (ARCHIVE SUCCEEDED) not found in the logs. Did the archive fail?
SwiftInfo results for MyApp 0.9.10 (40) - Release:
Errors:
**total_test_duration:** Total test duration (TEST SUCCEEDED) not found in the logs. Did the tests fail?
**archive_time:** Total archive time (ARCHIVE SUCCEEDED) not found in the logs. Did the archive fail?
Looking into the logs, they end with ** ARCHIVE SUCCEEDED **
and ** TEST SUCCEEDED **
respectively, but not the bracketed execution time expected.
I think what makes this behavior is Xcode's legacy/new build system. AFAIK only legacy builds will show the duration at the expected way.
I thought I had this fixed, but it looks like I never progressed with that branch. Can you share if the logs have shown the durations somewhere else? We can use it as a fallback for these rules.
I cannot find this for build times, but each test target is reported in the log:
Test Suite 'MyAppUITests' passed at 2019-09-10 15:42:03.626.
Executed 4 tests, with 0 failures (0 unexpected) in 86.794 (86.797) seconds
Test Suite 'MyAppUITests.xctest' passed at 2019-09-10 15:42:03.627.
Executed 4 tests, with 0 failures (0 unexpected) in 86.794 (86.798) seconds
Test Suite 'All tests' passed at 2019-09-10 15:42:03.627.
Executed 4 tests, with 0 failures (0 unexpected) in 86.794 (86.799) seconds
Test Case '-[MyAppTests.DeeplinkTests testSkills]' passed (0.221 seconds).
Test Case '-[MyAppTests.DeeplinkTests testUsers]' started.
Test Case '-[MyAppTests.DeeplinkTests testUsers]' passed (0.002 seconds).
Test Suite 'DeeplinkTests' passed at 2019-09-10 15:42:07.929.
Executed 4 tests, with 0 failures (0 unexpected) in 0.228 (0.229) seconds
Test Suite 'ModelTests' started at 2019-09-10 15:42:07.930
Test Case '-[MyAppTests.ModelTests testComments]' started.
Test Case '-[MyAppTests.ModelTests testComments]' passed (0.003 seconds).
Test Case '-[MyAppTests.ModelTests testFeed]' started.
Test Case '-[MyAppTests.ModelTests testFeed]' passed (0.004 seconds).
Test Case '-[MyAppTests.ModelTests testPosts]' started.
Test Case '-[MyAppTests.ModelTests testPosts]' passed (0.001 seconds).
Test Case '-[MyAppTests.ModelTests testSkills]' started.
Test Case '-[MyAppTests.ModelTests testSkills]' passed (0.001 seconds).
Test Case '-[MyAppTests.ModelTests testSkillsets]' started.
Test Case '-[MyAppTests.ModelTests testSkillsets]' passed (0.001 seconds).
Test Case '-[MyAppTests.ModelTests testUser]' started.
Test Case '-[MyAppTests.ModelTests testUser]' passed (0.001 seconds).
Test Suite 'ModelTests' passed at 2019-09-10 15:42:07.942.
Executed 6 tests, with 0 failures (0 unexpected) in 0.010 (0.012) seconds
Test Suite 'MyAppTests' started at 2019-09-10 15:42:07.942
Test Case '-[MyAppTests.MyAppTests testEmail]' started.
Test Case '-[MyAppTests.MyAppTests testEmail]' passed (0.003 seconds).
Test Case '-[MyAppTests.MyAppTests testEmailValidation]' started.
Test Case '-[MyAppTests.MyAppTests testEmailValidation]' passed (0.001 seconds).
Test Suite 'MyAppTests' passed at 2019-09-10 15:42:07.947.
Executed 2 tests, with 0 failures (0 unexpected) in 0.004 (0.005) seconds
Test Suite 'MyAppTests.xctest' passed at 2019-09-10 15:42:07.947.
Executed 19 tests, with 0 failures (0 unexpected) in 0.254 (0.262) seconds
Test Suite 'All tests' passed at 2019-09-10 15:42:07.947.
Executed 19 tests, with 0 failures (0 unexpected) in 0.254 (0.264) seconds
Ah, I think the reason I dropped the branch is that All tests
only considers testing time, while the TEST SUCCEEDED
thing also considered the time to build the test bundles. Although I think that the All tests
should be the proper result of this rule...