NAME
App::Yath::Command::server - Start a yath web server
DESCRIPTION
Starts a web server that can be used to view test runs in a web browser
USAGE
$ yath [YATH OPTIONS] server [COMMAND OPTIONS] [COMMAND ARGUMENTS]
OPTIONS
Database Options
- --db-config ARG
- --db-config=ARG
- --no-db-config
-
Module that implements 'MODULE->yath_db_config(%params)' which should return a App::Yath::Schema::Config instance.
Can also be set with the following environment variables:
YATH_DB_CONFIG
- --db-driver Pg
- --db-driver MySQL
- --db-driver SQLite
- --db-driver MariaDB
- --db-driver Percona
- --db-driver PostgreSQL
- --no-db-driver
-
DBI Driver to use
Can also be set with the following environment variables:
YATH_DB_DRIVER
- --db-dsn ARG
- --db-dsn=ARG
- --no-db-dsn
-
DSN to use when connecting to the db
Can also be set with the following environment variables:
YATH_DB_DSN
- --db-host ARG
- --db-host=ARG
- --no-db-host
-
hostname to use when connecting to the db
Can also be set with the following environment variables:
YATH_DB_HOST
- --db-name ARG
- --db-name=ARG
- --no-db-name
-
Name of the database to use
Can also be set with the following environment variables:
YATH_DB_NAME
- --db-pass ARG
- --db-pass=ARG
- --no-db-pass
-
Password to use when connecting to the db
Can also be set with the following environment variables:
YATH_DB_PASS
- --db-port ARG
- --db-port=ARG
- --no-db-port
-
port to use when connecting to the db
Can also be set with the following environment variables:
YATH_DB_PORT
- --db-socket ARG
- --db-socket=ARG
- --no-db-socket
-
socket to use when connecting to the db
Can also be set with the following environment variables:
YATH_DB_SOCKET
- --db-user ARG
- --db-user=ARG
- --no-db-user
-
Username to use when connecting to the db
Can also be set with the following environment variables:
YATH_DB_USER
,USER
Harness Options
- -d
- --dummy
- --no-dummy
-
Dummy run, do not actually execute anything
Can also be set with the following environment variables:
T2_HARNESS_DUMMY
The following environment variables will be cleared after arguments are processed:
T2_HARNESS_DUMMY
- --procname-prefix ARG
- --procname-prefix=ARG
- --no-procname-prefix
-
Add a prefix to all proc names (as seen by ps).
The following environment variables will be set after arguments are processed:
T2_HARNESS_PROC_PREFIX
Server Options
- --daemon
- --no-daemon
-
Run the server in the background.
- --dev
- --no-dev
-
Launches in "developer mode" which accepts some developer commands while the server is running.
- --email ARG
- --email=ARG
- --no-email
-
When using an ephemeral database you can use this to set a 'from' email address for email sent from this server.
- --ephemeral
- --ephemeral=Auto
- --ephemeral=MySQL
- --ephemeral=SQLite
- --ephemeral=MariaDB
- --ephemeral=Percona
- --ephemeral=PostgreSQL
- --no-ephemeral
-
Use a temporary 'ephemeral' database that will be destroyed when the server exits.
- --no-upload
- --no-no-upload
-
When using an ephemeral database you can use this to enable no-upload mode which removes the upload workflow.
- --shell
- --no-shell
-
Drop into a shell where the server and/or database env vars are set so that yath commands will use the started server.
- --single-run
- --no-single-run
-
When using an ephemeral database you can use this to enable single run mode which causes the server to take you directly to the first run.
- --single-user
- --no-single-user
-
When using an ephemeral database you can use this to enable single user mode to avoid login and user credentials.
Terminal Options
- -c
- --color
- --no-color
-
Turn color on, default is true if STDOUT is a TTY.
Can also be set with the following environment variables:
YATH_COLOR
,CLICOLOR_FORCE
The following environment variables will be set after arguments are processed:
YATH_COLOR
- --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
- --term-size 80
- --term-width 80
- --term-size 200
- --term-width 200
- --no-term-width
-
Alternative to setting $TABLE_TERM_SIZE. Setting this will override the terminal width detection to the number of characters specified.
Can also be set with the following environment variables:
TABLE_TERM_SIZE
The following environment variables will be set after arguments are processed:
TABLE_TERM_SIZE
Web Server Options
- --host ARG
- --host=ARG
- --no-host
-
Host/Address to bind to, default 'localhost'.
- --importers ARG
- --importers=ARG
- --no-importers
-
Number of log importer processes.
- --launcher ARG
- --launcher=ARG
- --no-launcher
-
Command to use to launch the server (--server argument to Plack::Runner)
Note: You can pass custom args to the launcher after a '::' like `yath server [ARGS] [LOG FILES(s)] :: [LAUNCHER ARGS]`
- --launcher-args "--reload"
- --launcher-args="--reload"
- --no-launcher-args
-
Set additional options for the loader.
Note: It is better to put loader arguments after '::' at the end of the command line.
Note: Can be specified multiple times
- --port ARG
- --port=ARG
- --no-port
-
Port to listen on.
Note: This is passed to the launcher via `launcher --port PORT`
- --port-command ARG
- --port-command=ARG
- --no-port-command
-
Command to run that returns a port number.
- --workers ARG
- --workers=ARG
- --no-workers
-
Number of workers. Defaults to the number of cores, or 5 if System::Info is not installed.
Note: This is passed to the launcher via `launcher --workers WORKERS`
Yath Options
- --base-dir ARG
- --base-dir=ARG
- --no-base-dir
-
Root directory for the project being tested (usually where .yath.rc lives)
- -D
- -Dlib
- -Dlib
- -D=lib
- -D"lib/*"
- --dev-lib
- --dev-lib=lib
- --dev-lib="lib/*"
- --no-dev-lib
-
This is what you use if you are developing yath or yath plugins to make sure the yath script finds the local code instead of the installed versions of the same code. You can provide an argument (-Dfoo) to provide a custom path, or you can just use -D without and arg to add lib, blib/lib and blib/arch.
Note: This option can cause yath to use exec() to reload itself with the correct libraries in place. Each occurence of this argument can cause an additional exec() call. Use --dev-libs-verbose BEFORE any -D calls to see the exec() calls.
Note: Can be specified multiple times
- --dev-libs-verbose
- --no-dev-libs-verbose
-
Be verbose and announce that yath will re-exec in order to have the correct includes (normally yath will just call exec() quietly)
- -h
- -h=Group
- --help
- --help=Group
- --no-help
-
exit after showing help information
- -p key=val
- -p=key=val
- -pkey=value
- -p '{"json":"hash"}'
- -p='{"json":"hash"}'
- -p:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- -p :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- -p=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugin key=val
- --plugin=key=val
- --plugins key=val
- --plugins=key=val
- --plugin '{"json":"hash"}'
- --plugin='{"json":"hash"}'
- --plugins '{"json":"hash"}'
- --plugins='{"json":"hash"}'
- --plugin :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugin=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugins :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugins=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --no-plugins
-
Load a yath plugin.
Note: Can be specified multiple times
- --project ARG
- --project=ARG
- --project-name ARG
- --project-name=ARG
- --no-project
-
This lets you provide a label for your current project/codebase. This is best used in a .yath.rc file.
- --scan-options key=val
- --scan-options=key=val
- --scan-options '{"json":"hash"}'
- --scan-options='{"json":"hash"}'
- --scan-options(?^:^--(no-)?(?^:scan-(.+))$)
- --scan-options :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --scan-options=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --no-scan-options
- /^--(no-)?scan-(.+)$/
-
Yath will normally scan plugins for options. Some commands scan other libraries (finders, resources, renderers, etc) for options. You can use this to disable all scanning, or selectively disable/enable some scanning.
Note: This is parsed early in the argument processing sequence, before options that may be earlier in your argument list.
Note: Can be specified multiple times
- --show-opts
- --show-opts=group
- --no-show-opts
-
Exit after showing what yath thinks your options mean
- --user ARG
- --user=ARG
- --no-user
-
Username to associate with logs, database entries, and yath servers.
Can also be set with the following environment variables:
YATH_USER
,USER
- -V
- --version
- --no-version
-
Exit after showing a helpful usage message
SOURCE
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright 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.