setup_test_database

Create the test database. This can be overloaded if you do your databases in a different way.

load_test_configs FILENAME

This will load all the test config files that apply to FILENAME (default: $0, the current test script file). Say you are running the test script /home/bob/MyApp/t/user/12-delete.t. The files that will be loaded are:

/home/bob/MyApp/t/user/12-delete.t-config.yml

/home/bob/MyApp/t/user/test_config.yml

/home/bob/MyApp/t/test_config.yml

..followed by the usual Jifty configuration files (such as MyApp/etc/config.yml and MyApp/etc/site_config.yml). The options in a more specific test file override the options in a less specific test file.

The options are returned in a single hashref.

test_config

Returns a hash which overrides parts of the application's configuration for testing. By default, this changes the database name by appending a 'test', as well as setting the port to a random port between 10000 and 15000. Individual test configurations may override these defaults (see load_test_configs).

It is passed the current configuration before any test config is loaded.

You can override this to provide application-specific test configuration, e.g:

Note that this is deprecated in favor of having real config files in your test directory.

make_server

Creates a new Jifty::TestServer depending on the value of $ENV{JIFTY_TEST_SERVER}. If the environment variable is Inline, we run tests using PSGI inline without spawning an actual server. Otherwise, we fork off a Plack::Server to run tests against.

web

Like calling <Jifty-web>>.

<Jifty::Test-web>> does the necessary Jifty->web initialization for it to be usable in a test.