为什么fastlane似乎也运行UITests目标,尽管fastfile只指定了单元测试目标?
only_testing: 'CICDDemoTests',
这就是我在日志(log)中看到的,工作流似乎在这里花费了相当多的时间:
[05:37:36]: ▸ Running Tests: [CICDDemoUITests] Touching CICDDemoUITests.xctest
[05:57:22]: ▸ CICDDemoUITests-Runner (9096) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal kill before starting test execution.))
当我在Mac上以类似的日志(log)在本地运行bundle exec fastlane scan
时,我看到了同样的行为.Github Actions工作流程日志(log)要点如下:
[05:37:30]: ▸ [CICDDemo] Processing empty-CICDDemo.plist
[05:37:31]: ▸ Signing CICDDemo.app (in target 'CICDDemo' from project 'CICDDemo')
[05:37:31]: ▸ Running Tests: [CICDDemo] Touching CICDDemo.app
[05:37:31]: ▸ Build Succeeded
[05:37:31]: ▸ [CICDDemo] Processing empty-CICDDemo.plist
[05:37:36]: ▸ [CICDDemoTests] Processing empty-CICDDemoTests.plist
[05:37:36]: ▸ Signing CICDDemoTests.xctest (in target 'CICDDemoTests' from project 'CICDDemo')
[05:37:36]: ▸ Running Tests: [CICDDemoTests] Touching CICDDemoTests.xctest
[05:37:36]: ▸ Signing CICDDemo.app (in target 'CICDDemo' from project 'CICDDemo')
[05:37:36]: ▸ [CICDDemoUITests] Processing empty-CICDDemoUITests.plist
[05:37:36]: ▸ [CICDDemoUITests] Copying Info.plist
[05:37:36]: ▸ Signing CICDDemoUITests.xctest (in target 'CICDDemoUITests' from project 'CICDDemo')
[05:37:36]: ▸ Signing CICDDemoUITests-Runner.app (in target 'CICDDemoUITests' from project 'CICDDemo')
[05:37:36]: ▸ Running Tests: [CICDDemoUITests] Touching CICDDemoUITests.xctest
[05:57:22]: ▸ Testing failed:
[05:57:22]: ▸ CICDDemoUITests-Runner (9096) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal kill before starting test execution.))
[05:57:22]: ▸ Failing tests:
[05:57:22]: ▸ CICDDemoTests.testOperation()
[05:57:22]: ▸ ** TEST FAILED **
我的快速文件内容:
platform :ios do
# Lane configuration
lane :unit_tests do
scan(
project: 'CICDDemo',
scheme: 'CICDDemo',
configuration: 'Debug',
only_testing: 'CICDDemoTests',
devices: devices,
prelaunch_simulator: true,
clean: true,
skip_build: true,
xcodebuild_formatter: 'xcbeautify -qq --is-ci --renderer github-actions',
code_coverage: true,
output_types: 'junit'
)
end
end