# How to export junit test report to Test Reports dashboard (Flutter)

**URL:** <https://discuss.bitrise.io/t/how-to-export-junit-test-report-to-test-reports-dashboard-flutter/9203>\
**Category:** Question & Answer\
**Tags:** testing, test, flutter\
**Created:** [June 5, 2019, 8:16am UTC](https://discuss.bitrise.io/t/how-to-export-junit-test-report-to-test-reports-dashboard-flutter/9203 "2019-06-05T08:16:30Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dominik.roszkowski](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@dominik.roszkowski](https://discuss.bitrise.io/u/dominik.roszkowski)\
**Post date:** [June 6, 2019, 10:13pm UTC](https://discuss.bitrise.io/t/how-to-export-junit-test-report-to-test-reports-dashboard-flutter/9203/4 "2019-06-06T22:13:30Z")

</div>

> [@bitce](#):
>
> A `step-info.json` should automatically be generated, as long as the `$BITRISE_TEST_DEPLOY_DIR` isn’t empty.

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](https://github.com/bitrise-steplib/bitrise-step-android-unit-test/blob/master/testaddon/testaddon.go). 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](https://github.com/orestesgaolin/bitrise-step-flutter-test/tree/feature/junit).

One of my last successful builds with trial to upload tests is here: [Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation](https://app.bitrise.io/build/5a848eb07a9810cb). 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:

```sh
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.

---

_[View the full topic](https://discuss.bitrise.io/t/how-to-export-junit-test-report-to-test-reports-dashboard-flutter/9203)._
