プロジェクト

全般

プロフィール

PluginUsageEn » 履歴 » バージョン 2

Mitsuyoshi Yoshida, 2011/11/19 22:26

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 2 Mitsuyoshi Yoshida
|_. Status |_. Description |
100 1 Mitsuyoshi Yoshida
| f | Failed Test Cases  |
101
| b | Blocked Test Cases |
102
| n | Not run Test Cases |
103
104
+Example+:
105
106
<pre><code class="plain">
107
  {{testlink(result, 6)}}
108
  {{testlink(result, 6, f)}}
109
</code></pre>
110
111
112
h2. *testfile* Macro
113
114
*testfile* Macro links to output file in MS Word form, MS Excell and so on.
115
(TestLink 1.8 or later)
116
117
Writes macro like this: 
118
119
<pre><code class="plain">
120
    {{testfile(format_name, target, ID [, ...])}}
121
</code></pre>
122
123
This macro is same as *testlink* except first argument specified format name.
124
Enable key are changed by a specified format name.
125
126
|_. Format          |_. Format Name |_. Enable Key       |
127
| OpenOffice Writer | odt           | report, planreport |
128
| OpenOffice Calc   | ods           | metrics, result    |
129
| MS Excel          | xls           | metrics, result    |
130
| MS Word           | doc           | report, planreport |
131
132
+Example+:
133
134
<pre><code class="plain">
135
  {{testfile(odt, report, 2,6)}}
136
  {{testfile(odt, planreport, 2, 6, header, summary, toc, body)}} 
137
  {{testfile(ods, metrics, 6)}} 
138
  {{testfile(ods, result, 6)}}
139
  {{testfile(ods, result, 6, n)}}
140
</code></pre>