App::Yath::Command::replay - Command to replay a test run from an event log.
$ yath replay [options] [--] event_log.jsonl[.gz|.bz2] [job1, job2, ...]
Exit after showing what yath thinks your options mean
Exit after showing this help message
Show version information
Set a specific run-id
(Default: a UUID)
Do not run tests with the HARNESS-CAT-LONG header
Load a module in each test (after fork)
this option may be given multiple times
Load and import module in each test (after fork)
Exclude files that match
May be specified multiple times
matched using `m/$PATTERN/`
Exclude a file from testing
Kill test if no events received in timeout period
(Default: 60 seconds)
This is used to prevent the harness for waiting forever for a hung test. Add the "# HARNESS-NO-TIMEOUT" comment to the top of a test file to disable timeouts on a per-test basis.
Stop waiting post-exit after the timeout period
(Default: 15 seconds)
Some tests fork and allow the parent to exit before writing all their output. If Test2::Harness detects an incomplete plan after the test exists it will monitor for more events until the timeout period. Add the "# HARNESS-NO-TIMEOUT" comment to the top of a test file to disable timeouts on a per-test basis.
(Default: on) Include 'blib/lib' and 'blib/arch'
Do not include 'blib/lib' and 'blib/arch'
Use the specified file as standard input to ALL tests
(Default: on) Include 'lib' in your module path
Do not include 'lib'
Send results to a slack channel
Send results to a slack user
Send failing results to a slack channel
Send failing results to a slack user
(Default: off) Include 't/lib' in your module path
Set an environment variable for each test
(but not the harness)
This input string will be used as standard input for ALL tests
See also --input-file
Add a directory to your include paths
This can be used multiple times
use Devel::Cover to calculate test coverage
This is essentially the same as combining: '--no-fork', and '-MDevel::Cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl' Devel::Cover and preload/fork do not work well together.
Specify the default file/dir search when 'AUTHOR_TESTING' is set. Defaults to './xt'. The default AT search is only used if no files were specified at the command line
Specify the default file/dir search. defaults to './t', './t2', and 'test.pl'. The default search is only used if no files were specified at the command line
Email the test results (and any log file) to the specified email address(es)
If any email is sent, this is who it will be from
Email the owner of broken tests files upon failure. Add `# HARNESS-META-OWNER foo@example.com` to the top of a test file to give it an owner
(Default: on) fork to start tests
Do not fork to start tests
Test2::Harness normally forks to start a test. Forking can break some select tests, this option will allow such tests to pass. This is not compatible with the "preload" option. This is also significantly slower. You can also add the "# HARNESS-NO-PRELOAD" comment to the top of the test file to enable this on a per-test basis.
Usually owner failures are sent as a single batch at the end of testing. Toggle this to send failures as they happen.
Off by default, log file will be attached if available
Attach the event log to any slack notifications.
On by default if --slack-url is specified
Send slack notifications to the slack channels/users listed in test meta-data when tests fail.
Specify an API endpoint for slack webhook integrations
This should be your slack webhook url.
Use 'stream' instead of TAP (Default: use stream)
Do not use stream
Use TAP
The TAP format is lossy and clunky. Test2::Harness normally uses a newer streaming format to receive test results. There are old/legacy tests where this causes problems, in which case setting --TAP or --no-stream can help.
(Default: On) put '.' in @INC
Do not put '.' in @INC
perl is removing '.' from @INC as a security concern. This option keeps things from breaking for now.
This will set the AUTHOR_TESTING environment to true
Many cpan modules have tests that are only run if the AUTHOR_TESTING environment variable is set. This will cause those tests to run.
Do not delete the work directory when done
This is useful if you want to inspect the work directory after the harness is done. The work directory path will be printed at the end.
Pass the specified switch to perl for each test
This is not compatible with preload.
Monitor timing data for each test file
This tells perl to load Test2::Plugin::Times before starting each test.
Turn color on (Default: on)
Turn color off
Show the job configuration when a job starts
(Default: off, unless -vv)
Show output for the start of a job
(Default: off unless -v)
Show the run configuration when a run starts
Be very quiet
Turn on verbose mode.
Specify multiple times to be more verbose.
Specify the formatter to use
(Default: "Test2")
Only useful when a renderer is set to "Formatter". This specified the Test2::Formatter::XXX that will be used to render the test output.
Quiet, but verbose on failure
Hide all output from tests when they pass, except to say they passed. If a test fails then ALL output from the test is verbosely output.
Show output when a job ends
(Default: on)
This is only used when the renderer is set to "Formatter"
Specify renderers
(Default: "Formatter")
Use "+" to give a fully qualified module name. Without "+" "Test2::Harness::Renderer::" will be prepended to your argument. You may specify custom arguments to the constructor after an "=" sign.
Load a plugin
can be specified multiple times
cancel any plugins listed until now
This can be used to negate plugins specified in .yath.rc or similar
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
Copyright 2017 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
To install Test2::Harness, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test2::Harness
CPAN shell
perl -MCPAN -e shell install Test2::Harness
For more information on module installation, please visit the detailed CPAN module installation guide.