I’m not sure how does this work with an ordinary console step. Now my step does not produce step-info.json in BITRISE_TEST_DEPLOY_DIR
. I discovered while studying Xcode and Android unit test steps that you have golang utilities to create and export this file e.g. here. Can I use them from shell script?
I also tried to modify current flutter test step to produce correct artifacts but with no success. You can take a look at my trial here.
One of my last successful builds with trial to upload tests is here: Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation. Take a look at the step Flutter Test > Junit, where at the moment I try to copy test report to BITRISE_TEST_DEPLOY_DIR
subdirectory:
brew tap dart-lang/dart
brew install dart
cd $BITRISE_SOURCE_DIR/$BITRISE_FLUTTER_PROJECT_LOCATION
flutter pub pub global activate junitreport
export PATH="$PATH":"$HOME/.pub-cache/bin"
TEST_RESULT=`flutter test --machine | tojunit`
mkdir $BITRISE_TEST_DEPLOY_DIR/test_result123456/
echo $TEST_RESULT > $BITRISE_TEST_DEPLOY_DIR/test_result123456/TEST-report.xml
Of course this does not work but I wanted to check what happens if I provide empty step-info.json file.