I am writing integration tests with Flutter's new integartion-test package. The tests are executing fine using flutter drive command but it does not give me any json report. flutter test --machine is not working for integration tests.
I want to generate a json report for the executed tests. Is there any other command or any workaround for this?
If you run your tests locally, you can try with this command:
flutter test -machine integration_test > report.json
Otherwise, on Firebase Test Lab you get a JUnit xml output file for each execution.
Whilst looking for a solution, I found something:
Report looks like this:
I just use:
flutter test --machine > machine.log || echo 'Tests failed' <PATH/TO_TEST_CLASS>
flutter pub global run dart_dot_reporter machine.log
Reference:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With