HTTP-WebTest
view release on metacpan or search on metacpan
* HTTP::WebTest::Plugin::Apache plugin have been removed from
HTTP::WebTest and will be released as independent CPAN module. It
will no longer be loaded by default even if it is available.
* Renamed all last_xxx methods to current_xxx since the latest naming
schema is less confusing.
* HTTP::WebTest::Plugin::HarnessReport is rewritten using
Test::Builder. As a side effect you can now freely intermix
HTTP::WebTest based tests with tests written using other testing
libraries like Test::More or Test::Differences. Unfortunately this
change breaks existing test scripts which were using
HTTP::WebTest::Plugin::HarnessReport because now number of tests in
test scripts should be declared explictly with 'use Test::More plan =>
NN' or 'use Test::More qw(no_plan)'.
BUG FIXES:
* Fixed some minor documentation bugs. Thanks to William McKee.
* Allow to use $webtest->last_xxx method calls after running test
lib/HTTP/WebTest/Cookbook.pod view on Meta::CPAN
default_report => 'no',
plugins => [ '::HarnessReport' ]
});
This script uses reporting plugin
L<HTTP::WebTest::Plugin::HarnessReport|HTTP::WebTest::Plugin::HarnessReport>
which internally uses L<Test::Builder|Test::Builder> module to
generate L<Test::Harness|Test::Harness> compatible output. It should
be compatible with other testing libraries built using
L<Test::Builder|Test::Builder> (like L<Test::More|Test::More> or
L<Test::Differences|Test::Differences>) so you can freely intermix
them in one test script.
=head2 User-Defined Tests
It is possible to define new tests without writing new plugin
module. This is a fragment of a wtscript file that checks if a new record
has been inserted into a database as a result of the Add Record test.
# load HTTP::WebTest::Plugin::Hooks module which provides test
# parameters 'on_start', 'on_finish' and 'on_response'
lib/HTTP/WebTest/Plugin/HarnessReport.pm view on Meta::CPAN
N/A
=head1 DESCRIPTION
This plugin creates reports that are compatible with
L<Test::Harness|Test::Harness>. By default, this plugin is not loaded
by L<HTTP::WebTest|HTTP::WebTest>. To load it, use the global test
parameter C<plugins>. Internally this plugin uses
L<Test::Builder|Test::Builder> module so it should be compatible with
other testing libraries (like L<Test::More|Test::More> or
L<Test::Differences|Test::Differences>). You should be able to
intermix them freely in one test script.
Unless you want to get mix of outputs from the default report and this
report (normally you don't want it), the default report plugin should
be disabled. See parameter C<default_report> (value C<no>).
Test parameters C<plugins> and C<default_report> are documented in
L<HTTP::WebTest|HTTP::WebTest>.
=head1 EXAMPLE
( run in 0.441 second using v1.01-cache-2.11-cpan-131fc08a04b )