3

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?

2 Answers2

2

Whilst looking for a solution, I found something:

Report looks like this: Picture of report

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:

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
1

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.

Leonardo
  • 130
  • 6