Studio:Linking Test Plan with results: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
==Overview== | ==Overview== | ||
[[Image:ReportOutputWithPortalLinks.jpg|thumb|widthpx| ]] | |||
When reviewing test output reports it's very helpful to have links from each test suite to its relevant test plan or test spec in the project portal wiki. | |||
Standard practice dictates that these links be added to all customer test reports in the suites' ''Description'' field. | |||
Top-level suite links to the overall test plan, and subsuites link to relevant sections. | Top-level suite links to the overall test plan, and subsuites link to relevant sections. | ||
Line 9: | Line 12: | ||
Set the relevant suite's Description field value to the URL of the linked document. | Set the relevant suite's Description field value to the URL of the linked document. | ||
==Script-Based Tests== | ==Script-Based Tests== |
Revision as of 21:42, 8 December 2008
This article describes the standard method for adding a link to the test plan on a STRIDE report
Overview
When reviewing test output reports it's very helpful to have links from each test suite to its relevant test plan or test spec in the project portal wiki.
Standard practice dictates that these links be added to all customer test reports in the suites' Description field.
Top-level suite links to the overall test plan, and subsuites link to relevant sections.
The method used depends on the type of testing done.
Set the relevant suite's Description field value to the URL of the linked document.
Script-Based Tests
Here, we assume that script-based tests will be run as part of a workspace whether within STRIDE Studio or from the command line.
For script-based tests, the preferred method of adding links is by setting each suite's Description property from the Properties window within STRIDE Studio. This has the benefit ***.
Set the testplan link at the top-level test suite (Script Files) and then set a link for each subfolder that contains tests that produce reporter output.
The suite description field recognizes special formatting that indicates a hyperlink. Link formatting is just like wiki:
[URL label]
Enclose URL in square brackets to indicate a link, provide optional label separated by a space within the brackets.
Put the link in each suite's Description field within the properties window.
Setting Links From a Script
- Linking Test Plan to Workspace Description
my $ScriptFiles = $main::studio->Workspace->Folders->Item('Script Files');
ScriptFiles->{Description} = '[http://my-portal.s2technologies.com Test Plan]';
- Linking Test Spec to a Suite
$main::testSuite->{Description} = '[http://my-portal.s2technologies.com#relevant_section Test Spec]';
Test Unit-Based Tests
For Test Unit-based tests, you must set the test suite description explicitly in your test unit code.
The most convenient place to add this code is in the test class' constructor. Assuming that szLINK_TO_TEST_SPEC
evaluates to the intended description string, the code to add is as follows:
For classes that derive from srTest
class_constructor()
{
...
// set suite description to link pointing to test spec
testSuite.SetDescription(szLINK_TO_TEST_SPEC);
...
}
For classes that do not derive from srTest
class_constructor()
{
...
// set suite description to link pointing to test spec
srTestSuiteSetDescription(srTEST_SUITE_DEFAULT, szLINK_TO_TEST_SPEC);
...
}
Example
The source code included in the Test Class Sample implements linking of each test class with its description in the support wiki.