Socialtext::WikiObject::TestPlan - Load wiki pages as Test plan objects
use base 'Socialtext::WikiObject::TestPlan'; my $test_plan = Socialtext::WikiObject::TestPlan->new( rester => $rester, page => $plan_page, server => $test_server, workspace => $test_workspace, ); $test_plan->run_tests;
Socialtext::WikiObject::TestPlan fetches Wiki pages using the Socialtext REST API, and parses the page into a testplan object. This class can be subclassed to support different types of test plans.
Test Plans look for a list item at the top level of the page looking like this:
* Fixture: Foo
This tells the TestPlan object to create a Socialtext::WikiFixture::Foo object and use it to run the tests. A default fixture can also be specified in the constructor.
The wiki tests are specified as tables in the top level of the page.
Test Plans can also contain links to other test plans. If no fixture is found, the test plan will look for wiki links in any top level list items:
* [This Test Plan] * [That Test Plan]
These pages will be loaded as TestPlan objects, and their tests will be run as well.
Create a new test plan. Options:
Mandatory - specifies the Socialtext::Resting object that will be used to load the test plan. The rester should already have a workspace conifgured.
Mandatory - the page containing the test plan.
A hashref containing arguments to pass through to the fixture constructor.
Execute the tests.
To install Socialtext::WikiTest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Socialtext::WikiTest
CPAN shell
perl -MCPAN -e shell install Socialtext::WikiTest
For more information on module installation, please visit the detailed CPAN module installation guide.