fastlane-community / trainer

Convert xcodebuild plist and xcresult files to JUnit reports

Home Page:https://krausefx.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trainer fastlane plugin should mimic fastlane's scan behavior

silverhammermba opened this issue · comments

commented

If I run tests in fastlane like this

run_tests scheme: 'MyTests', output_types: 'junit'

fastlane automatically puts the test results in $SCAN_OUTPUT_DIRECTORY/MyTests.test_result and generates a junit report in $SCAN_OUTPUT_DIRECTORY.

I expected that the fastlane plugin for trainer would work like a drop-in replacement and so would mirror this behavior, but instead I have to run it like this

trainer path: "#{ENV['SCAN_OUTPUT_DIRECTORY']}/#{scheme_name}.test_result", extension: '.junit', output_directory: ENV['SCAN_OUTPUT_DIRECTORY']

Either the plugin should have default paths using those environment variables or it should have an option like replace_scan: true that causes it to use them. Ideally it could also check every *.test_result in its path and generate a matching report in the output directory, so a single run of trainer could generate all of your reports.

commented

Ok, I realize now that trainer does automatically pickup scan's results, but only if you run it right after the scan. I was testing it by running it separately, at which point I guess it no longer had reference to the previous scan output.

I couldn't find this behavior documented anywhere...