App::Y...ojects(3pm)

✨ App::Yath::Command::projects ✨

okay bestie, so this is a page from the User Contributed Perl Documentation collection, and the module living here is App::Yath::Command::projects. Pull up a chair, grab a strawberry πŸ“, we're doing this.


πŸ’– NAME πŸ’–

App::Yath::Command::projects β€” Run tests for multiple projects


🌸 DESCRIPTION 🌸

This command runs all the tests for each project inside a parent directory. Like, every project. All of them. No cap. 🫢


πŸŽ€ USAGE πŸŽ€

$ yath [YATH OPTIONS] projects [COMMAND OPTIONS]

🌈 YATH OPTIONS 🌈

πŸ‘‘ Developer πŸ‘‘

  • --dev-lib, --dev-lib=lib, -D, -D=lib, -Dlib, --no-dev-lib β€” this one adds paths to @INC before literally anything gets loaded. It's giving main character energy for people developing yath itself, or yath plugins, who need the yath script to find their local code instead of the installed versions of the same code. You can hand it an argument (-Dfoo) for a custom path, or just use -D with no arg and it adds lib, blib/lib and blib/arch. πŸ’…

Can be specified multiple times.

🌱 Environment 🌱

  • --persist-dir ARG, --persist-dir=ARG, --no-persist-dir β€” where to find persistence files.
  • --persist-file ARG, --persist-file=ARG, --pfile ARG, --pfile=ARG, --no-persist-file β€” where to find the persistence file. The default is /{system-tempdir}/project-yath-persist.json. If no project is specified then it falls back to the current directory. And if the current directory isn't writable it defaults to /tmp/yath-persist.json, which lowkey limits you to one persistent runner on your whole system. 🫠
  • --project ARG, --project=ARG, --project-name ARG, --project-name=ARG, --no-project β€” lets you slap a label on your current project/codebase. Best used in a .yath.rc file, and it is necessary for a persistent runner. periodt.

πŸ” Finder Options πŸ”

  • --finder MyFinder, --finder +Test2::Harness::Finder::MyFinder, --no-finder β€” pick which Finder subclass gets used when searching for files and processing the file list. Use the + prefix to give a fully qualified namespace, otherwise the Test2::Harness::Finder::XXX namespace is assumed. ✨

πŸ›  Help and Debugging πŸ› 

  • --show-opts, --no-show-opts β€” exit after showing what yath thinks your options mean. (spoiler: it's usually right, it's just messy)
  • --version, -V, --no-version β€” exit after showing a helpful usage message.

🧚 Plugins 🧚

  • --no-scan-plugins, --no-no-scan-plugins β€” normally yath scans for and loads all the App::Yath::Plugin::* modules so it can bring in whatever command-line options they provide. This flag turns that off. It's the move when you've got a naughty plugin loading other modules when it absolutely should not be. πŸ™ˆ
  • --plugins PLUGIN, --plugins +App::Yath::Plugin::PLUGIN, --plugins PLUGIN=arg1,arg2,..., --plugin PLUGIN, --plugin +App::Yath::Plugin::PLUGIN, --plugin PLUGIN=arg1,arg2,..., -pPLUGIN, --no-plugins β€” load a yath plugin. πŸ”Œ

Can be specified multiple times.


πŸ’œ COMMAND OPTIONS πŸ’œ

🧺 Collector Options 🧺

  • --max-open-jobs 18, --no-max-open-jobs β€” the maximum number of jobs a collector can process at one time. If more jobs are pending, their output gets delayed until the earlier jobs have been processed. (Default: double the -j value)
  • --max-poll-events 1000, --no-max-poll-events β€” the maximum number of events to poll from a job before jumping to the next job. (Default: 1000)

🎨 Cover Options 🎨

  • --cover-aggregator ByTest, --cover-aggregator ByRun, --cover-aggregator +Custom::Aggregator, --cover-agg ByTest, --cover-agg ByRun, --cover-agg +Custom::Aggregator, --no-cover-aggregator β€” choose a custom aggregator subclass.
  • --cover-class ARG, --cover-class=ARG, --no-cover-class β€” choose a Test2::Plugin::Cover subclass.
  • --cover-dirs ARG, --cover-dirs=ARG, --cover-dir ARG, --cover-dir=ARG, --no-cover-dirs β€” NO DESCRIPTION - FIX ME

Can be specified multiple times.

  • --cover-exclude-private, --no-cover-exclude-private, --cover-files, --no-cover-files β€” use Test2::Plugin::Cover to collect coverage data for what files are touched by what tests. Unlike Devel::Cover this has very little performance impact (About 4% difference). slay. πŸ”₯
  • --cover-from path/to/log.jsonl, --cover-from http://example.com/coverage, --cover-from path/to/coverage.jsonl, --no-cover-from β€” this can be a test log, a coverage dump (old style json or new jsonl format), or a url to any of the previous. Tests will not be run if the file/url is invalid. πŸ‘€
  • --cover-from-type json, --cover-from-type jsonl, --cover-from-type log, --no-cover-from-type β€” file type for the coverage source. Usually it can be detected, but when it can't you should specify. "json" is old style single-blob coverage data, "jsonl" is the new by-test style, "log" is a logfile from a previous run.
  • --cover-maybe-from path/to/log.jsonl, --cover-maybe-from http://example.com/coverage, --cover-maybe-from path/to/coverage.jsonl, --no-cover-maybe-from β€” this can be a test log, a coverage dump (old style json or new jsonl format), or a url to any of the previous. Tests will continue even if the coverage file/url is invalid. (the chill version of the one above 🫢)
  • --cover-maybe-from-type json, --cover-maybe-from-type jsonl, --cover-maybe-from-type log, --no-cover-maybe-from-type β€” same as "from_type" but for "maybe_from". Defaults to "from_type" if that's specified, otherwise auto-detect.
  • --cover-metrics, --no-cover-metrics, --cover-types ARG, --cover-types=ARG, --cover-type ARG, --cover-type=ARG, --no-cover-types β€” NO DESCRIPTION - FIX ME

Can be specified multiple times.

  • --cover-write, --cover-write=coverage.jsonl, --cover-write=coverage.json, --no-cover-write β€” create a json or jsonl file of all coverage data seen during the run (This implies --cover-files). πŸ“

πŸ¦‹ Display Options πŸ¦‹

  • --color, --no-color β€” turn color on. Default is true if STDOUT is a TTY. (rainbow terminal, we love to see it 🌈)
  • --hide-runner-output, --no-hide-runner-output β€” hide output from the runner, showing only test output. (See Also truncate_runner_output)
  • --no-final-table, --no-no-final-table β€” when printing final results, don't use table-style display.
  • --no-wrap, --no-no-wrap β€” do not do fancy text-wrapping, let the terminal handle it.
  • --progress, --no-progress β€” toggle progress indicators. On by default if STDOUT is a TTY. You can use --no-progress to disable the 'events seen' counter and buffered event pre-display. ⏳
  • --quiet, -q, --no-quiet β€” be very quiet. 🀫

Can be specified multiple times.

  • --renderers +My::Renderer, --renderers Renderer=arg1,arg2,..., --renderer +My::Renderer, --renderer Renderer=arg1,arg2,..., --no-renderers β€” specify renderers, (Default: "Formatter=Test2"). Use "+" to give a fully qualified module name. Without "+", "Test2::Harness::Renderer::" gets prepended to your argument.

Can be specified multiple times. If the same key is listed multiple times the value lists will be appended together.

  • --show-times, -T, --no-show-times β€” show the timing data for each job.
  • --term-width 80, --term-width 200, --term-size 80, --term-size 200, --no-term-width β€” alternative to setting $TABLE_TERM_SIZE. Setting this overrides the terminal width detection to the number of characters specified.
  • --truncate-runner-output, --no-truncate-runner-output β€” only show runner output that was generated after the current command. This is only useful with a persistent runner.
  • --verbose, -v, --no-verbose β€” be more verbose. πŸ—£

Can be specified multiple times.

πŸ”Ž Finder Options πŸ”Ž

  • --default-at-search ARG, --default-at-search=ARG, --no-default-at-search β€” 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.

Can be specified multiple times.

  • --default-search ARG, --default-search=ARG, --no-default-search β€” 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.

Can be specified multiple times.

  • --durations file.json, --durations http://example.com/durations.json, --no-durations β€” point at a json file or url which has a hash of relative test filenames as keys, and 'SHORT', 'MEDIUM', or 'LONG' as values. This overrides durations listed in the file headers. An exception will be thrown if the durations file or url does not work. πŸ’€
  • --durations-threshold ARG, --durations-threshold=ARG, --Dt ARG, --Dt=ARG, --no-durations-threshold β€” only fetch duration data if running at least this number of tests. Default (-j value + 1).
  • --exclude-file t/nope.t, --no-exclude-file β€” exclude a file from testing.

Can be specified multiple times.

  • --exclude-list file.txt, --exclude-list http://example.com/exclusions.txt, --no-exclude-list β€” point at a file or url which has a new line separated list of test file names to exclude from testing. Starting a line with a '#' will comment it out (for compatibility with Test2::Aggregate list files).

Can be specified multiple times.

  • --exclude-pattern t/nope.t, --no-exclude-pattern β€” exclude a pattern from testing, matched using m/$PATTERN/.

Can be specified multiple times.

  • --extension ARG, --extension=ARG, --ext ARG, --ext=ARG, --no-extension β€” specify valid test filename extensions, default: t and t2.

Can be specified multiple times.

  • --maybe-durations file.json, --maybe-durations http://example.com/durations.json, --no-maybe-durations β€” point at a json file or url which has a hash of relative test filenames as keys, and 'SHORT', 'MEDIUM', or 'LONG' as values. This overrides durations listed in the file headers. An exception will be thrown if the durations file or url does not work.
  • --no-long, --no-no-long β€” do not run tests that have their duration flag set to 'LONG'.
  • --only-long, --no-only-long β€” only run tests that have their duration flag set to 'LONG'.
  • --rerun, --rerun=path/to/log.jsonl, --rerun=plugin_specific_string, --no-rerun β€” re-run tests from a previous run from a log file (or last log file). Plugins can intercept this, such as YathUIDB which will grab a run UUID and derive tests to re-run from that. πŸŒ€
  • --rerun-all, --rerun-all=path/to/log.jsonl, --rerun-all=plugin_specific_string, --no-rerun-all β€” bestie, this one re-runs literally ALL the tests from a previous run, pulled from a log file (or the last log file if you don't hand it one). And the plugins can slide in and intercept it β€” like YathUIDB, which will grab a run UUID and derive which tests to re-run from that. so extra ✨
  • --rerun-failed, --rerun-failed=path/to/log.jsonl, --rerun-failed=plugin_specific_string, --no-rerun-failed β€” same energy, but this time it only re-runs the failed tests from a previous run, from a log file (or the last log file). Plugins can intercept β€” YathUIDB will grab a run UUID and derive the tests to re-run from it.
  • --rerun-missed, --rerun-missed=path/to/log.jsonl, --rerun-missed=plugin_specific_string, --no-rerun-missed β€” runs the missed tests from a previously aborted/stopped run, from a log file (or the last log file). Again, plugins can intercept, e.g. YathUIDB grabbing a run UUID to derive what to re-run.
  • --rerun-modes failed,missed,..., --rerun-modes all, --rerun-modes failed, --rerun-modes missed, --rerun-modes passed, --rerun-modes retried, --rerun-mode failed,missed,..., --rerun-mode all, --rerun-mode failed, --rerun-mode missed, --rerun-mode passed, --rerun-mode retried, --no-rerun-modes β€” pick which test categories to run πŸ’…

Can be specified multiple times

  • --rerun-passed, --rerun-passed=path/to/log.jsonl, --rerun-passed=plugin_specific_string, --no-rerun-passed β€” re-runs the passed tests from a previous run, from a log file (or the last log file). Plugins can intercept β€” YathUIDB grabs a run UUID and derives tests to re-run from that.
  • --rerun-plugin Foo, --rerun-plugin +App::Yath::Plugin::Foo, --no-rerun-plugin β€” which plugin(s) should be used for rerun. It will fall back to other plugins if the ones you listed decline the value, so this is basically just setting an order of priority 🫢

Can be specified multiple times

  • --rerun-retried, --rerun-retried=path/to/log.jsonl, --rerun-retried=plugin_specific_string, --no-rerun-retried β€” re-runs the retried tests from a previous run, from a log file (or the last log file). You already know the vibe: plugins can intercept, and YathUIDB will grab a run UUID and derive tests to re-run from that.
  • --search ARG, --search=ARG, --no-search β€” a list of tests and test directories to use instead of the default search paths. tbh you can usually just list these straight up as command line arguments without the --search prefix ✨

Can be specified multiple times


πŸŽ€ Formatter Options πŸŽ€

  • --formatter ARG, --formatter=ARG, --no-formatter β€” NO DESCRIPTION - FIX ME 😭 like ok so the docs literally never got written for this one. iconic of them, honestly.
  • --qvf, --no-qvf β€” [Q]uiet, but [V]erbose on [F]ailure. When tests pass, all their output is hidden β€” you just get told they passed. But the second a test fails, ALL of that test's output gets verbosely dumped out. no crumbs withheld πŸ’…
  • --show-job-end, --no-show-job-end β€” show output when a job ends. (Default: on)
  • --show-job-info, --no-show-job-info β€” show the job configuration when a job starts. (Default: off, unless -vv)
  • --show-job-launch, --no-show-job-launch β€” show output for the start of a job. (Default: off unless -v)
  • --show-run-info, --no-show-run-info β€” show the run configuration when a run starts. (Default: off, unless -vv)

🌸 Git Options 🌸

  • --git-change-base master, --git-change-base HEAD^, --git-change-base df22abe4, --no-git-change-base β€” find the files changed by all commits in the current branch, starting from the most recent and stopping the moment it hits a commit that's also present in the history of the branch/commit you gave as the change base πŸ”

πŸ’… Help and Debugging πŸ’…

  • --dummy, -d, --no-dummy β€” dummy run, do not actually execute anything πŸ™ˆ

Can also be set with the following environment variables: T2_HARNESS_DUMMY

  • --help, -h, --no-help β€” exit after showing help information
  • --interactive, -i, --no-interactive β€” use interactive mode, one test at a time, with stdin forwarded to it 🫢
  • --keep-dirs, --keep_dir, -k, --no-keep-dirs β€” do not delete directories when done. super useful when you wanna inspect the directories used for various commands πŸ”
  • --procname-prefix ARG, --procname-prefix=ARG, --no-procname-prefix β€” add a prefix to all proc names (as seen by ps).
  • --summary, --summary=/path/to/summary.json, --no-summary β€” write out a summary json file. If you don't give a path, summary.json gets used. The .json extension is added automatically if you omit it ✨

πŸ¦‹ Logging Options πŸ¦‹

  • --bzip2, --bz2, --bzip2_log, -B, --no-bzip2 β€” use bzip2 compression when writing the log. This option implies -L. The .bz2 prefix is added to the log file name for you πŸ’–
  • --gzip, --gz, --gzip_log, -G, --no-gzip β€” use gzip compression when writing the log. This option implies -L. The .gz prefix is added to the log file name for you πŸ’–
  • --log, -L, --no-log β€” turn on logging
  • --log-dir ARG, --log-dir=ARG, --no-log-dir β€” specify a log directory. Will fall back to the system temp dir.
  • --log-file ARG, --log-file=ARG, -F ARG, -F=ARG, --no-log-file β€” specify the name of the log file. This option implies -L.
  • --log-file-format ARG, --log-file-format=ARG, --lff ARG, --lff=ARG, --no-log-file-format β€” specify the format for automatically-generated log files. It gets overridden by --log-file, if that one's given. This option implies -L (Default: \$YATH_LOG_FILE_FORMAT, if that is set, or else "%!P%Y-%m-%d~%H:%M:%S~%!U~%!p.jsonl"). This is a string in which percent-escape sequences will be replaced as per POSIX::strftime. The following special escape sequences are also replaced: (%!P : Project name followed by a ~, if a project is defined, otherwise empty string) (%!U : the unique test run ID) (%!p : the process ID) (%!S : the number of seconds since local midnight UTC)

Can also be set with the following environment variables: YATH_LOG_FILE_FORMAT, TEST2_HARNESS_LOG_FORMAT


πŸ’Œ Notification Options πŸ’Œ

  • --notify-email foo@example.com, --no-notify-email β€” email the test results to the specified email address(es) πŸ“§

Can be specified multiple times

  • --notify-email-fail foo@example.com, --no-notify-email-fail β€” email the failing results to the specified email address(es)

Can be specified multiple times

  • --notify-email-from foo@example.com, --no-notify-email-from β€” if any email is sent, this is who it will be from
  • --notify-email-owner, --no-notify-email-owner β€” email the owner of broken test files upon failure. Add # HARNESS-META-OWNER foo@example.com to the top of a test file to give it an owner πŸ‘‘
  • --notify-no-batch-email, --no-notify-no-batch-email β€” usually owner failures are sent as a single batch at the end of testing. Toggle this to send failures as they happen.
  • --notify-no-batch-slack, --no-notify-no-batch-slack β€” usually owner failures are sent as a single batch at the end of testing. Toggle this to send failures as they happen.
  • --notify-slack '#foo', --notify-slack '@bar', --no-notify-slack β€” send results to a slack channel and/or user

Can be specified multiple times

  • --notify-slack-fail '#foo', --notify-slack-fail '@bar', --no-notify-slack-fail β€” send failing results to a slack channel and/or user

Can be specified multiple times

  • --notify-slack-owner, --no-notify-slack-owner β€” send slack notifications to the slack channels/users listed in test meta-data when tests fail.
  • --notify-slack-url https://hooks.slack.com/..., --no-notify-slack-url β€” specify an API endpoint for slack webhook integrations
  • --notify-text ARG, --notify-text=ARG, --message ARG, --message=ARG, --msg ARG, --msg=ARG, --no-notify-text β€” add a custom text snippet to email/slack notifications ✍️
  • --notify-text-module ARG, --notify-text-module=ARG, --message_module ARG, --message_module=ARG, --no-notify-text-module β€” use the specified module to generate messages for emails and/or slack.

πŸ”₯ Run Options πŸ”₯

  • --author-testing, -A, --no-author-testing β€” this will set the AUTHOR_TESTING environment to true
  • --dbi-profiling, --no-dbi-profiling β€” use Test2::Plugin::DBIProfile to collect database profiling data
  • --env-var VAR=VAL, -EVAR=VAL, -E VAR=VAL, --no-env-var β€” set environment variables to set when each test is run.

Can be specified multiple times

  • --event-uuids, --uuids, --no-event-uuids β€” use Test2::Plugin::UUID inside tests (default: on)
  • --fields name:details, --fields JSON_STRING, -f name:details, -f JSON_STRING, --no-fields β€” add custom data to the harness run

Can be specified multiple times

  • --input ARG, --input=ARG, --no-input β€” input string to be used as standard input for ALL tests. See also: --input-file
  • --input-file ARG, --input-file=ARG, --no-input-file β€” use the specified file as standard input to ALL tests
  • --io-events, --no-io-events β€” use Test2::Plugin::IOEvents inside tests to turn all prints into test2 events (default: off)
  • --link 'https://travis.work/builds/42', --link 'https://jenkins.work/job/42', --link 'https://buildbot.work/builders/foo/builds/42', --no-link β€” provide one or more links people can follow to see more about this run πŸ”—

Can be specified multiple times

  • --load ARG, --load=ARG, --load-module ARG, --load-module=ARG, -m ARG, -m=ARG, --no-load β€” load a module in each test (after fork). The "import" method is not called.

Can be specified multiple times

  • --load-import Module, --load-import Module=import_arg1,arg2,..., --loadim Module, --loadim Module=import_arg1,arg2,..., -M Module, -M Module=import_arg1,arg2,..., --no-load-import β€” load a module in each test (after fork). Import is called ✨

Can be specified multiple times. If the same key is listed multiple times the value lists will be appended together.

  • --mem-usage, --no-mem-usage β€” use Test2::Plugin::MemUsage inside tests (default: on)
  • --retry ARG, --retry=ARG, -r ARG, -r=ARG, --no-retry β€” run any jobs that failed a second time. NOTE: --retry=1 means failing tests will be attempted twice! 😭 like read that again bestie.

okay we are not done yet, there's still more coming πŸ’–

  • --retry-isolated, --retry-iso, --no-retry-isolated β€” bestie if this is true, every job retry happens in isolation, like someone secretly set -j1 for it πŸ’…
  • --run-id, --id, --no-run-id β€” set a specific run-id. (Default: a UUID, v mysterious of it honestly)
  • --test-args ARG, --test-args=ARG, --no-test-args β€” the arguments you wanna pass in as @ARGV for all the tests that get run. Pro tip: these are way easier to hand over using the :: argument separator πŸŽ€

Can be specified multiple times

  • --stream, --no-stream β€” use the stream formatter (default is on, slay)
  • --tap, --TAP, ----no-stream, --no-tap β€” okay so the TAP format is lossy and clunky 😭 Test2::Harness normally uses a newer streaming format to receive test results. But there are old/legacy tests where that causes problems, and if you're stuck in that situations, setting --TAP or --no-stream can help. 🫢

πŸƒ Runner Options πŸƒ

  • --abort-on-bail, --no-abort-on-bail β€” abort all testing if a bail-out is encountered (default: on)
  • --blib, -b, --no-blib β€” (Default: include if it exists) include blib/lib and blib/arch in your module path ✨
  • --cover, --cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl, --no-cover β€” use Devel::Cover to calculate test coverage. Heads up: this disables forking. If you don't specify any args, it uses these:
-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
  • --dump-depmap, --no-dump-depmap β€” when you're using staged preload, dump the depmap for each stage as json files πŸ“
  • --event-timeout SECONDS, --et SECONDS, --no-event-timeout β€” kill the test if no output arrives within the timeout period. (Default: 60 seconds). Add the # HARNESS-NO-TIMEOUT comment to the top of a test file to disable timeouts on a per-test basis. This is the thing that stops a hung test from running forever, iconic behaviour honestly πŸ‘‘
  • --fail-on-resource-skip, --no-fail-on-resource-skip β€” treat resource-skipped tests as failures instead of skips. When it's on, tests that would've been skipped because a resource wasn't available get marked as failing instead 😬
  • --include ARG, --include=ARG, -I ARG, -I=ARG, --no-include β€” add a directory to your include paths

Can be specified multiple times

  • --job-count 4, --job-count 8:2, --jobs 4, --jobs 8:2, -j4, -j8:2, --no-job-count β€” set how many concurrent jobs to run. Add a :# if you also wanna designate multiple slots per test. Like 8:2 means 8 slots, but each test takes 2 slots, so 4 tests run concurrently. Tests can find their concurrency assignment in the T2_HARNESS_MY_JOB_CONCURRENCY environment variable 🧚

Can also be set with the following environment variables: "YATH_JOB_COUNT", "T2_HARNESS_JOB_COUNT", "HARNESS_JOB_COUNT"

  • --lib, -l, --no-lib β€” (Default: include if it exists) include lib in your module path πŸ’–
  • --nytprof, --no-nytprof β€” use Devel::NYTProf on tests. This sets addpid=1 for you, so generous of it. Works with or without fork ✨
  • --post-exit-timeout SECONDS, --pet SECONDS, --no-post-exit-timeout β€” stop waiting post-exit after the timeout period. (Default: 15 seconds). Some tests fork and let the parent exit before writing all their output, and if Test2::Harness detects an incomplete plan after the test exits, it keeps monitoring 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 πŸ•°οΈ
  • --preload-threshold ARG, --preload-threshold=ARG, --Pt ARG, --Pt=ARG, -W ARG, -W=ARG, --no-preload-threshold β€” only do preload if at least N tests are actually gonna run. Sometimes a full preload takes longer than just running the tests, so this lets you set a minimum number of test jobs that must be run for preload to happen at all. No effect for a persistent runner. The default is 0, and that means always preload πŸ’«
  • --preloads ARG, --preloads=ARG, --preload ARG, --preload=ARG, -P ARG, -P=ARG, --no-preloads β€” preload a module before running tests

Can be specified multiple times

  • --resource-timeout SECONDS, --rt SECONDS, --no-resource-timeout β€” abort the whole test run if no tests have been able to start for SECONDS seconds while there are pending tests and none running. Super useful when a resource class is broken and keeps claiming a resource will become available, which would stop yath from ever finishing 😭 (Default: 0, meaning no timeout)
  • --resource Port, --resource +Test2::Harness::Runner::Resource::Port, -R Port, --no-resource β€” use a resource module to assign resource assignments to individual tests

Can be specified multiple times

  • --runner-id ARG, --runner-id=ARG, --no-runner-id β€” runner ID (usually a generated uuid)
  • --shared-jobs-config .sharedjobslots.yml, --shared-jobs-config relative/path/.sharedjobslots.yml, --shared-jobs-config /absolute/path/.sharedjobslots.yml, --no-shared-jobs-config β€” where to look for a shared slot config file. If you hand it a filename with no path, yath searches the current directory and all the parent directories for that name πŸ”
  • --slots-per-job 2, -x2, --no-slots-per-job β€” sets how many slots each job will use (default 1). Normally this is set by the :# in -j#:# πŸŽ€

Can also be set with the following environment variables: "T2_HARNESS_JOB_CONCURRENCY"

  • --switch ARG, --switch=ARG, -S ARG, -S=ARG, --no-switch β€” pass the specified switch to perl for each test. 🚨 This is not compatible with preload.

Can be specified multiple times

  • --tlib, --no-tlib β€” (Default: off) include t/lib in your module path
  • --unsafe-inc, --no-unsafe-inc β€” perl is removing . from @INC as a security concern, and this option keeps things from breaking for now πŸ‘€

Can also be set with the following environment variables: "PERL_USE_UNSAFE_INC"

  • --use-fork, --fork, --no-use-fork β€” (default: on, except on windows) Normally tests are run by forking, which is what allows features like preloading. Turning this off globally also kills preloading compatibility, and it's slower β€” it's genuinely better to tag the misbehaving tests with the # HARNESS-NO-PRELOAD comment in their header so forking is only disabled for those tests πŸ’…

Can also be set with the following environment variables: "!T2_NO_FORK", "T2_HARNESS_FORK", "!T2_HARNESS_NO_FORK", "YATH_FORK", "!YATH_NO_FORK"

  • --use-timeout, --timeout, --no-use-timeout β€” (default: on) enable/disable timeouts ⏳

πŸ—‚οΈ Workspace Options πŸ—‚οΈ

  • --clear, -C, --no-clear β€” clear the work directory if it isn't already empty 🧹
  • --tmp-dir ARG, --tmp-dir=ARG, --tmpdir ARG, --tmpdir=ARG, -t ARG, -t=ARG, --no-tmp-dir β€” use a specific temp directory (Default: use the system temp dir)

Can also be set with the following environment variables: "T2_HARNESS_TEMP_DIR", "YATH_TEMP_DIR", "TMPDIR", "TEMPDIR", "TMP_DIR", "TEMP_DIR"

  • --workdir ARG, --workdir=ARG, -w ARG, -w=ARG, --no-workdir β€” set the work directory (Default: a new temp directory)

Can also be set with the following environment variables: "T2_WORKDIR", "YATH_WORKDIR"


🌈 YathUI Options 🌈

  • --yathui-api-key ARG, --yathui-api-key=ARG, --no-yathui-api-key β€” your Yath-UI API key. Not necessary if your Yath-UI instance is set to single-user πŸ”‘
  • --yathui-coverage, --no-yathui-coverage β€” poll coverage data from Yath-UI to figure out which tests should be run for changed files
  • --yathui-durations, --no-yathui-durations β€” poll duration data from Yath-UI to help order tests efficiently ⏱️
  • --yathui-grace, --no-yathui-grace β€” if yath can't connect to yath-ui it normally throws an error, and this makes it fail gracefully instead. You get a warning, but things keep going 🫢
  • --yathui-long-duration 10, --no-yathui-long-duration β€” minimum duration length (in seconds) before a test goes from MEDIUM to LONG πŸ“
  • --yathui-medium-duration 5, --no-yathui-medium-duration β€” minimum duration length (in seconds) before a test goes from SHORT to MEDIUM πŸ“
  • --yathui-mode summary, --yathui-mode qvf, --yathui-mode qvfd, --yathui-mode complete, --no-yathui-mode β€” set the upload mode (default 'qvfd') ✨
  • --yathui-project ARG, --yathui-project=ARG, --no-yathui-project β€” the Yath-UI project your test results belong to πŸŽ€
  • --yathui-retry, --no-yathui-retry β€” how many times to try an operation before giving up

Can be specified multiple times


πŸ“¦ SOURCE πŸ“¦

The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/. Go star it bestie ⭐


πŸ‘‘ MAINTAINERS πŸ‘‘

Chad Granum <exodist@cpan.org>


πŸ’– AUTHORS πŸ’–

Chad Granum <exodist@cpan.org>


Copyright 2026 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/


aaaand that's the whole page bestie, we made it πŸŽ‰ this was perl v5.40.1, dated 2026-05-10, from the App::Y...ojects(3pm) page in the User Contributed Perl Documentation. now go run some tests, you've got this πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from