use base 'Socialtext::WikiObject::TestPlan';
my $test_plan = Socialtext::WikiObject::TestPlan->new(
rester => $rester,
page => $plan_page,
server => $test_server,
workspace => $test_workspace,
DESCRIPTIONSocialtext::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.
new( %opts )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.
run_tests()Execute the tests.