プロジェクト

全般

プロフィール

PluginUsageEn » 履歴 » リビジョン 4

リビジョン 3 (Mitsuyoshi Yoshida, 2011/11/20 11:09) → リビジョン 4/5 (Mitsuyoshi Yoshida, 2011/11/21 10:03)

[[PluginUsage|日本語]] 

 h1. Plugin Usage 

 {{>toc}} 

 h2. testlink(testcase) Macro 

 Writes macro like this format:  

 <pre><code class="plain"> 
     {{testlink(KEY, ID)}} 
     {{testcase(ID)}} 
 </code></pre> 

 In *KEY*, describes the key which specifies a link target. 
 The *testcase* macro is the one omitted *case* key. 

 Specifies an object ID of a target by *ID*. 
 An object ID of test case is found out at once, but Others is not. 
 Finds it from page adress and so on. 

 The link target which can be used is following: 

 |_. Key       |_. Link target        |_. Remarks | 
 | case        | Test case            | | 
 | suite       | Test suite           | | 
 | project     | Test project         | TestLink 1.8 or later | 
 | plan        | Test plan            | | 
 | milestone | Milestone 	          | | 
 | build       | Build target         | | 
 | cfield      | Custom field         | | 
 | keyword     | Keyword infomation | | 
 | user        | User infomation      | | 

 +Examples+: 

 <pre><code class="plain"> 
   {{testcase(sample-1)}} 
   {{testlink(case, sample-1)}} 
   {{testlink(suite, 2)}} 
   {{testlink(project, 1)}} 
   {{testlink(plan, 5)}} 
   {{testlink(milestone, 1)}} 
   {{testlink(build, 1)}} 
   {{testlink(cfield, 1)}} 
   {{testlink(user, 1)}} 
 </code></pre> 


 h2. Link to test results 

 If The version of TestLink is 1.8 or later, You can link to a test reslut. 

 <pre><code class="plain"> 
     {{testlink(KEY, ID [, ...])}} 
     {{testreport(ID, PLAN_ID [, OUTPUT_ITEM, ...])}} 
 </code></pre> 

 The *testreport* macro is the one omitted *report* key respectively. 

 The arguments since then *ID* change with the specified key. 

 The link target for test results is following: 

 |_. KEY        |_. Link target          |_.    Remarks                         | 
 | report       | Test report            | ID need two. Enable output items | 
 | planreport | Test plan report       | ID need two. Enable output items | 
 | metrics      | Metrics                |                                    | 
 | result       | Test result            | Enable status                      | 
 | graph 	      | Graph of test result |                                    | 

 Keys of report and planreport need two ID (ID, PLAN_ID) arguments. 
 And can be given output items after them. 

 |_. OUTPUT_ITEM |_. Description             |_. report |_. planreport | 
 | toc             | Table of Contents         |             |                 | 
 | header          | Test Suite description    |             |                 | 
 | summary         | Test Case Summary         |             |                 | 
 | body            | Test Case Scenario        |             |                 | 
 | author          | Test Case Author          |             |                 | 
 | keyword         | Test Case keywords        |             |                 | 
 | cfields         | Test Case Custom Fields |             |                 | 
 | passfail        | Test results              |             |                | 
 | metrics         | Metrics                   |             |                | 
 | testplan        | Test Plan description     |            |                 | 

 If omit output items, set default items which set in this plugin setting page. 

 !setting_report_en.png!    !setting_planreport_en.png! 

 +Examples+: 

 <pre><code class="plain"> 
   {{testreport(2,6)}} 
   {{testlink(report, 2, 6)}} 
   {{testreport(2,6, header, summary, toc, body, cfields, author, keyword, passfail, metrics)}} 
   {{testlink(planreport, 2, 6)}}  
   {{testlink(planreport, 2, 6, header, summary, toc, body, cfields, author, keyword, testplan)}} 
   {{testlink(metrics, 6)}}  
   {{testlink(graph, 6)}} 
 </code></pre> 


 h3. Argument of *result* 

 In the *result* case, A status of test case is given after ID argument, and The output result is filtered. 
 If omits status, show test cases of all status. 

 <pre><code class="plain"> 
   {{testlink(result, ID, STATUS)}} 
 </code></pre> 

 |_. STATUS |_. Description | 
 | f | Failed Test Cases    | 
 | b | Blocked Test Cases | 
 | n | Not run Test Cases | 

 +Examples+: 

 <pre><code class="plain"> 
   {{testlink(result, 6)}} 
   {{testlink(result, 6, f)}} 
 </code></pre> 


 h2. Macros(*testfile*) for file download 

 *testfile* macro links to output file in MS Word form, MS Excell and so on. 
 (TestLink 1.8 or later) 

 Writes macro like this:  

 <pre><code class="plain"> 
     {{testfile(FORMAT_NAME, KEY, ID [, ...])}} 
 </code></pre> 

 This macro is same as *testlink* except first argument(*FORMAT_NAME*) specified format type. 
 Enable *KEY* are changed by a specified format name. 

 |_. Format            |_. FORMAT_NAME |_. Enable KEY         | 
 | OpenOffice Writer | odt             | report, planreport | 
 | OpenOffice Calc     | ods             | metrics, result      | 
 | MS Word             | doc             | report, planreport | 
 | MS Excel            | xls             | metrics, result      | 

 +Example+: 

 <pre><code class="plain"> 
   {{testfile(odt, report, 2,6)}} 
   {{testfile(odt, planreport, 2, 6, header, summary, toc, body)}}  
   {{testfile(ods, metrics, 6)}}  
   {{testfile(ods, result, 6)}} 
   {{testfile(ods, result, 6, n)}} 
 </code></pre>