プロジェクト

全般

プロフィール

PluginUsageEn » 履歴 » バージョン 1

Mitsuyoshi Yoshida, 2011/11/19 22:25

1 1 Mitsuyoshi Yoshida
[[PluginUsage|日本語]]
2
3
h1. Plugin Usage
4
5
{{>toc}}
6
7
h2. testlink(testcase, testreport) Macro
8
9
Writes macro like this format: 
10
11
<pre><code class="plain">
12
    {{testlink(KEY, ID [, ...])}}
13
    {{testcase(ID)}}
14
    {{testreport(ID, PlanID [, output_item, ...])}}
15
</code></pre>
16
17
In *KEY*, describes the key which specifies an link target.
18
The *testcase*, *testreport* macro is the one omitted *case*, *report* key respectively.
19
20
And the arguments since then ID change with the specified key. (Almost key no argument)
21
22
The link target which can be used is the following.
23
24
|_. Key     |_. Link target      |
25
| case      | Test case          |
26
| suite     | Test suite         |
27
| project   | Test project       |
28
| plan      | Test plan          |
29
| milestone | Milestone	         |
30
| build     | Build target       |
31
| cfield    | Custom field       |
32
| keyword   | Keyword infomation |
33
| user      | User infomation    |
34
35
+Example+:
36
37
<pre><code class="plain">
38
  {{testcase(sample-1)}}
39
  {{testlink(case, sample-1)}}
40
  {{testlink(suite, 2)}}
41
  {{testlink(project, 1)}}
42
  {{testlink(plan, 5)}}
43
  {{testlink(milestone, 1)}}
44
  {{testlink(build, 1)}}
45
  {{testlink(cfield, 1)}}
46
  {{testlink(user, 1)}}
47
</code></pre>
48
49
For test result (TestLink 1.8 or later).
50
51
|_. KEY      |_. Link target        |_.  Remarks                       |
52
| report     | Test report          | ID need two. Enable output items |
53
| planreport | Test plan report     | ID need two. Enable output items |
54
| metrics    | Metrics              |                                  |
55
| result     | Test result          | Enable status                    |
56
| graph	     | Graph of test result |                                  |
57
58
59
The required ID is changed by specifid key.
60
An ID of test case is found out at once, but Others is not.
61
Finds it from page adress and so on.
62
63
64
h3. Arguments of "report" and "planreport"
65
66
Keys of report and planreport need two ID (ID, PlanID) arguments.
67
And can be given output items after them.
68
69
|_. Output Item |_. Description           |_. report |_. planreport |
70
| toc           | Table of Contents       |    ○    |      ○      |
71
| header        | Test Suite description  |    ○    |      ○      |
72
| summary       | Test Case Summary       |    ○    |      ○      |
73
| body          | Test Case Scenario      |    ○    |      ○      |
74
| author        | Test Case Author        |    ○    |      ○      |
75
| keyword       | Test Case keywords      |    ○    |      ○      |
76
| cfields       | Test Case Custom Fields |    ○    |      ○      |
77
| passfail      | Test results            |    ○    |              |
78
| metrics       | Metrics                 |    ○    |              |
79
| testplan      | Test Plan description   |          |      ○      |
80
81
If omit output items, set default items which set in this plugin setting page.
82
83
<pre><code class="plain">
84
  {{testreport(2,6)}}
85
  {{testlink(report, 2, 6)}}
86
  {{testreport(2,6, header, summary, toc, body, cfields, author, keyword, passfail, metrics)}}
87
  {{testlink(planreport, 2, 6)}} 
88
  {{testlink(planreport, 2, 6, header, summary, toc, body, cfields, author, keyword, testplan)}}
89
  {{testlink(metrics, 6)}} 
90
  {{testlink(graph, 6)}}
91
</code></pre>
92
93
94
h3. Argument of *result*
95
96
Can give a target status in the *result* key.
97
If omits status, show test cases of all status.
98
99
| f | Failed Test Cases  |
100
| b | Blocked Test Cases |
101
| n | Not run Test Cases |
102
103
+Example+:
104
105
<pre><code class="plain">
106
  {{testlink(result, 6)}}
107
  {{testlink(result, 6, f)}}
108
</code></pre>
109
110
111
h2. *testfile* Macro
112
113
*testfile* Macro links to output file in MS Word form, MS Excell and so on.
114
(TestLink 1.8 or later)
115
116
Writes macro like this: 
117
118
<pre><code class="plain">
119
    {{testfile(format_name, target, ID [, ...])}}
120
</code></pre>
121
122
This macro is same as *testlink* except first argument specified format name.
123
Enable key are changed by a specified format name.
124
125
|_. Format          |_. Format Name |_. Enable Key       |
126
| OpenOffice Writer | odt           | report, planreport |
127
| OpenOffice Calc   | ods           | metrics, result    |
128
| MS Excel          | xls           | metrics, result    |
129
| MS Word           | doc           | report, planreport |
130
131
+Example+:
132
133
<pre><code class="plain">
134
  {{testfile(odt, report, 2,6)}}
135
  {{testfile(odt, planreport, 2, 6, header, summary, toc, body)}} 
136
  {{testfile(ods, metrics, 6)}} 
137
  {{testfile(ods, result, 6)}}
138
  {{testfile(ods, result, 6, n)}}
139
</code></pre>