CLI Tool to wrap dart
and flutter
tests to generate reports
Prepend your test command with dart run test_reporter --
. It will wrap dart test
process with test_reporter
logic.
dart run test_reporter -- dart test
You can use it with Flutter tests
dart run test_reporter -- flutter test
You can pass arguments to dart/flutter tests as is
dart run test_reporter -- flutter test --tags golden --coverage
See repository README for detailed info
- Add
allure_report
andtest_reporter
to your dependencies.
dev_dependencies:
# reporter
allure_report: ^1.0.0
test_reporter: ^1.0.0
- Create
reporter.dart
intest
directory. If no file created, Basic Console Reporter will be used.
import 'package:allure_report/allure_report.dart';
import 'package:test_reporter/test_reporter.dart';
TestReporter create() {
return AllureReporter();
}
- Run test_reporter command with your tests
dart run test_reporter -- dart test
dart run test_reporter -- flutter test
Allure results are placed in allure-results
folder in project root folder.
Proceed to Allure / How to view a report
Warning
Full Allure format is not supported. Not all features are available at the moment.
Full spec support is needs further development