allure_report 1.2.5 copy "allure_report: ^1.2.5" to clipboard
allure_report: ^1.2.5 copied to clipboard

Allure Report Adapter. Use it with [test_reporter](https://pub.dev/packages/test_reporter) package

Dart Allure Report Adapter #

Allure Report packages defines AllureReporter class used by test_reporter CLI tool.

Usage #

You should add allure_report to your dev dependencies to test_reporter could import it in runtime

  1. Add allure_report and test_reporter to your dependencies.
dev_dependencies:
  # reporter
  allure_report: ^1.0.0
  test_reporter: ^1.0.0
copied to clipboard
  1. Create reporter.dart in test 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();
}
copied to clipboard
  1. Run test_reporter command with your tests
dart run test_reporter -- dart test
copied to clipboard
dart run test_reporter -- flutter test
copied to clipboard

Output #

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

Attachments #

Allure Reporter expects that tests will print messages in format event:attachment:<path to attachment>

Example:

final base = p.join(Directory.current.path, 'reports', 'failures',
    subfolder, p.basename(masterFile.path));
final test = p.join(Directory.current.path, 'reports', 'failures',
    subfolder, p.basename(testFile.path));

masterFile.copySync(base);
testFile.copySync(test);

print('event:attachment:$base');
print('event:attachment:$test');
copied to clipboard

TODO #

  • ✅ Handle Flutter errors
  • ❌ Add steps support
3
likes
140
points
251
downloads

Publisher

unverified uploader

Weekly Downloads

2024.07.06 - 2025.01.18

Allure Report Adapter. Use it with [test_reporter](https://pub.dev/packages/test_reporter) package

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

freezed_annotation, mime, path, test_reporter, universal_io, uuid

More

Packages that depend on allure_report