SYNOPSIS
my $harness = TestHarness->new(
this_file => $FindBin::Script
);
my %selenium_args = %{ $harness->base_caps };
DESCRIPTION
A setup class for all the repetitive things we need to do before running tests. First, we're deciding whether the test is in record
or replay
mode. If we're recording, we'll end up writing all the HTTP request/response pairs out to "mock_file". If we're replaying, we'll look for our OS-appropriate mock_file and try to read from it.
After we figure that out, we can instantiate our Mock::RemoteConnection with the proper constructor arguments and return that as our base_args for use in the tests! Finally, on destruction, if we're recording, we make sure to dump out all of the request/response pairs to the mock_file.
Required. Pass in the short name of the test file in use so we can figure out where the corresponding recording belongs. For a test file named t/01-driver.t
, we'd expect this argument to be 01-driver.t
.
Optional. Determines whether or not this test run should record new mocks, or look up a previous recording to replay against them. If the parameter is not used during construction, the default behavior is to check for the environment variable WD_MOCKING_RECORD to be defined and equal to 1.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 30:
Unknown directive: =attr
- Around line 45:
Unknown directive: =attr