Procedural File: print.inc.php
Source Location: /print.inc.php
Includes
TestLink Open Source Project - http://testlink.sourceforge.net/ This script is distributed under the GNU General Public License 2 or later.
Information Tags:
| Author: | Martin Havlat <havlat@users.sourceforge.net> Library for documents generation Used by printDocument.php Revisions: 20090330 - franciscom - renderTestSpecTreeForPrinting() - added logic to print ALWAYS test plan custom fields 20090329 - franciscom - renderTestCaseForPrinting() refactoring of code regarding custom fields renderTestSuiteNodeForPrinting() - print ALWAYS custom fields 20090326 - amkhullar - BUGID 2207 - Code to Display linked bugs to a TC in Test Report 20090322 - amkhullar - added check box for Test Case Custom Field display on Test Plan/Report 20090223 - havlatm - estimated execution moved to extra chapter, refactoring a few functions 20090129 - havlatm - removed base tag from header (problems with internal links for some browsers) 20081207 - franciscom - BUGID 1910 - changes on display of estimated execution time added code to display CF with scope='execution' 20080820 - franciscom - added contribution (BUGID 1670) Test Plan report: Total Estimated execution time will be printed on table of contents. Compute of this time can be done if: - Custom Field with Name CF_ESTIMATED_EXEC_TIME exists
- Custom Field is managed at design time
- Custom Field is assigned to Test Cases
Important Note: Lots of controls must be developed to avoid problems presenting with results, when user use time with decimal part. Example: 14.6 minuts what does means? a) 14 min and 6 seconds? b) 14 min and 6% of 1 minute => 14 min 3.6 seconds ?Implementation at (20080820) is very simple => is user responsibility to use good times (may be always interger values) to avoid problems. Another choice: TL must round individual times before doing sum. 20080819 - franciscom - renderTestCaseForPrinting() - removed mysql only code 20080602 - franciscom - display testcase external id 20080525 - havlatm - fixed missing test result 20080505 - franciscom - renderTestCaseForPrinting() - added custom fields 20080418 - franciscom - document_generation configuration . removed tlCfg global coupling 20071014 - franciscom - renderTestCaseForPrinting() added printing of test case version 20070509 - franciscom - changes in renderTestSpecTreeForPrinting() interface ----------------------------------------------------------------------------------- |
| Version: | $Revision: 1.1.2.1 $ |
Functions
buildTestPlanMetrics [line 674]
string buildTestPlanMetrics(
$statistics
)
|
|
compose html text for metrics (meantime estimated time only)
Parameters:
API Tags:
renderEof [line 664]
API Tags:
| Return: | final markup for HTML |
renderFirstPage [line 95]
string renderFirstPage(
singleton $doc_info
)
|
|
Generate initial page of document
Parameters:
|
singleton |
$doc_info: |
data with the next string values: title type_name: what does this means ??? author, tproject_name, testplan_name |
API Tags:
Information Tags:
renderHTMLHeader [line 69]
string renderHTMLHeader(
string $title, string $base_href
)
|
|
render HTML header
Standard: HTML 4.01 trans (because is more flexible to bugs in user data)
Parameters:
|
string |
$title: |
|
|
string |
$base_href: |
Base URL |
API Tags:
renderSimpleChapter [line 149]
string renderSimpleChapter(
string $title, string $content
)
|
|
Generate a chapter to a document
Parameters:
|
string |
$title: |
|
|
string |
$content: |
|
API Tags:
Information Tags:
renderTestCaseForPrinting [line 257]
void renderTestCaseForPrinting(
&$db, &$node, &$printingOptions, $level, [ $tplan_id = 0], [ $prefix = null], [ $tprojectID = 0]
)
|
|
Parameters:
|
|
&$db: |
|
|
|
&$node: |
|
|
|
&$printingOptions: |
|
|
|
$level: |
|
|
|
$tplan_id: |
|
|
|
$prefix: |
|
|
|
$tprojectID: |
|
renderTestDuration [line 610]
void renderTestDuration(
$statistics
)
|
|
Parameters:
renderTestPlanForPrinting [line 596]
void renderTestPlanForPrinting(
&$db, &$node, $item_type, &$printingOptions, $tocPrefix, $tcCnt, $level, $user_id, $tplan_id, $tprojectID
)
|
|
Parameters:
|
|
&$db: |
|
|
|
&$node: |
|
|
|
$item_type: |
|
|
|
&$printingOptions: |
|
|
|
$tocPrefix: |
|
|
|
$tcCnt: |
|
|
|
$level: |
|
|
|
$user_id: |
|
|
|
$tplan_id: |
|
|
|
$tprojectID: |
|
renderTestSpecTreeForPrinting [line 172]
void renderTestSpecTreeForPrinting(
&$db, &$node, $item_type, &$printingOptions, $tocPrefix, $tcCnt, $level, $user_id, [ $tplan_id = 0], [ $tcPrefix = null], [ $tprojectID = 0]
)
|
|
Parameters:
|
|
&$db: |
|
|
|
&$node: |
|
|
|
$item_type: |
|
|
|
&$printingOptions: |
|
|
|
$tocPrefix: |
|
|
|
$tcCnt: |
|
|
|
$level: |
|
|
|
$user_id: |
|
|
|
$tplan_id: |
|
|
|
$tcPrefix: |
|
|
|
$tprojectID: |
|
renderTestSuiteNodeForPrinting [line 534]
void renderTestSuiteNodeForPrinting(
&$db, &$node, &$printingOptions, $tocPrefix, $level, $tplan_id, $tproject_id
)
|
|
Parameters:
|
|
&$db: |
|
|
|
&$node: |
|
|
|
&$printingOptions: |
|
|
|
$tocPrefix: |
|
|
|
$level: |
|
|
|
$tplan_id: |
|
|
|
$tproject_id: |
|
renderToc [line 512]
void renderToc(
&$printingOptions
)
|
|
Parameters:
|
|