Skip to main content

butcher 0.3.0 copy "butcher: ^0.3.0" to clipboard
butcher: ^0.3.0 copied to clipboard

Mutation testing for Dart; rewrites the source into mutants and scores which ones the tests kill.

example/butcher_example.dart

import 'package:butcher/butcher.dart';

Future<void> main() async {
  final engine = Engine(
    projectRoot: '.',
    paths: ButcherPaths.systemTemp(),
    onProgress: (done, total, result) =>
        print('[$done/$total] ${result.mutant.id} -> ${result.outcome.name}'),
  );

  final result = await engine.run();

  await ConsoleReportSink().write(result.results);
  await StrykerJsonSink(
    sources: result.sources,
    outputPath: 'mutation-report.json',
  ).write(result.results);
}
0
likes
160
points
1.06k
downloads

Documentation

API reference

Publisher

verified publishermemento.engineering

Weekly Downloads

Mutation testing for Dart; rewrites the source into mutants and scores which ones the tests kill.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, args, butcher_process, butcher_report, glob, path, yaml

More

Packages that depend on butcher