argParser property
The argument parser for this tool, if needed.
When this tool is run from the command-line, this will be used to parse the arguments. The results will be available via the DevToolExecutionContext provided when calling run.
Implementation
@override
final ArgParser argParser = ArgParser()
..addSeparator('======== Selecting Tests')
..addMultiOption('name',
abbr: 'n',
help: 'A substring of the name of the test to run.\n'
'Regular expression syntax is supported.\n'
'If passed multiple times, tests must match all substrings.',
splitCommas: false)
..addMultiOption('plain-name',
abbr: 'N',
help: 'A plain-text substring of the name of the test to run.\n'
'If passed multiple times, tests must match all substrings.',
splitCommas: false)
..addSeparator('======== Running Tests')
..addMultiOption('preset',
abbr: 'P', help: 'The configuration preset(s) to use.')
..addFlag('release',
help: 'Build with release mode defaults for builders.\n'
'This only applies in projects that run tests with build_runner.')
..addSeparator('======== Output')
..addOption('reporter',
help: 'The runner used to print test results.',
allowed: [
'compact',
'expanded',
'json'
],
allowedHelp: {
'compact': 'A single line, updated continuously.',
'expanded': 'A separate line for each update.',
'json': 'A machine-readable format (see https://goo.gl/gBsV1a).'
})
..addSeparator('======== Other Options')
..addOption('test-stdout',
help: 'Write the test process stdout to this file path.')
..addOption('test-args',
help: 'Args to pass to the test runner process.\n'
'Run "dart test -h" to see all available options.')
..addOption('build-args',
help: 'Args to pass to the build runner process.\n'
'Run "dart run build_runner test -h" to see all available '
'options.\n'
'Note: these args are only applicable if the current project '
'depends on "build_test".');