RunCommand constructor

RunCommand()

Implementation

RunCommand() : super() {
  _testRepository = TestRepository(getPackageRoot());
  _createTestBundleDir();
  argParser.addFlag(
    'faster',
    abbr: 'f',
    help: 'Run all tests in test bundle even faster',
    negatable: false,
  );

  argParser.addFlag(
    'coverage',
    help: 'Run tests with coverage report',
    negatable: false,
  );

  argParser.addFlag(
    'report',
    abbr: 'r',
    help:
        'Deprecated: Test reports in .testRocket/report.csv are now generated automatically on every run.',
    defaultsTo: true,
    negatable: true,
  );

  argParser.addOption(
    'min-coverage',
    help:
        'Enforce minimum code coverage percentage (e.g. 80.0). Defaults to test_rocket.min_coverage in pubspec.yaml if configured. Fails if actual coverage is below this threshold.',
  );

  argParser.addFlag(
    'fail-on-drop',
    help:
        'Fail if code coverage has dropped compared to the previous recorded run in report.csv.',
    negatable: false,
  );
}