Can `flutter test` generate test reports?

826 views
Skip to first unread message

Stefan Matthias Aust

unread,
Jan 31, 2019, 11:50:13 AM1/31/19
to Flutter Dev
Hi there,

Is anybody using flutter tests with Bitbucket pipelines? Or the rephrase my question: Is there a way to output test results in a JUnit compatible way?

Right now, I have to search for a `All tests passed!` message in the log output. According to Bitbucket's documentation it would be able to display test results in a more readable format on a different tab if it detects reports in this format: http://reflex.gforge.inria.fr/xunit.html#xunitReport.

Stefan

Danny Tuppeny

unread,
Jan 31, 2019, 4:03:05 PM1/31/19
to Flutter Dev

On Thursday, 31 January 2019 16:50:13 UTC, Stefan Matthias Aust wrote:
Is there a way to output test results in a JUnit compatible way?

You can get JSON output if you pass the --machine flag (this is what the editors do to get the results in a form that can be easily rendered in a tree). It's not the XML format you want, but if you can run it through a script, you may be able to convert it.

Jelena Lecic

unread,
Feb 1, 2019, 7:04:35 AM2/1/19
to Danny Tuppeny, Flutter Dev
flutter test --coverage
genhtml coverage/lcov.info 


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Regards,
Jelena Lecic

Aleksey Pastuhov

unread,
Dec 16, 2019, 2:18:19 PM12/16/19
to Flutter Development (flutter-dev)
You can use `tojunit` package to transform machine to JUnit format, or my package which transforms machine to dot format, which is more readable from logs.
Reply all
Reply to author
Forward
0 new messages