author | Claus Gittinger <cg@exept.de> |
Thu, 04 Apr 2013 10:15:45 +0200 | |
changeset 12644 | 96462e75d897 |
parent 12613 | 4227c140e4c4 |
child 12651 | 80720f8a6c70 |
child 13020 | 604d0d880a33 |
permissions | -rw-r--r-- |
9953 | 1 |
" |
10090 | 2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
9953 | 4 |
|
10090 | 5 |
Permission is hereby granted, free of charge, to any person |
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9953 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
AbstractTestRunner subclass:#TestRunner2 |
|
10645 | 31 |
instanceVariableNames:'classCategoryOrPackageTabIndexHolder classCategoryList |
32 |
packageList classList classListOutGeneratorHolder |
|
33 |
classListInGeneratorHolder modeHolder detailsHolder |
|
34 |
failureListHolder failureSelectionHolder errorListHolder |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
35 |
errorSelectionHolder lastPass resultHolder lastBrowser |
11979 | 36 |
selectedResultHolder selectedTestCaseHasCoveredClassesHolder' |
10645 | 37 |
classVariableNames:'History' |
38 |
poolDictionaries:'' |
|
39 |
category:'SUnit-UI' |
|
9953 | 40 |
! |
41 |
||
42 |
ClassList subclass:#ClassList |
|
10645 | 43 |
instanceVariableNames:'' |
44 |
classVariableNames:'' |
|
45 |
poolDictionaries:'' |
|
46 |
privateIn:TestRunner2 |
|
9953 | 47 |
! |
48 |
||
49 |
ApplicationModel subclass:#ResultList |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
50 |
instanceVariableNames:'results resultsHolder selectiomHolder listHolder timestampFormat |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
51 |
selectionHolder' |
10645 | 52 |
classVariableNames:'' |
53 |
poolDictionaries:'' |
|
54 |
privateIn:TestRunner2 |
|
9953 | 55 |
! |
56 |
||
57 |
HierarchicalItem subclass:#ListEntry |
|
10645 | 58 |
instanceVariableNames:'label realLabel test result' |
59 |
classVariableNames:'PassedText FailedText ErrorText' |
|
60 |
poolDictionaries:'' |
|
61 |
privateIn:TestRunner2::ResultList |
|
9953 | 62 |
! |
63 |
||
64 |
!TestRunner2 class methodsFor:'documentation'! |
|
65 |
||
66 |
copyright |
|
67 |
" |
|
10090 | 68 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
69 |
Copyright (c) 2009-2010 eXept Software AG |
|
70 |
||
71 |
Permission is hereby granted, free of charge, to any person |
|
72 |
obtaining a copy of this software and associated documentation |
|
73 |
files (the 'Software'), to deal in the Software without |
|
74 |
restriction, including without limitation the rights to use, |
|
75 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
76 |
copies of the Software, and to permit persons to whom the |
|
77 |
Software is furnished to do so, subject to the following |
|
78 |
conditions: |
|
9953 | 79 |
|
10090 | 80 |
The above copyright notice and this permission notice shall be |
81 |
included in all copies or substantial portions of the Software. |
|
82 |
||
83 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
84 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
85 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
86 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
87 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
88 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
89 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
90 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9953 | 91 |
" |
92 |
! ! |
|
93 |
||
94 |
!TestRunner2 class methodsFor:'initialization'! |
|
95 |
||
96 |
initialize |
|
97 |
self initializeHistory. |
|
98 |
||
11979 | 99 |
Smalltalk addStartBlock: [self installInLauncher] |
9953 | 100 |
|
101 |
"Created: / 09-06-2008 / 11:11:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
102 |
"Modified: / 26-11-2008 / 09:38:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
103 |
"Modified: / 19-03-2010 / 08:46:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
104 |
! |
|
105 |
||
106 |
initializeHistory |
|
107 |
||
108 |
History := List new. |
|
109 |
||
110 |
"Modified: / 26-11-2008 / 09:38:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
111 |
"Created: / 19-03-2010 / 08:46:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
112 |
! |
|
113 |
||
114 |
installInLauncher |
|
10513 | 115 |
|menuItem action| |
9953 | 116 |
|
10511 | 117 |
NewLauncher isNil ifTrue:[^ self]. |
10513 | 118 |
ToolbarIconLibrary isNil ifTrue:[^ self]. |
119 |
||
10575
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
120 |
"/ NewLauncher removeUserTool:#TestRunner2. |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
121 |
|
10513 | 122 |
"Class may be changed, and we want to start the changed class" |
10575
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
123 |
"/ action := (MessageSend receiver:(Smalltalk at:self name) selector:#open). |
11979 | 124 |
action := [ UserPreferences current testRunnerClass "(Smalltalk at:self name)" open ]. |
9953 | 125 |
|
10603 | 126 |
|
10512 | 127 |
"Install in Tools menu" |
9953 | 128 |
menuItem := (MenuItem label:'SUnit Test Runner (enhanced)') |
10518 | 129 |
nameKey:#TestRunner2; |
10513 | 130 |
labelImage:self startSUnitIcon; |
131 |
value:action; |
|
9953 | 132 |
isButton:false. |
133 |
NewLauncher |
|
134 |
addMenuItem:menuItem |
|
135 |
from:self |
|
136 |
in:'menu.tools.programming' |
|
10512 | 137 |
position:#( after startSUnitTestRunner ) |
9953 | 138 |
space:false. |
139 |
||
140 |
"Install in Toolbar" |
|
10575
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
141 |
menuItem := (MenuItem new) |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
142 |
nameKey:#TestRunner2; |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
143 |
label: 'SUnit Test Runner (enhanced)'; |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
144 |
activeHelpKey: #openTestRunner; |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
145 |
icon:self startSUnitIcon; |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
146 |
value:action; |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
147 |
isButton:true. |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
148 |
NewLauncher |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
149 |
addMenuItem:menuItem |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
150 |
from:self |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
151 |
in:'toolbar' |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
152 |
position:#( before garbageCollect ) |
5c4bca57204e
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10565
diff
changeset
|
153 |
space:false. |
9953 | 154 |
|
155 |
"Created: / 09-06-2008 / 11:11:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
156 |
"Modified: / 26-11-2008 / 09:38:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
157 |
"Modified: / 09-01-2010 / 20:48:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10587
7ef3b36e3250
changed: #installInLauncher
Claus Gittinger <cg@exept.de>
parents:
10575
diff
changeset
|
158 |
"Modified: / 18-08-2011 / 11:34:24 / cg" |
9953 | 159 |
! ! |
160 |
||
10645 | 161 |
!TestRunner2 class methodsFor:'help specs'! |
162 |
||
163 |
helpSpec |
|
164 |
"This resource specification was automatically generated |
|
165 |
by the UIHelpTool of ST/X." |
|
166 |
||
167 |
"Do not manually edit this!! If it is corrupted, |
|
168 |
the UIHelpTool may not be able to read the specification." |
|
169 |
||
170 |
" |
|
171 |
UIHelpTool openOnClass:Tools::TestRunner2 |
|
172 |
" |
|
173 |
||
174 |
<resource: #help> |
|
175 |
||
176 |
^ super helpSpec addPairsFrom:#( |
|
177 |
||
178 |
#runCoverage |
|
179 |
'Run tests with coverage measurements enabled. (requires that the testcase class defines #coveredClasses)' |
|
180 |
||
181 |
#runDebugged |
|
11737 | 182 |
'Run tests with debugger enabled' |
10645 | 183 |
|
184 |
) |
|
185 |
||
11737 | 186 |
"Modified: / 09-08-2012 / 09:37:16 / cg" |
10645 | 187 |
! ! |
188 |
||
9953 | 189 |
!TestRunner2 class methodsFor:'image specs'! |
190 |
||
191 |
defaultIcon |
|
192 |
||
12069 | 193 |
^ToolbarIconLibrary sUnit24x24Icon |
9953 | 194 |
|
195 |
"Created: / 19-08-2009 / 14:32:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
196 |
! ! |
|
197 |
||
198 |
!TestRunner2 class methodsFor:'interface specs'! |
|
199 |
||
200 |
buttonPaneSpec |
|
201 |
"This resource specification was automatically generated |
|
202 |
by the UIPainter of ST/X." |
|
203 |
||
204 |
"Do not manually edit this!! If it is corrupted, |
|
205 |
the UIPainter may not be able to read the specification." |
|
206 |
||
207 |
" |
|
208 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#buttonPaneSpec |
|
209 |
Tools::TestRunner2 new openInterface:#buttonPaneSpec |
|
210 |
" |
|
211 |
||
212 |
<resource: #canvas> |
|
213 |
||
214 |
^ |
|
215 |
#(FullSpec |
|
216 |
name: buttonPaneSpec |
|
217 |
window: |
|
218 |
(WindowSpec |
|
219 |
label: 'Button Spec' |
|
220 |
name: 'Button Spec' |
|
221 |
min: (Point 10 10) |
|
222 |
bounds: (Rectangle 0 0 492 44) |
|
223 |
) |
|
224 |
component: |
|
225 |
(SpecCollection |
|
226 |
collection: ( |
|
227 |
(HorizontalPanelViewSpec |
|
228 |
name: 'ButtonPanel' |
|
229 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
230 |
horizontalLayout: fit |
|
231 |
verticalLayout: fit |
|
232 |
horizontalSpace: 0 |
|
233 |
verticalSpace: 0 |
|
234 |
component: |
|
235 |
(SpecCollection |
|
236 |
collection: ( |
|
237 |
(ActionButtonSpec |
|
238 |
label: 'Run Selected' |
|
239 |
name: 'RunSelected' |
|
240 |
translateLabel: true |
|
241 |
tabable: true |
|
242 |
model: runSelectedAction |
|
243 |
enableChannel: hasTestCasesAspect |
|
244 |
disabledLogo: 'Run Selected' |
|
10645 | 245 |
extent: (Point 82 44) |
9953 | 246 |
) |
247 |
(ActionButtonSpec |
|
10143 | 248 |
label: 'Profiled' |
9953 | 249 |
name: 'RunProfiled' |
11979 | 250 |
visibilityChannel: false |
9953 | 251 |
translateLabel: true |
252 |
tabable: true |
|
253 |
model: runProfiledAction |
|
254 |
initiallyDisabled: true |
|
10645 | 255 |
extent: (Point 82 44) |
10143 | 256 |
) |
257 |
(ActionButtonSpec |
|
258 |
label: 'Coverage' |
|
259 |
name: 'RunCoverage' |
|
10645 | 260 |
activeHelpKey: runCoverage |
10143 | 261 |
translateLabel: true |
262 |
tabable: true |
|
263 |
model: runCoverageAction |
|
264 |
initiallyDisabled: true |
|
10645 | 265 |
extent: (Point 82 44) |
266 |
) |
|
267 |
(ActionButtonSpec |
|
268 |
label: 'Debug' |
|
269 |
name: 'Button1' |
|
270 |
activeHelpKey: runDebugged |
|
271 |
translateLabel: true |
|
272 |
tabable: true |
|
273 |
model: runDebuggedAction |
|
274 |
extent: (Point 82 44) |
|
9953 | 275 |
) |
276 |
(ActionButtonSpec |
|
277 |
label: 'Run Failures' |
|
278 |
name: 'RunFailures' |
|
279 |
translateLabel: true |
|
280 |
tabable: true |
|
281 |
model: runFailuresAction |
|
282 |
initiallyDisabled: true |
|
283 |
enableChannel: hasFailuresAspect |
|
284 |
disabledLogo: 'Run Failures' |
|
10645 | 285 |
extent: (Point 82 44) |
9953 | 286 |
) |
287 |
(ActionButtonSpec |
|
288 |
label: 'Run Errors' |
|
289 |
name: 'RunErrors' |
|
290 |
translateLabel: true |
|
291 |
tabable: true |
|
292 |
model: runErrorsAction |
|
293 |
initiallyDisabled: true |
|
294 |
enableChannel: hasErrorsAspect |
|
295 |
disabledLogo: 'Run Errors' |
|
10645 | 296 |
extent: (Point 82 44) |
9953 | 297 |
) |
298 |
) |
|
299 |
||
300 |
) |
|
301 |
) |
|
302 |
) |
|
303 |
||
304 |
) |
|
305 |
) |
|
306 |
! |
|
307 |
||
308 |
classCategoryListSpec |
|
309 |
"This resource specification was automatically generated |
|
310 |
by the UIPainter of ST/X." |
|
311 |
||
312 |
"Do not manually edit this!! If it is corrupted, |
|
313 |
the UIPainter may not be able to read the specification." |
|
314 |
||
315 |
" |
|
316 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#classCategoryListSpec |
|
317 |
Tools::TestRunner2 new openInterface:#classCategoryListSpec |
|
318 |
" |
|
319 |
||
320 |
<resource: #canvas> |
|
321 |
||
322 |
^ |
|
323 |
#(FullSpec |
|
324 |
name: classCategoryListSpec |
|
325 |
window: |
|
326 |
(WindowSpec |
|
327 |
label: 'Class Category List' |
|
328 |
name: 'Class Category List' |
|
329 |
min: (Point 10 10) |
|
330 |
bounds: (Rectangle 0 0 300 300) |
|
331 |
) |
|
332 |
component: |
|
333 |
(SpecCollection |
|
334 |
collection: ( |
|
335 |
(SubCanvasSpec |
|
336 |
name: 'ClassCategoryList' |
|
337 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
338 |
hasHorizontalScrollBar: false |
|
339 |
hasVerticalScrollBar: false |
|
340 |
clientKey: classCategoryList |
|
341 |
) |
|
342 |
) |
|
343 |
||
344 |
) |
|
345 |
) |
|
346 |
||
347 |
"Modified: / 04-06-2008 / 23:57:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
348 |
! |
|
349 |
||
350 |
classListSpec |
|
351 |
"This resource specification was automatically generated |
|
352 |
by the UIPainter of ST/X." |
|
353 |
||
354 |
"Do not manually edit this!! If it is corrupted, |
|
355 |
the UIPainter may not be able to read the specification." |
|
356 |
||
357 |
" |
|
358 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#classCategoryListSpec |
|
359 |
Tools::TestRunner2 new openInterface:#classCategoryListSpec |
|
360 |
" |
|
361 |
||
362 |
<resource: #canvas> |
|
363 |
||
364 |
^ |
|
365 |
#(FullSpec |
|
366 |
name: classCategoryListSpec |
|
367 |
window: |
|
368 |
(WindowSpec |
|
369 |
label: 'Class Category List' |
|
370 |
name: 'Class Category List' |
|
371 |
min: (Point 10 10) |
|
372 |
bounds: (Rectangle 0 0 300 300) |
|
373 |
) |
|
374 |
component: |
|
375 |
(SpecCollection |
|
376 |
collection: ( |
|
377 |
(SubCanvasSpec |
|
378 |
name: 'ClassList' |
|
379 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
380 |
hasHorizontalScrollBar: false |
|
381 |
hasVerticalScrollBar: false |
|
382 |
clientKey: classList |
|
383 |
) |
|
384 |
) |
|
385 |
||
386 |
) |
|
387 |
) |
|
388 |
||
389 |
"Created: / 05-06-2008 / 19:30:38 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
390 |
! |
|
391 |
||
392 |
packageListSpec |
|
393 |
"This resource specification was automatically generated |
|
394 |
by the UIPainter of ST/X." |
|
395 |
||
396 |
"Do not manually edit this!! If it is corrupted, |
|
397 |
the UIPainter may not be able to read the specification." |
|
398 |
||
399 |
" |
|
400 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#packageListSpec |
|
401 |
Tools::TestRunner2 new openInterface:#packageListSpec |
|
402 |
" |
|
403 |
||
404 |
<resource: #canvas> |
|
405 |
||
406 |
^ |
|
407 |
#(FullSpec |
|
408 |
name: packageListSpec |
|
409 |
window: |
|
410 |
(WindowSpec |
|
411 |
label: 'Package List' |
|
412 |
name: 'Package List' |
|
413 |
min: (Point 10 10) |
|
414 |
bounds: (Rectangle 0 0 300 300) |
|
415 |
) |
|
416 |
component: |
|
417 |
(SpecCollection |
|
418 |
collection: ( |
|
419 |
(SubCanvasSpec |
|
420 |
name: 'PackageList' |
|
421 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
422 |
hasHorizontalScrollBar: false |
|
423 |
hasVerticalScrollBar: false |
|
424 |
clientKey: packageList |
|
425 |
) |
|
426 |
) |
|
427 |
||
428 |
) |
|
429 |
) |
|
430 |
||
431 |
"Modified: / 05-06-2008 / 00:14:06 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
432 |
! |
|
433 |
||
434 |
resultPaneSpec |
|
435 |
"This resource specification was automatically generated |
|
436 |
by the UIPainter of ST/X." |
|
437 |
||
438 |
"Do not manually edit this!! If it is corrupted, |
|
439 |
the UIPainter may not be able to read the specification." |
|
440 |
||
441 |
" |
|
442 |
UIPainter new openOnClass:TestRunner2 andSelector:#resultPaneSpec |
|
443 |
TestRunner2 new openInterface:#resultPaneSpec |
|
444 |
" |
|
445 |
||
446 |
<resource: #canvas> |
|
447 |
||
448 |
^ |
|
449 |
#(FullSpec |
|
450 |
name: resultPaneSpec |
|
451 |
window: |
|
452 |
(WindowSpec |
|
453 |
label: 'Result spec' |
|
454 |
name: 'Result spec' |
|
455 |
min: (Point 10 10) |
|
456 |
bounds: (Rectangle 0 0 300 300) |
|
457 |
) |
|
458 |
component: |
|
459 |
(SpecCollection |
|
460 |
collection: ( |
|
461 |
(LabelSpec |
|
462 |
label: 'N/A' |
|
463 |
name: 'Mode' |
|
464 |
layout: (LayoutFrame 0 0 0 0 0 1 0 0.6) |
|
465 |
style: (FontDescription Arial bold roman 14) |
|
466 |
labelChannel: modeHolder |
|
467 |
) |
|
468 |
(LabelSpec |
|
469 |
label: '...' |
|
470 |
name: 'Details' |
|
471 |
layout: (LayoutFrame 0 0 0 0.6 0 1 0 1) |
|
472 |
labelChannel: detailsHolder |
|
473 |
) |
|
474 |
) |
|
475 |
||
476 |
) |
|
477 |
) |
|
478 |
||
479 |
"Modified: / 18-01-2008 / 18:44:00 / janfrog" |
|
480 |
! |
|
481 |
||
482 |
testHistoryTabSpec |
|
483 |
"This resource specification was automatically generated |
|
484 |
by the UIPainter of ST/X." |
|
485 |
||
486 |
"Do not manually edit this!! If it is corrupted, |
|
487 |
the UIPainter may not be able to read the specification." |
|
488 |
||
489 |
" |
|
490 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#testHistoryTabSpec |
|
491 |
Tools::TestRunner2 new openInterface:#testHistoryTabSpec |
|
492 |
" |
|
493 |
||
494 |
<resource: #canvas> |
|
495 |
||
496 |
^ |
|
497 |
#(FullSpec |
|
498 |
name: testHistoryTabSpec |
|
499 |
window: |
|
500 |
(WindowSpec |
|
501 |
label: 'Test History' |
|
502 |
name: 'Test History' |
|
503 |
min: (Point 10 10) |
|
504 |
bounds: (Rectangle 0 0 300 300) |
|
505 |
) |
|
506 |
component: |
|
507 |
(SpecCollection |
|
508 |
collection: ( |
|
509 |
(SubCanvasSpec |
|
510 |
name: 'ResultList' |
|
511 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
512 |
hasHorizontalScrollBar: false |
|
513 |
hasVerticalScrollBar: false |
|
514 |
majorKey: #'Tools::TestRunner2::ResultList' |
|
515 |
subAspectHolders: |
|
516 |
(Array |
|
517 |
||
518 |
(SubChannelInfoSpec |
|
519 |
subAspect: resultsHolder |
|
520 |
aspect: historyHolder |
|
521 |
) |
|
522 |
) |
|
523 |
createNewApplication: true |
|
524 |
createNewBuilder: true |
|
525 |
) |
|
526 |
) |
|
527 |
||
528 |
) |
|
529 |
) |
|
530 |
! |
|
531 |
||
532 |
testResultTabSpec |
|
533 |
"This resource specification was automatically generated |
|
534 |
by the UIPainter of ST/X." |
|
535 |
||
536 |
"Do not manually edit this!! If it is corrupted, |
|
537 |
the UIPainter may not be able to read the specification." |
|
538 |
||
539 |
" |
|
540 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#testResultTabSpec |
|
541 |
Tools::TestRunner2 new openInterface:#testResultTabSpec |
|
542 |
" |
|
543 |
||
544 |
<resource: #canvas> |
|
545 |
||
546 |
^ |
|
547 |
#(FullSpec |
|
548 |
name: testResultTabSpec |
|
549 |
window: |
|
550 |
(WindowSpec |
|
551 |
label: 'Test Result' |
|
552 |
name: 'Test Result' |
|
553 |
min: (Point 10 10) |
|
554 |
bounds: (Rectangle 0 0 300 300) |
|
555 |
) |
|
556 |
component: |
|
557 |
(SpecCollection |
|
558 |
collection: ( |
|
559 |
(SubCanvasSpec |
|
560 |
name: 'ResultList' |
|
561 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
562 |
hasHorizontalScrollBar: false |
|
563 |
hasVerticalScrollBar: false |
|
564 |
majorKey: #'Tools::TestRunner2::ResultList' |
|
565 |
subAspectHolders: |
|
566 |
(Array |
|
567 |
||
568 |
(SubChannelInfoSpec |
|
569 |
subAspect: resultsHolder |
|
570 |
aspect: resultHolder |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
571 |
) |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
572 |
(SubChannelInfoSpec |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
573 |
subAspect: selectionHolder |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
574 |
aspect: selectedResultHolder |
9953 | 575 |
) |
576 |
) |
|
577 |
createNewApplication: true |
|
578 |
createNewBuilder: true |
|
579 |
) |
|
580 |
) |
|
581 |
||
582 |
) |
|
583 |
) |
|
584 |
! |
|
585 |
||
586 |
windowSpec |
|
587 |
"This resource specification was automatically generated |
|
588 |
by the UIPainter of ST/X." |
|
589 |
||
590 |
"Do not manually edit this!! If it is corrupted, |
|
591 |
the UIPainter may not be able to read the specification." |
|
592 |
||
593 |
" |
|
594 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#windowSpec |
|
595 |
Tools::TestRunner2 new openInterface:#windowSpec |
|
596 |
Tools::TestRunner2 open |
|
597 |
" |
|
598 |
||
599 |
<resource: #canvas> |
|
600 |
||
601 |
^ |
|
602 |
#(FullSpec |
|
603 |
name: windowSpec |
|
604 |
window: |
|
605 |
(WindowSpec |
|
606 |
label: 'Test Runner Too' |
|
607 |
name: 'Test Runner Too' |
|
608 |
min: (Point 0 0) |
|
609 |
bounds: (Rectangle 0 0 717 412) |
|
610 |
menu: mainMenu |
|
611 |
icon: defaultIcon |
|
612 |
) |
|
613 |
component: |
|
614 |
(SpecCollection |
|
615 |
collection: ( |
|
616 |
(UISubSpecification |
|
617 |
name: 'ResultPane' |
|
618 |
layout: (LayoutFrame 0 0 0 0 0 1 100 0) |
|
619 |
minorKey: resultPaneSpec |
|
620 |
) |
|
621 |
(VariableHorizontalPanelSpec |
|
622 |
name: 'ListPane' |
|
623 |
layout: (LayoutFrame 0 0 100 0 0 1 -30 1) |
|
624 |
showHandle: true |
|
625 |
snapMode: both |
|
626 |
handlePosition: right |
|
627 |
component: |
|
628 |
(SpecCollection |
|
629 |
collection: ( |
|
630 |
(NoteBookViewSpec |
|
631 |
name: 'ClassOrPackageTab' |
|
632 |
model: classCategoryOrPackageTabIndexHolder |
|
633 |
menu: classCategoryOrPackageTabList |
|
634 |
useIndex: true |
|
635 |
fitLastRow: false |
|
636 |
) |
|
637 |
(TransparentBoxSpec |
|
638 |
name: 'ClassListBox' |
|
639 |
component: |
|
640 |
(SpecCollection |
|
641 |
collection: ( |
|
642 |
(SubCanvasSpec |
|
643 |
name: 'ClassList' |
|
644 |
layout: (LayoutFrame 0 0 25 0 0 1 0 1) |
|
645 |
hasHorizontalScrollBar: false |
|
646 |
hasVerticalScrollBar: false |
|
647 |
clientKey: classList |
|
648 |
createNewBuilder: false |
|
649 |
) |
|
650 |
) |
|
651 |
||
652 |
) |
|
653 |
) |
|
654 |
(NoteBookViewSpec |
|
655 |
name: 'NoteBook2' |
|
656 |
menu: resultAndHistoryTabList |
|
657 |
) |
|
658 |
) |
|
659 |
||
660 |
) |
|
661 |
handles: (Any 0.33333333333333 0.66666666666667 1.0) |
|
662 |
) |
|
663 |
(UISubSpecification |
|
664 |
name: 'ButtonPane' |
|
665 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
666 |
minorKey: buttonPaneSpec |
|
667 |
) |
|
668 |
) |
|
669 |
||
670 |
) |
|
671 |
) |
|
672 |
! |
|
673 |
||
674 |
windowSpec_old |
|
675 |
"This resource specification was automatically generated |
|
676 |
by the UIPainter of ST/X." |
|
677 |
||
678 |
"Do not manually edit this!! If it is corrupted, |
|
679 |
the UIPainter may not be able to read the specification." |
|
680 |
||
681 |
" |
|
682 |
UIPainter new openOnClass:Tools::TestRunner2 andSelector:#windowSpec |
|
683 |
Tools::TestRunner2 new openInterface:#windowSpec |
|
684 |
Tools::TestRunner2 open |
|
685 |
" |
|
686 |
||
687 |
<resource: #canvas> |
|
688 |
||
689 |
^ |
|
690 |
#(FullSpec |
|
691 |
name: windowSpec |
|
692 |
window: |
|
693 |
(WindowSpec |
|
694 |
label: 'Test Runner Too' |
|
695 |
name: 'Test Runner Too' |
|
696 |
min: (Point 0 0) |
|
697 |
bounds: (Rectangle 0 0 717 412) |
|
698 |
icon: defaultIcon |
|
699 |
) |
|
700 |
component: |
|
701 |
(SpecCollection |
|
702 |
collection: ( |
|
703 |
(UISubSpecification |
|
704 |
name: 'ResultPane' |
|
705 |
layout: (LayoutFrame 0 0 0 0 0 1 100 0) |
|
706 |
minorKey: resultPaneSpec |
|
707 |
) |
|
708 |
(VariableHorizontalPanelSpec |
|
709 |
name: 'ListPane' |
|
710 |
layout: (LayoutFrame 0 0 100 0 0 1 -30 1) |
|
711 |
showHandle: true |
|
712 |
snapMode: both |
|
713 |
component: |
|
714 |
(SpecCollection |
|
715 |
collection: ( |
|
716 |
(NoteBookViewSpec |
|
717 |
name: 'ClassOrPackageTab' |
|
718 |
model: classCategoryOrPackageTabIndexHolder |
|
719 |
menu: classCategoryOrPackageTabList |
|
720 |
direction: left |
|
721 |
useIndex: true |
|
722 |
fitLastRow: false |
|
723 |
) |
|
724 |
(SubCanvasSpec |
|
725 |
name: 'ClassList' |
|
726 |
hasHorizontalScrollBar: false |
|
727 |
hasVerticalScrollBar: false |
|
728 |
clientKey: classList |
|
729 |
createNewBuilder: false |
|
730 |
) |
|
731 |
(VariableVerticalPanelSpec |
|
732 |
name: 'VariableVerticalPanel1' |
|
733 |
component: |
|
734 |
(SpecCollection |
|
735 |
collection: ( |
|
736 |
(SequenceViewSpec |
|
737 |
name: 'FailuresList' |
|
738 |
model: failureSelectionHolder |
|
739 |
hasHorizontalScrollBar: true |
|
740 |
hasVerticalScrollBar: true |
|
741 |
doubleClickSelector: debugFailure: |
|
742 |
useIndex: false |
|
743 |
sequenceList: failureListHolder |
|
744 |
) |
|
745 |
(SequenceViewSpec |
|
746 |
name: 'ErrorsList' |
|
747 |
model: errorSelectionHolder |
|
748 |
hasHorizontalScrollBar: true |
|
749 |
hasVerticalScrollBar: true |
|
750 |
doubleClickSelector: debugError: |
|
751 |
useIndex: false |
|
752 |
sequenceList: errorListHolder |
|
753 |
) |
|
754 |
) |
|
755 |
||
756 |
) |
|
757 |
handles: (Any 0.5 1.0) |
|
758 |
) |
|
759 |
) |
|
760 |
||
761 |
) |
|
762 |
handles: (Any 0.33333333333333 0.66666666666667 1.0) |
|
763 |
) |
|
764 |
(UISubSpecification |
|
765 |
name: 'ButtonPane' |
|
766 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
767 |
minorKey: buttonPaneSpec |
|
768 |
) |
|
769 |
) |
|
770 |
||
771 |
) |
|
772 |
) |
|
773 |
||
774 |
"Created: / 07-02-2010 / 14:48:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
775 |
! ! |
|
776 |
||
777 |
!TestRunner2 class methodsFor:'list specs'! |
|
778 |
||
779 |
classCategoryOrPackageTabList |
|
780 |
"This resource specification was automatically generated |
|
781 |
by the TabListEditor of ST/X." |
|
782 |
||
783 |
"Do not manually edit this!! If it is corrupted, |
|
784 |
the TabListEditor may not be able to read the specification." |
|
785 |
||
786 |
" |
|
787 |
TabListEditor new openOnClass: self andSelector:#classCategoryOrPackageTabList |
|
788 |
" |
|
789 |
||
790 |
<resource: #tabList> |
|
791 |
||
792 |
^ #( |
|
793 |
(TabItem |
|
794 |
label: 'Categories' |
|
795 |
minorKey: classCategoryListSpec |
|
796 |
createNewBuilder: false |
|
797 |
) |
|
798 |
(TabItem |
|
799 |
label: 'Packages' |
|
800 |
minorKey: packageListSpec |
|
801 |
createNewBuilder: false |
|
802 |
) |
|
803 |
) |
|
804 |
||
805 |
collect:[:aTab| TabItem new fromLiteralArrayEncoding:aTab ] |
|
806 |
||
807 |
"Modified: / 05-06-2008 / 00:15:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
808 |
! |
|
809 |
||
810 |
resultAndHistoryTabList |
|
811 |
"This resource specification was automatically generated |
|
812 |
by the TabListEditor of ST/X." |
|
813 |
||
814 |
"Do not manually edit this!! If it is corrupted, |
|
815 |
the TabListEditor may not be able to read the specification." |
|
816 |
||
817 |
" |
|
818 |
TabListEditor new openOnClass: self andSelector:#resultAndHistoryTabList |
|
819 |
" |
|
820 |
||
821 |
<resource: #tabList> |
|
822 |
||
823 |
^ #( |
|
824 |
(TabItem |
|
825 |
label: 'Result' |
|
826 |
minorKey: testResultTabSpec |
|
827 |
createNewBuilder: false |
|
828 |
) |
|
829 |
(TabItem |
|
830 |
label: 'History' |
|
831 |
minorKey: testHistoryTabSpec |
|
832 |
createNewBuilder: false |
|
833 |
) |
|
834 |
) |
|
835 |
||
836 |
collect:[:aTab| TabItem new fromLiteralArrayEncoding:aTab ] |
|
837 |
! ! |
|
838 |
||
839 |
!TestRunner2 class methodsFor:'menu specs'! |
|
840 |
||
9958 | 841 |
classListMenu |
842 |
"This resource specification was automatically generated |
|
843 |
by the MenuEditor of ST/X." |
|
844 |
||
845 |
"Do not manually edit this!! If it is corrupted, |
|
846 |
the MenuEditor may not be able to read the specification." |
|
847 |
||
11979 | 848 |
|
9958 | 849 |
" |
850 |
MenuEditor new openOnClass:Tools::TestRunner2 andSelector:#classListMenu |
|
851 |
(Menu new fromLiteralArrayEncoding:(Tools::TestRunner2 classListMenu)) startUp |
|
852 |
" |
|
853 |
||
854 |
<resource: #menu> |
|
855 |
||
856 |
^ |
|
857 |
#(Menu |
|
858 |
( |
|
859 |
(MenuItem |
|
860 |
label: 'Browse' |
|
861 |
itemValue: classListMenuBrowse |
|
11979 | 862 |
) |
863 |
(MenuItem |
|
864 |
enabled: selectedTestCaseHasCoveredClassesHolder |
|
865 |
label: 'Browse Covered Classes' |
|
866 |
itemValue: classListMenuBrowseCoveredClasses |
|
9958 | 867 |
) |
868 |
) |
|
869 |
nil |
|
870 |
nil |
|
871 |
) |
|
872 |
! |
|
873 |
||
9953 | 874 |
mainMenu |
875 |
"This resource specification was automatically generated |
|
876 |
by the MenuEditor of ST/X." |
|
877 |
||
878 |
"Do not manually edit this!! If it is corrupted, |
|
879 |
the MenuEditor may not be able to read the specification." |
|
880 |
||
881 |
" |
|
882 |
MenuEditor new openOnClass:Tools::TestRunner2 andSelector:#mainMenu |
|
883 |
(Menu new fromLiteralArrayEncoding:(Tools::TestRunner2 mainMenu)) startUp |
|
884 |
" |
|
885 |
||
886 |
<resource: #menu> |
|
887 |
||
888 |
^ |
|
889 |
#(Menu |
|
890 |
( |
|
891 |
(MenuItem |
|
892 |
label: 'File' |
|
893 |
translateLabel: true |
|
894 |
submenu: |
|
895 |
(Menu |
|
896 |
( |
|
897 |
(MenuItem |
|
898 |
label: 'Exit' |
|
899 |
itemValue: closeRequest |
|
900 |
translateLabel: true |
|
901 |
) |
|
902 |
) |
|
903 |
nil |
|
904 |
nil |
|
905 |
) |
|
906 |
) |
|
907 |
(MenuItem |
|
908 |
label: 'Help' |
|
909 |
translateLabel: true |
|
910 |
startGroup: conditionalRight |
|
911 |
submenu: |
|
912 |
(Menu |
|
913 |
( |
|
914 |
(MenuItem |
|
915 |
label: 'Documentation' |
|
916 |
itemValue: openDocumentation |
|
917 |
translateLabel: true |
|
918 |
) |
|
919 |
(MenuItem |
|
920 |
label: '-' |
|
921 |
) |
|
922 |
(MenuItem |
|
923 |
label: 'About this Application...' |
|
924 |
itemValue: openAboutThisApplication |
|
925 |
translateLabel: true |
|
926 |
) |
|
927 |
) |
|
928 |
nil |
|
929 |
nil |
|
930 |
) |
|
931 |
) |
|
932 |
) |
|
933 |
nil |
|
934 |
nil |
|
935 |
) |
|
936 |
! |
|
937 |
||
938 |
packageListMenu |
|
939 |
"This resource specification was automatically generated |
|
940 |
by the MenuEditor of ST/X." |
|
941 |
||
942 |
"Do not manually edit this!! If it is corrupted, |
|
943 |
the MenuEditor may not be able to read the specification." |
|
944 |
||
945 |
" |
|
946 |
MenuEditor new openOnClass:Tools::TestRunner2 andSelector:#packageListMenu |
|
947 |
(Menu new fromLiteralArrayEncoding:(Tools::TestRunner2 packageListMenu)) startUp |
|
948 |
" |
|
949 |
||
950 |
<resource: #menu> |
|
951 |
||
952 |
^ |
|
953 |
#(Menu |
|
954 |
( |
|
955 |
(MenuItem |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
956 |
label: 'Select Prerequisites' |
9953 | 957 |
itemValue: packageListMenuSelectPrerequisites |
958 |
translateLabel: true |
|
959 |
) |
|
960 |
(MenuItem |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
961 |
label: 'Select Prerequisites (recursive)' |
9953 | 962 |
itemValue: packageListMenuSelectPrerequisitesAll |
963 |
translateLabel: true |
|
964 |
) |
|
965 |
(MenuItem |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
966 |
label: 'Select Dependents' |
9953 | 967 |
itemValue: packageListMenuSelectDependents |
968 |
translateLabel: true |
|
969 |
) |
|
970 |
(MenuItem |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
971 |
label: 'Select Dependents (recursively)' |
9953 | 972 |
itemValue: packageListMenuSelectDependentsAll |
973 |
translateLabel: true |
|
974 |
) |
|
975 |
) |
|
976 |
nil |
|
977 |
nil |
|
978 |
) |
|
979 |
||
980 |
"Modified: / 06-06-2008 / 20:04:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
981 |
"Modified: / 23-09-2011 / 18:51:37 / cg" |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
982 |
! |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
983 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
984 |
resultListMenu |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
985 |
"This resource specification was automatically generated |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
986 |
by the MenuEditor of ST/X." |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
987 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
988 |
"Do not manually edit this!! If it is corrupted, |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
989 |
the MenuEditor may not be able to read the specification." |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
990 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
991 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
992 |
" |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
993 |
MenuEditor new openOnClass:Tools::TestRunner2 andSelector:#resultListMenu |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
994 |
(Menu new fromLiteralArrayEncoding:(Tools::TestRunner2 resultListMenu)) startUp |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
995 |
" |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
996 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
997 |
<resource: #menu> |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
998 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
999 |
^ |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1000 |
#(Menu |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1001 |
( |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1002 |
(MenuItem |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1003 |
label: 'Browse' |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1004 |
itemValue: resultListMenuBrowse |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1005 |
translateLabel: true |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1006 |
) |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1007 |
) |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1008 |
nil |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1009 |
nil |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1010 |
) |
9953 | 1011 |
! ! |
1012 |
||
10513 | 1013 |
!TestRunner2 class methodsFor:'resources'! |
1014 |
||
1015 |
startSUnitIcon |
|
1016 |
<resource: #programImage> |
|
1017 |
||
1018 |
^ ToolbarIconLibrary sUnit24x24Icon |
|
1019 |
"/ ^ ToolbarIconLibrary sUnit28x28Icon |
|
1020 |
! ! |
|
1021 |
||
10197 | 1022 |
!TestRunner2 class methodsFor:'startup'! |
1023 |
||
1024 |
openOnTestCase:aTestCaseClass |
|
1025 |
|runner| |
|
1026 |
||
1027 |
runner := self new. |
|
1028 |
runner allButOpen. |
|
10225
98fa6a2c2147
comment/format in: #runCoverageAction
Claus Gittinger <cg@exept.de>
parents:
10197
diff
changeset
|
1029 |
runner packageList selectedProjects value:(Array with:aTestCaseClass package). |
10197 | 1030 |
runner classList selectClass:aTestCaseClass. |
1031 |
runner openWindow. |
|
1032 |
||
1033 |
"Created: / 06-07-2011 / 14:10:00 / cg" |
|
1034 |
! ! |
|
1035 |
||
9953 | 1036 |
!TestRunner2 methodsFor:'accessing'! |
1037 |
||
1038 |
errorColor |
|
1039 |
^ self class |
|
1040 |
errorColor |
|
1041 |
||
1042 |
"Modified: / 08-02-2010 / 13:57:26 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
1043 |
! |
|
1044 |
||
1045 |
errorTestSuite |
|
1046 |
||
1047 |
| testSuite | |
|
1048 |
testSuite := TestSuite new. |
|
1049 |
errorListHolder value do: |
|
1050 |
[:test| |
|
1051 |
testSuite addTest: test]. |
|
1052 |
^testSuite |
|
1053 |
||
1054 |
"Created: / 06-06-2008 / 09:08:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1055 |
! |
|
1056 |
||
1057 |
failedColor |
|
1058 |
^ self class failedColor |
|
1059 |
! |
|
1060 |
||
1061 |
failureTestSuite |
|
1062 |
| testSuite | |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1063 |
|
9953 | 1064 |
testSuite := TestSuite new. |
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1065 |
failureListHolder value do:[:test| |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1066 |
testSuite addTest: test |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1067 |
]. |
9953 | 1068 |
^testSuite |
1069 |
||
1070 |
"Created: / 06-06-2008 / 09:03:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1071 |
"Modified (format): / 23-09-2011 / 18:56:52 / cg" |
9953 | 1072 |
! |
1073 |
||
1074 |
passedColor |
|
1075 |
^ self class passedColor |
|
1076 |
! |
|
1077 |
||
1078 |
selectedPackages: packages |
|
1079 |
||
1080 |
self packageList selectedProjects value: packages. |
|
1081 |
"/self packageList updateTreeSelection. |
|
1082 |
||
1083 |
"Created: / 06-06-2008 / 20:02:46 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1084 |
! |
|
1085 |
||
1086 |
selectedTestCases |
|
1087 |
||
1088 |
| testCases | |
|
1089 |
testCases := self classList selectionHolder value. |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
1090 |
testCases isEmptyOrNil ifTrue: |
9953 | 1091 |
[testCases := self classList listOfClasses]. |
10143 | 1092 |
testCases := testCases collect:[:cls|cls theNonMetaclass]. |
1093 |
^testCases reject:[:cls | cls isAbstract] |
|
9953 | 1094 |
|
1095 |
"Created: / 05-06-2008 / 22:02:24 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1096 |
"Modified: / 27-11-2008 / 17:16:52 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
1097 |
"Modified: / 04-08-2011 / 19:05:53 / cg" |
9953 | 1098 |
! |
1099 |
||
1100 |
selectedTestSuite |
|
1101 |
|testCases testSuite| |
|
1102 |
||
1103 |
testCases := self selectedTestCases. |
|
1104 |
testSuite := TestSuite named:(self suiteNameFromClasses:testCases). |
|
1105 |
testCases |
|
1106 |
do:[:testCaseCls | testSuite addTests:((self buildSuiteFromClass:testCaseCls) tests) ]. |
|
1107 |
^ testSuite |
|
1108 |
||
1109 |
"Created: / 05-06-2008 / 22:13:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1110 |
"Modified: / 06-06-2008 / 19:28:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1111 |
"Modified: / 19-03-2010 / 08:06:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1112 |
! |
|
1113 |
||
1114 |
theSingleSelectedProject |
|
1115 |
||
1116 |
| selection | |
|
1117 |
selection := self packageList selectionHolder value. |
|
1118 |
^selection size = 1 |
|
1119 |
ifTrue:[selection anyOne] |
|
1120 |
ifFalse:[nil] |
|
1121 |
||
1122 |
"Created: / 06-06-2008 / 20:08:07 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1123 |
! |
|
1124 |
||
1125 |
theSingleSelectedProjectDefinition |
|
1126 |
||
1127 |
|package| |
|
1128 |
||
1129 |
package := self theSingleSelectedProject. |
|
1130 |
package ifNil:[^nil]. |
|
1131 |
^Smalltalk at:(ProjectDefinition initialClassNameForDefinitionOf:package) asSymbol |
|
1132 |
||
1133 |
"Created: / 06-06-2008 / 20:08:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1134 |
! ! |
|
1135 |
||
1136 |
!TestRunner2 methodsFor:'accessing - lists'! |
|
1137 |
||
1138 |
allTestCategories |
|
1139 |
||
1140 |
| categories | |
|
1141 |
categories := Set new. |
|
1142 |
Smalltalk allClassesDo: |
|
1143 |
[:cls| |
|
1144 |
(self isTestCaseLike: cls) ifTrue: |
|
1145 |
[categories add: cls category]]. |
|
1146 |
^categories |
|
1147 |
||
1148 |
"Modified: / 28-02-2011 / 21:25:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1149 |
! |
|
1150 |
||
1151 |
allTestPackages |
|
1152 |
| packages | |
|
12644 | 1153 |
|
9953 | 1154 |
packages := Set new. |
12644 | 1155 |
Smalltalk allClassesDo: [:cls| |
1156 |
(self isTestCaseLike: cls) ifTrue:[ |
|
1157 |
packages add: cls package |
|
1158 |
] |
|
1159 |
]. |
|
9953 | 1160 |
^packages |
1161 |
||
1162 |
"Modified: / 28-02-2011 / 21:25:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1163 |
! |
|
1164 |
||
1165 |
classCategoryList |
|
1166 |
classCategoryList ifNil: |
|
1167 |
[ classCategoryList := Tools::ClassCategoryList new. |
|
1168 |
classCategoryList inGeneratorHolder:self allTestCategories asSet asValue. |
|
1169 |
classCategoryList outGeneratorHolder:self classListOutGeneratorHolder. |
|
1170 |
classCategoryList doubleClickChannel: |
|
1171 |
[:category | |
|
1172 |
self classList selectionHolder value:#(). |
|
1173 |
self runSelectedAction ] ]. |
|
1174 |
^ classCategoryList |
|
1175 |
||
1176 |
"Created: / 04-06-2008 / 23:56:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1177 |
"Modified: / 06-06-2008 / 09:51:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1178 |
"Modified: / 01-02-2010 / 09:48:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1179 |
! |
|
1180 |
||
1181 |
classList |
|
9958 | 1182 |
classList isNil ifTrue:[ |
1183 |
classList := Tools::TestRunner2::ClassList new. |
|
1184 |
classList immediateUpdate:true. |
|
1185 |
classList inGeneratorHolder:self classListInGeneratorHolder. |
|
1186 |
classList doubleClickChannel:[:testCase | self runSelectedAction]. |
|
1187 |
classList menuHolder:[ self class classListMenu ]. |
|
10143 | 1188 |
classList selectionHolder onChangeSend:#classSelectionChanged to:self. |
9958 | 1189 |
]. |
1190 |
^ classList |
|
9953 | 1191 |
|
1192 |
"Created: / 05-06-2008 / 19:28:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1193 |
"Modified: / 27-11-2008 / 17:22:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1194 |
"Modified: / 09-01-2010 / 20:30:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10143 | 1195 |
"Modified: / 04-07-2011 / 22:58:46 / cg" |
9953 | 1196 |
! |
1197 |
||
1198 |
packageList |
|
1199 |
packageList ifNil: |
|
1200 |
[ packageList := Tools::ProjectList new. |
|
1201 |
packageList |
|
1202 |
inGeneratorHolder:(Iterator |
|
1203 |
on:[:whatToDo | self allTestPackages do:[:p | whatToDo value:p ]]) |
|
1204 |
asValue. |
|
1205 |
packageList outGeneratorHolder:self classListOutGeneratorHolder. |
|
1206 |
packageList doubleClickChannel: |
|
1207 |
[:category | |
|
1208 |
self classList selectionHolder value:#(). |
|
1209 |
self runSelectedAction ]. |
|
1210 |
packageList menuHolder:[ self menuFor:#packageListMenu ] ]. |
|
1211 |
^ packageList |
|
1212 |
||
1213 |
"Created: / 05-06-2008 / 00:12:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1214 |
"Modified: / 19-08-2009 / 08:46:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1215 |
"Modified: / 28-02-2011 / 21:13:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1216 |
! ! |
|
1217 |
||
1218 |
!TestRunner2 methodsFor:'accessing - menus'! |
|
1219 |
||
1220 |
packageListMenu |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1221 |
^ self class packageListMenu |
9953 | 1222 |
|
1223 |
"Created: / 06-06-2008 / 19:16:28 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1224 |
"Modified: / 23-09-2011 / 18:55:05 / cg" |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1225 |
! |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1226 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1227 |
resultListMenu |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1228 |
^ self class resultListMenu |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1229 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1230 |
"Created: / 06-06-2008 / 19:16:28 / Jan Vrany <vranyj1@fel.cvut.cz>" |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1231 |
"Created: / 23-09-2011 / 18:53:46 / cg" |
9953 | 1232 |
! ! |
1233 |
||
1234 |
!TestRunner2 methodsFor:'actions'! |
|
1235 |
||
11979 | 1236 |
classSelectionChanged |
1237 |
|selectedTestCaseHasCoveredClasses| |
|
1238 |
||
1239 |
selectedTestCaseHasCoveredClasses := |
|
1240 |
self selectedTestCases |
|
1241 |
conform:[:eachClass | eachClass asTestCase coveredClasses notEmpty]. |
|
1242 |
||
1243 |
(builder componentAt:#RunCoverage) enabled:selectedTestCaseHasCoveredClasses. |
|
1244 |
self selectedTestCaseHasCoveredClassesHolder value:selectedTestCaseHasCoveredClasses. |
|
1245 |
||
1246 |
"Created: / 04-07-2011 / 22:59:42 / cg" |
|
1247 |
"Modified: / 05-08-2011 / 19:44:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1248 |
! |
|
1249 |
||
9953 | 1250 |
debugError: test |
1251 |
||
1252 |
| caughtEx | |
|
1253 |
caughtEx := nil. |
|
1254 |
[ |
|
1255 |
test debug |
|
1256 |
] on: GenericException do:[:ex| |
|
1257 |
caughtEx := ex. |
|
1258 |
ex pass |
|
1259 |
]. |
|
1260 |
caughtEx ifNil: |
|
1261 |
[errorListHolder value remove: test. |
|
1262 |
errorListHolder changed]. |
|
1263 |
((caughtEx isKindOf: TestResult resumableFailure) |
|
1264 |
or:[caughtEx isKindOf: TestResult failure]) ifTrue: |
|
1265 |
[errorListHolder value remove: test. |
|
1266 |
errorListHolder changed. |
|
1267 |
failureListHolder value add: test. |
|
1268 |
failureListHolder changed]. |
|
1269 |
||
1270 |
"Created: / 06-06-2008 / 09:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1271 |
! |
|
1272 |
||
1273 |
debugFailure: test |
|
1274 |
||
1275 |
| caughtEx | |
|
1276 |
caughtEx := nil. |
|
1277 |
[ |
|
1278 |
test debug |
|
1279 |
] on: GenericException do:[:ex| |
|
1280 |
caughtEx := ex. |
|
1281 |
ex pass |
|
1282 |
]. |
|
1283 |
caughtEx ifNil: |
|
1284 |
[failureListHolder value remove: test. |
|
1285 |
failureListHolder changed]. |
|
1286 |
||
1287 |
"Created: / 06-06-2008 / 09:20:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1288 |
! |
|
1289 |
||
10143 | 1290 |
runCoverageAction |
10235 | 1291 |
| allCoveredClasses browser result| |
10143 | 1292 |
|
11979 | 1293 |
allCoveredClasses := Set new. |
10143 | 1294 |
self selectedTestCases do:[:eachClass | |
10273
83fad2bd03bd
changed: #runCoverageAction
Claus Gittinger <cg@exept.de>
parents:
10239
diff
changeset
|
1295 |
eachClass coveredClasses do:[:cls | cls autoload]. |
11979 | 1296 |
eachClass coveredClasses do:[:eachCoveredClass | |
1297 |
allCoveredClasses addAll:(eachCoveredClass withAllPrivateClasses). |
|
1298 |
]. |
|
10143 | 1299 |
]. |
1300 |
||
10238
1cf700fc8af5
changed: #runCoverageAction
Claus Gittinger <cg@exept.de>
parents:
10235
diff
changeset
|
1301 |
(lastBrowser notNil |
1cf700fc8af5
changed: #runCoverageAction
Claus Gittinger <cg@exept.de>
parents:
10235
diff
changeset
|
1302 |
and:[ lastBrowser window isOpen]) ifTrue:[ |
10235 | 1303 |
browser := lastBrowser. |
10239
775fafd92d7c
changed: #runCoverageAction
Claus Gittinger <cg@exept.de>
parents:
10238
diff
changeset
|
1304 |
browser window topView raiseDeiconified. |
10235 | 1305 |
] ifFalse:[ |
1306 |
browser := NewSystemBrowser browseClasses:allCoveredClasses. |
|
1307 |
lastBrowser := browser. |
|
1308 |
]. |
|
1309 |
||
1310 |
browser showCoverageInformation value:true. |
|
10143 | 1311 |
browser selectClasses:allCoveredClasses. |
10235 | 1312 |
browser window topView raise. |
1313 |
||
10143 | 1314 |
allCoveredClasses do:[:eachClass | |
1315 |
browser recompileClassWithInstrumentation:eachClass |
|
1316 |
]. |
|
1317 |
||
12461 | 1318 |
browser infoLabelHolder value:nil. |
10143 | 1319 |
self withWaitCursorDo:[ |
12054 | 1320 |
InstrumentationContext runForCoverage:[ |
10626
f542247e1319
changed: #runCoverageAction
Claus Gittinger <cg@exept.de>
parents:
10607
diff
changeset
|
1321 |
result := self runSuite: self selectedTestSuite. |
f542247e1319
changed: #runCoverageAction
Claus Gittinger <cg@exept.de>
parents:
10607
diff
changeset
|
1322 |
]. |
10143 | 1323 |
History add: result. |
1324 |
]. |
|
1325 |
||
1326 |
"Modified: / 18-01-2008 / 18:38:08 / janfrog" |
|
1327 |
"Modified: / 06-06-2008 / 08:51:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1328 |
"Modified: / 19-03-2010 / 08:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1329 |
"Created: / 04-07-2011 / 23:04:22 / cg" |
|
1330 |
! |
|
1331 |
||
10645 | 1332 |
runDebuggedAction |
1333 |
self runSuite: self selectedTestSuite keepFailures: false keepErrors: false debug: true |
|
1334 |
||
1335 |
"Created: / 21-08-2011 / 17:49:49 / cg" |
|
1336 |
! |
|
1337 |
||
9953 | 1338 |
runErrorsAction |
1339 |
"akce na tlacitku Run Errors" |
|
1340 |
||
1341 |
self runSuite: self errorTestSuite keepFailures: true keepErrors: false |
|
1342 |
||
1343 |
"Modified: / 18-01-2008 / 18:38:33 / janfrog" |
|
1344 |
"Modified: / 06-06-2008 / 09:13:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1345 |
! |
|
1346 |
||
1347 |
runFailuresAction |
|
1348 |
"akce na tlacitku Run Failures" |
|
1349 |
||
1350 |
self runSuite: self failureTestSuite keepFailures: false keepErrors: true |
|
1351 |
||
1352 |
"Modified: / 18-01-2008 / 18:38:40 / janfrog" |
|
1353 |
"Modified: / 06-06-2008 / 09:13:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1354 |
! |
|
1355 |
||
1356 |
runProfiledAction |
|
1357 |
"akce na tlacitku Run Profiled" |
|
1358 |
self shouldImplement. |
|
1359 |
! |
|
1360 |
||
1361 |
runSelectedAction |
|
1362 |
||
1363 |
| result | |
|
10143 | 1364 |
|
9953 | 1365 |
result := self runSuite: self selectedTestSuite. |
1366 |
History add: result. |
|
1367 |
||
1368 |
"Modified: / 18-01-2008 / 18:38:08 / janfrog" |
|
1369 |
"Modified: / 06-06-2008 / 08:51:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1370 |
"Modified: / 19-03-2010 / 08:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10143 | 1371 |
"Modified: / 04-07-2011 / 23:04:46 / cg" |
9953 | 1372 |
! |
1373 |
||
1374 |
runSuite: aTestSuite |
|
1375 |
||
1376 |
^self runSuite: aTestSuite keepFailures: false keepErrors: false |
|
1377 |
||
1378 |
"Modified: / 18-01-2008 / 18:38:08 / janfrog" |
|
1379 |
"Modified: / 06-06-2008 / 09:12:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1380 |
"Modified: / 19-03-2010 / 08:44:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1381 |
! |
|
1382 |
||
1383 |
runSuite: aTestSuite keepFailures: keepFailures keepErrors: keepErrors |
|
10645 | 1384 |
^ self |
1385 |
runSuite: aTestSuite |
|
1386 |
keepFailures: keepFailures |
|
1387 |
keepErrors: keepErrors |
|
1388 |
debug: false |
|
1389 |
||
1390 |
"Modified: / 18-01-2008 / 18:38:08 / janfrog" |
|
1391 |
"Created: / 06-06-2008 / 09:11:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1392 |
"Modified: / 06-06-2008 / 19:40:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1393 |
"Modified: / 20-08-2011 / 13:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1394 |
"Modified: / 21-08-2011 / 17:52:28 / cg" |
|
1395 |
! |
|
1396 |
||
1397 |
runSuite: aTestSuite keepFailures: keepFailures keepErrors: keepErrors debug:doDebug |
|
10143 | 1398 |
| testResult testCases | |
9953 | 1399 |
|
10143 | 1400 |
self withWaitCursorDo:[ |
11924
a53da0dec127
use TestResultForSTX in SUnit runner
Claus Gittinger <cg@exept.de>
parents:
11737
diff
changeset
|
1401 |
testResult := TestResult defaultResultClass new. |
10143 | 1402 |
testCases := Set new. |
1403 |
aTestSuite |
|
1404 |
run: testResult |
|
1405 |
beforeEachDo:[:test :result | |
|
1406 |
self displayRunning: result test: test total: aTestSuite tests size |
|
1407 |
] |
|
1408 |
afterEachDo:[:test :result| |
|
1409 |
testCases add: test class name |
|
10645 | 1410 |
] |
1411 |
debug:doDebug. |
|
9953 | 1412 |
|
10143 | 1413 |
self displayResult: testResult keepFailures: keepFailures keepErrors: keepErrors. |
1414 |
]. |
|
9953 | 1415 |
^testResult |
1416 |
||
1417 |
"Modified: / 18-01-2008 / 18:38:08 / janfrog" |
|
1418 |
"Created: / 06-06-2008 / 09:11:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1419 |
"Modified: / 06-06-2008 / 19:40:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10143 | 1420 |
"Modified: / 04-07-2011 / 23:06:23 / cg" |
10603 | 1421 |
"Modified: / 20-08-2011 / 13:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10645 | 1422 |
"Created: / 21-08-2011 / 17:51:42 / cg" |
9953 | 1423 |
! ! |
1424 |
||
1425 |
!TestRunner2 methodsFor:'actions - menu'! |
|
1426 |
||
9958 | 1427 |
classListMenuBrowse |
1428 |
UserPreferences current systemBrowserClass |
|
12613 | 1429 |
browseClasses: (self selectedTestSuite tests collect:[:each | each class] as:Set) |
9958 | 1430 |
|
1431 |
"Created: / 30-06-2011 / 22:02:26 / cg" |
|
1432 |
! |
|
1433 |
||
11979 | 1434 |
classListMenuBrowseCoveredClasses |
1435 |
|setOfCoveredClasses| |
|
1436 |
||
1437 |
setOfCoveredClasses := Set new. |
|
1438 |
(self selectedTestSuite tests collect:[:each | each class]) do:[:eachTestClass | |
|
1439 |
eachTestClass coveredClasses do:[:eachCoveredClass | |
|
1440 |
setOfCoveredClasses addAll:(eachCoveredClass withAllPrivateClasses) |
|
1441 |
]. |
|
1442 |
]. |
|
1443 |
||
1444 |
UserPreferences current systemBrowserClass browseClasses:setOfCoveredClasses |
|
1445 |
||
1446 |
"Created: / 30-06-2011 / 22:02:26 / cg" |
|
1447 |
! |
|
1448 |
||
10143 | 1449 |
openDocumentation |
1450 |
"opens the documentation file" |
|
1451 |
||
11979 | 1452 |
HTMLDocumentView openFullOnDocumentationFile: 'tools/misc/TOP.html#SUNIT2' |
10143 | 1453 |
|
1454 |
"Created: / 04-07-2011 / 22:02:09 / cg" |
|
1455 |
! |
|
1456 |
||
9953 | 1457 |
packageListMenuSelectDependents |
1458 |
||
1459 |
|prjDef| |
|
1460 |
||
1461 |
prjDef := self theSingleSelectedProjectDefinition. |
|
1462 |
prjDef ifNil:[^self]. |
|
1463 |
self selectedPackages: |
|
1464 |
(prjDef dependentProjects copy add: prjDef package; yourself) |
|
1465 |
||
1466 |
"Created: / 06-06-2008 / 20:12:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1467 |
! |
|
1468 |
||
1469 |
packageListMenuSelectDependentsAll |
|
1470 |
||
1471 |
|prjDef| |
|
1472 |
||
1473 |
prjDef := self theSingleSelectedProjectDefinition. |
|
1474 |
prjDef ifNil:[^self]. |
|
1475 |
self selectedPackages: |
|
1476 |
(prjDef allDependentProjects copy add: prjDef package; yourself) |
|
1477 |
||
1478 |
"Created: / 06-06-2008 / 20:12:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1479 |
! |
|
1480 |
||
1481 |
packageListMenuSelectPrerequisites |
|
1482 |
||
1483 |
|prjDef| |
|
1484 |
||
1485 |
prjDef := self theSingleSelectedProjectDefinition. |
|
1486 |
prjDef ifNil:[^self]. |
|
1487 |
self selectedPackages: |
|
12445 | 1488 |
(prjDef effectivePreRequisites copy add: prjDef package; yourself) |
9953 | 1489 |
|
1490 |
"Created: / 06-06-2008 / 20:06:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1491 |
! |
|
1492 |
||
1493 |
packageListMenuSelectPrerequisitesAll |
|
1494 |
||
1495 |
|prjDef| |
|
1496 |
||
1497 |
prjDef := self theSingleSelectedProjectDefinition. |
|
1498 |
prjDef ifNil:[^self]. |
|
1499 |
self selectedPackages: |
|
1500 |
(prjDef allPreRequisites copy add: prjDef package; yourself) |
|
1501 |
||
1502 |
"Created: / 06-06-2008 / 20:11:22 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1503 |
! |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1504 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1505 |
resultListMenuBrowse |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1506 |
UserPreferences current systemBrowserClass |
11500
6d4470524d8b
changed: #resultListMenuBrowse
Stefan Vogel <sv@exept.de>
parents:
10718
diff
changeset
|
1507 |
openInClass: (self selectedResultHolder value test class) selector:(self selectedResultHolder value test selector). |
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1508 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1509 |
"Created: / 23-09-2011 / 18:55:50 / cg" |
9953 | 1510 |
! ! |
1511 |
||
1512 |
!TestRunner2 methodsFor:'aspects'! |
|
1513 |
||
1514 |
classCategoryOrPackageTabIndexHolder |
|
1515 |
||
1516 |
classCategoryOrPackageTabIndexHolder ifNil: |
|
1517 |
[classCategoryOrPackageTabIndexHolder := nil asValue. |
|
1518 |
classCategoryOrPackageTabIndexHolder onChangeEvaluate: |
|
1519 |
[classCategoryOrPackageTabIndexHolder value = 1 |
|
1520 |
ifTrue:[self classCategoryList selectionChanged]. |
|
1521 |
classCategoryOrPackageTabIndexHolder value = 2 |
|
1522 |
ifTrue:[self packageList selectionChanged]]]. |
|
1523 |
^classCategoryOrPackageTabIndexHolder |
|
1524 |
||
1525 |
"Created: / 05-06-2008 / 21:59:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1526 |
"Modified: / 06-06-2008 / 12:29:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1527 |
! |
|
1528 |
||
1529 |
classCategoryOrPackageTabList |
|
1530 |
"Generated by the TabListEditor" |
|
1531 |
||
1532 |
|list| |
|
1533 |
||
1534 |
(list := builder bindingAt:#classCategoryOrPackageTabList) isNil ifTrue:[ |
|
1535 |
builder aspectAt:#classCategoryOrPackageTabList put:(list := self class classCategoryOrPackageTabList). |
|
1536 |
]. |
|
1537 |
^ list |
|
1538 |
||
1539 |
"Created: / 05-06-2008 / 00:00:26 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1540 |
! |
|
1541 |
||
1542 |
classListInGeneratorHolder |
|
1543 |
classListInGeneratorHolder ifNil: |
|
1544 |
[ classListInGeneratorHolder := BlockValue with: |
|
1545 |
[:gen | |
|
1546 |
|testCases| |
|
1547 |
||
1548 |
testCases := OrderedCollection new:8. |
|
1549 |
gen do:[:cls | (self isTestCaseLike:cls) ifTrue:[ testCases add:cls ] ]. |
|
1550 |
testCases ] |
|
1551 |
argument:self classListOutGeneratorHolder ]. |
|
1552 |
^ classListInGeneratorHolder |
|
1553 |
||
1554 |
"Created: / 01-02-2010 / 09:50:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1555 |
! |
|
1556 |
||
1557 |
classListOutGeneratorHolder |
|
1558 |
||
1559 |
classListOutGeneratorHolder ifNil: |
|
1560 |
[classListOutGeneratorHolder := ValueHolder with:#()]. |
|
1561 |
^classListOutGeneratorHolder |
|
1562 |
||
1563 |
"Created: / 01-02-2010 / 09:46:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1564 |
! |
|
1565 |
||
1566 |
detailsHolder |
|
1567 |
"return/create the 'detailsHolder' value holder (automatically generated)" |
|
1568 |
||
1569 |
detailsHolder isNil ifTrue:[ |
|
1570 |
detailsHolder := ValueHolder new. |
|
1571 |
]. |
|
1572 |
^ detailsHolder |
|
1573 |
||
1574 |
"Created: / 18-01-2008 / 18:44:29 / janfrog" |
|
1575 |
! |
|
1576 |
||
1577 |
errorListHolder |
|
1578 |
"return/create the 'errorListHolder' value holder (automatically generated)" |
|
1579 |
||
1580 |
errorListHolder isNil ifTrue:[ |
|
1581 |
errorListHolder := ValueHolder new. |
|
1582 |
]. |
|
1583 |
^ errorListHolder |
|
1584 |
||
1585 |
"Created: / 06-06-2008 / 08:55:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1586 |
! |
|
1587 |
||
1588 |
errorSelectionHolder |
|
1589 |
"return/create the 'errorSelectionHolder' value holder (automatically generated)" |
|
1590 |
||
1591 |
errorSelectionHolder isNil ifTrue:[ |
|
1592 |
errorSelectionHolder := ValueHolder new. |
|
1593 |
]. |
|
1594 |
^ errorSelectionHolder |
|
1595 |
||
1596 |
"Created: / 06-06-2008 / 08:55:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1597 |
! |
|
1598 |
||
1599 |
failureListHolder |
|
1600 |
"return/create the 'failureListHolder' value holder (automatically generated)" |
|
1601 |
||
1602 |
failureListHolder isNil ifTrue:[ |
|
1603 |
failureListHolder := ValueHolder new. |
|
1604 |
]. |
|
1605 |
^ failureListHolder |
|
1606 |
||
1607 |
"Created: / 06-06-2008 / 08:55:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1608 |
! |
|
1609 |
||
1610 |
failureSelectionHolder |
|
1611 |
"return/create the 'failureSelectionHolder' value holder (automatically generated)" |
|
1612 |
||
1613 |
failureSelectionHolder isNil ifTrue:[ |
|
1614 |
failureSelectionHolder := ValueHolder new. |
|
1615 |
]. |
|
1616 |
^ failureSelectionHolder |
|
1617 |
||
1618 |
"Created: / 06-06-2008 / 08:55:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1619 |
! |
|
1620 |
||
1621 |
hasErrorsAspect |
|
1622 |
||
1623 |
^(AspectAdaptor forAspect:#notEmpty) |
|
1624 |
subjectChannel: self errorListHolder |
|
1625 |
||
1626 |
"Created: / 06-06-2008 / 09:17:04 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1627 |
! |
|
1628 |
||
1629 |
hasFailuresAspect |
|
1630 |
||
1631 |
^(AspectAdaptor forAspect:#notEmpty) |
|
1632 |
subjectChannel: self failureListHolder |
|
1633 |
||
1634 |
"Created: / 06-06-2008 / 09:17:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1635 |
! |
|
1636 |
||
1637 |
hasTestCasesAspect |
|
1638 |
||
1639 |
^(AspectAdaptor forAspect:#notEmpty) |
|
1640 |
subjectChannel: self classListInGeneratorHolder |
|
1641 |
||
1642 |
"Created: / 06-06-2008 / 09:54:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1643 |
"Modified: / 01-02-2010 / 09:53:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1644 |
! |
|
1645 |
||
1646 |
historyHolder |
|
1647 |
"return/create the 'resultHolder' value holder (automatically generated)" |
|
1648 |
||
1649 |
History ifNil:[self class initializeHistory]. |
|
1650 |
^History |
|
1651 |
||
1652 |
"Created: / 19-03-2010 / 08:43:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1653 |
! |
|
1654 |
||
1655 |
modeHolder |
|
1656 |
"return/create the 'modeHolder' value holder (automatically generated)" |
|
1657 |
||
1658 |
modeHolder isNil ifTrue:[ |
|
1659 |
modeHolder := ValueHolder new. |
|
1660 |
]. |
|
1661 |
^ modeHolder |
|
1662 |
||
1663 |
"Created: / 18-01-2008 / 18:44:29 / janfrog" |
|
1664 |
! |
|
1665 |
||
1666 |
resultAndHistoryTabList |
|
1667 |
"Generated by the TabListEditor" |
|
1668 |
||
1669 |
|list| |
|
1670 |
||
1671 |
(list := builder bindingAt:#resultAndHistoryTabList) isNil ifTrue:[ |
|
1672 |
builder aspectAt:#resultAndHistoryTabList put:(list := self class resultAndHistoryTabList). |
|
1673 |
]. |
|
1674 |
^ list |
|
1675 |
! |
|
1676 |
||
1677 |
resultHolder |
|
1678 |
"return/create the 'resultHolder' value holder (automatically generated)" |
|
1679 |
||
1680 |
resultHolder isNil ifTrue:[ |
|
1681 |
resultHolder := ValueHolder new. |
|
1682 |
]. |
|
1683 |
^ resultHolder |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1684 |
! |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1685 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1686 |
selectedResultHolder |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1687 |
selectedResultHolder isNil ifTrue:[ |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1688 |
selectedResultHolder := ValueHolder new. |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1689 |
]. |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1690 |
^ selectedResultHolder |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1691 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1692 |
"Created: / 23-09-2011 / 19:14:51 / cg" |
11979 | 1693 |
! |
1694 |
||
1695 |
selectedTestCaseHasCoveredClassesHolder |
|
1696 |
selectedTestCaseHasCoveredClassesHolder isNil ifTrue:[ |
|
1697 |
selectedTestCaseHasCoveredClassesHolder := false asValue |
|
1698 |
]. |
|
1699 |
^ selectedTestCaseHasCoveredClassesHolder |
|
1700 |
||
1701 |
"Created: / 18-01-2008 / 18:44:29 / janfrog" |
|
9953 | 1702 |
! ! |
1703 |
||
1704 |
!TestRunner2 methodsFor:'displaying'! |
|
1705 |
||
1706 |
displayColor: aColorValue |
|
1707 |
||
1708 |
(builder componentAt: #Mode) widget insideColor: aColorValue. |
|
1709 |
(builder componentAt: #Details) widget insideColor: aColorValue. |
|
1710 |
||
1711 |
"Modified: / 02-04-2000 / 14:21:42 / Sames" |
|
1712 |
"Created: / 18-01-2008 / 20:22:39 / janfrog" |
|
1713 |
! |
|
1714 |
||
1715 |
displayDetails: details |
|
1716 |
||
1717 |
self detailsHolder value: details |
|
1718 |
||
1719 |
"Modified: / 02-04-2000 / 14:21:42 / Sames" |
|
1720 |
"Created: / 18-01-2008 / 20:33:51 / janfrog" |
|
1721 |
! |
|
1722 |
||
1723 |
displayFail:result |
|
1724 |
self displayColor:self errorColor. |
|
1725 |
self displayMode:'Fail'. |
|
1726 |
self displayDetails:result printString. |
|
1727 |
||
1728 |
"Created: / 06-06-2008 / 08:49:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1729 |
"Modified: / 07-02-2010 / 14:43:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1730 |
! |
|
1731 |
||
1732 |
displayMode: mode |
|
1733 |
||
1734 |
self modeHolder value: mode |
|
1735 |
||
1736 |
"Modified: / 02-04-2000 / 14:21:42 / Sames" |
|
1737 |
"Created: / 18-01-2008 / 20:33:35 / janfrog" |
|
1738 |
! |
|
1739 |
||
1740 |
displayPass:result |
|
1741 |
self displayColor:self passedColor. |
|
1742 |
self displayMode:'Pass '. |
|
1743 |
self |
|
1744 |
displayDetails:result printString , ' ' , (self timeSinceLastPassAsString) |
|
1745 |
! |
|
1746 |
||
1747 |
displayResult: aTestResult |
|
1748 |
||
1749 |
self displayResult: aTestResult keepFailures: false keepErrors: false. |
|
1750 |
||
1751 |
"Modified: / 21-06-2000 / 12:14:52 / Sames" |
|
1752 |
"Created: / 06-06-2008 / 08:49:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1753 |
"Modified: / 06-06-2008 / 19:24:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1754 |
! |
|
1755 |
||
1756 |
displayResult: aTestResult keepFailures: keepFailures keepErrors: keepErrors |
|
1757 |
||
1758 |
||
1759 |
self resultHolder value: (Array with: aTestResult). |
|
1760 |
||
1761 |
aTestResult hasPassed |
|
1762 |
ifTrue:[self displayPass: aTestResult] |
|
1763 |
ifFalse:[self displayFail: aTestResult]. |
|
1764 |
keepFailures ifFalse: |
|
1765 |
[failureListHolder value: (aTestResult failures |
|
1766 |
asSortedCollection:[:a :b|a printString < b printString])]. |
|
1767 |
keepErrors ifFalse: |
|
1768 |
[errorListHolder value: (aTestResult errors |
|
1769 |
asSortedCollection:[:a :b|a printString < b printString])]. |
|
1770 |
self repairDamage |
|
1771 |
||
1772 |
"Modified: / 21-06-2000 / 12:14:52 / Sames" |
|
1773 |
"Created: / 06-06-2008 / 09:12:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1774 |
"Modified: / 19-03-2010 / 08:33:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1775 |
! |
|
1776 |
||
1777 |
displayRunning: result test: test total: total |
|
1778 |
||
10166
aa9d3a671526
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10143
diff
changeset
|
1779 |
self displayColor: (result hasPassed ifTrue:[self class currentlyRunningColor] ifFalse:[Color orange]). |
9953 | 1780 |
self displayMode: 'Running ' , test printString. |
1781 |
self displayDetails: total printString , ' total, ' , result printString |
|
1782 |
||
1783 |
"Modified: / 21-06-2000 / 12:14:52 / Sames" |
|
1784 |
"Created: / 06-06-2008 / 19:38:48 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10166
aa9d3a671526
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10143
diff
changeset
|
1785 |
"Modified: / 05-07-2011 / 14:14:42 / cg" |
9953 | 1786 |
! ! |
1787 |
||
1788 |
!TestRunner2 methodsFor:'hooks'! |
|
1789 |
||
1790 |
commonPostOpen |
|
1791 |
||
1792 |
self |
|
1793 |
displayMode:'SUnit Test Runner Tool'; |
|
1794 |
displayDetails:'Select tests and press ''Run Selected'''. |
|
1795 |
||
1796 |
self classCategoryOrPackageTabIndexHolder value:2 |
|
1797 |
||
1798 |
"Created: / 05-06-2008 / 21:58:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1799 |
"Modified: / 08-06-2008 / 10:06:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1800 |
"Modified: / 30-06-2011 / 20:20:40 / cg" |
|
1801 |
! ! |
|
1802 |
||
1803 |
!TestRunner2 methodsFor:'private'! |
|
1804 |
||
1805 |
buildSuiteFromClass: testCaseCls |
|
1806 |
"Bit hackish, but no time to redesign sUnit from |
|
1807 |
scratch" |
|
1808 |
||
1809 |
^ testCaseCls buildSuite. |
|
1810 |
||
1811 |
"Modified: / 01-03-2011 / 22:53:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1812 |
"Modified: / 30-05-2011 / 21:03:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1813 |
! |
|
1814 |
||
1815 |
formatTime: aTime |
|
10603 | 1816 |
aTime hours > 0 ifTrue: [^aTime hours printString , 'h']. |
1817 |
aTime minutes > 0 ifTrue: [^aTime minutes printString , 'min']. |
|
1818 |
^aTime seconds printString , ' sec' |
|
9953 | 1819 |
|
1820 |
"Created: / 18-01-2008 / 18:57:08 / janfrog" |
|
1821 |
! |
|
1822 |
||
1823 |
isTestCaseLike:cls |
|
1824 |
||
1825 |
^cls isTestCaseLike |
|
1826 |
||
1827 |
"Modified: / 28-02-2011 / 21:31:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1828 |
! |
|
1829 |
||
1830 |
repairDamage |
|
1831 |
|wg| |
|
1832 |
||
1833 |
(wg := self windowGroup) notNil ifTrue:[wg repairDamage]. |
|
1834 |
||
1835 |
"Created: / 18-01-2008 / 18:45:39 / janfrog" |
|
1836 |
! |
|
1837 |
||
1838 |
timeSinceLastPassAsString |
|
10603 | 1839 |
lastPass isNil ifTrue: [^'']. |
1840 |
^', ' , (self formatTime: (Time now subtractTime: lastPass getSeconds)) , ' since last Pass' |
|
9953 | 1841 |
|
1842 |
"Modified: / 03-04-2000 / 19:17:11 / Sames" |
|
1843 |
"Created: / 18-01-2008 / 18:51:21 / janfrog" |
|
1844 |
! ! |
|
1845 |
||
1846 |
!TestRunner2::ClassList class methodsFor:'documentation'! |
|
1847 |
||
1848 |
version |
|
12644 | 1849 |
^'$Header: /cvs/stx/stx/libtool/Tools__TestRunner2.st,v 1.39 2013-04-04 08:15:45 cg Exp $' |
9953 | 1850 |
! ! |
1851 |
||
1852 |
!TestRunner2::ClassList methodsFor:'private'! |
|
1853 |
||
1854 |
nameListEntryFor:aClass withNameSpace:useFullName |
|
1855 |
||
1856 |
| nm | |
|
12580 | 1857 |
|
9953 | 1858 |
nm := super nameListEntryFor:aClass withNameSpace:useFullName. |
12580 | 1859 |
(aClass isTestCaseLike) ifFalse:[ |
1860 |
self breakPoint: #jv. |
|
1861 |
^nm |
|
1862 |
]. |
|
1863 |
aClass isAbstract ifTrue:[nm := nm allItalic colorizeAllWith:Color gray]. |
|
9953 | 1864 |
^nm |
1865 |
||
1866 |
"Created: / 27-11-2008 / 17:24:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1867 |
"Modified: / 28-02-2011 / 21:42:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1868 |
! ! |
|
1869 |
||
1870 |
!TestRunner2::ResultList class methodsFor:'interface specs'! |
|
1871 |
||
1872 |
windowSpec |
|
1873 |
"This resource specification was automatically generated |
|
1874 |
by the UIPainter of ST/X." |
|
1875 |
||
1876 |
"Do not manually edit this!! If it is corrupted, |
|
1877 |
the UIPainter may not be able to read the specification." |
|
1878 |
||
1879 |
" |
|
1880 |
UIPainter new openOnClass:Tools::TestRunner2::ResultList andSelector:#windowSpec |
|
1881 |
Tools::TestRunner2::ResultList new openInterface:#windowSpec |
|
1882 |
Tools::TestRunner2::ResultList open |
|
1883 |
" |
|
1884 |
||
1885 |
<resource: #canvas> |
|
1886 |
||
1887 |
^ |
|
1888 |
#(FullSpec |
|
1889 |
name: windowSpec |
|
1890 |
window: |
|
1891 |
(WindowSpec |
|
1892 |
label: 'Test Result List' |
|
1893 |
name: 'Test Result List' |
|
1894 |
min: (Point 10 10) |
|
1895 |
bounds: (Rectangle 0 0 300 300) |
|
1896 |
) |
|
1897 |
component: |
|
1898 |
(SpecCollection |
|
1899 |
collection: ( |
|
1900 |
(HierarchicalListViewSpec |
|
1901 |
name: 'List' |
|
1902 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
1903 |
model: selectionHolder |
|
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
1904 |
menu: resultListMenu |
9953 | 1905 |
hasHorizontalScrollBar: true |
1906 |
hasVerticalScrollBar: true |
|
1907 |
listModel: listHolder |
|
1908 |
useIndex: false |
|
1909 |
highlightMode: line |
|
1910 |
doubleClickSelector: debugTest: |
|
1911 |
showLines: false |
|
1912 |
useDefaultIcons: false |
|
1913 |
) |
|
1914 |
) |
|
1915 |
||
1916 |
) |
|
1917 |
) |
|
1918 |
! ! |
|
1919 |
||
1920 |
!TestRunner2::ResultList class methodsFor:'plugIn spec'! |
|
1921 |
||
1922 |
aspectSelectors |
|
1923 |
"This resource specification was automatically generated |
|
1924 |
by the UIPainter of ST/X." |
|
1925 |
||
1926 |
"Do not manually edit this. If it is corrupted, |
|
1927 |
the UIPainter may not be able to read the specification." |
|
1928 |
||
1929 |
"Return a description of exported aspects; |
|
1930 |
these can be connected to aspects of an embedding application |
|
1931 |
(if this app is embedded in a subCanvas)." |
|
1932 |
||
1933 |
^ #( |
|
1934 |
#resultsHolder |
|
1935 |
#selectionHolder |
|
1936 |
). |
|
1937 |
||
1938 |
! ! |
|
1939 |
||
1940 |
!TestRunner2::ResultList methodsFor:'actions'! |
|
1941 |
||
1942 |
debugTest:entryIndex |
|
1943 |
|entry test caughtEx| |
|
1944 |
||
1945 |
test := (entry := listHolder value at:entryIndex) test. |
|
1946 |
test ifNil:[ ^ self ]. |
|
1947 |
||
1948 |
[ |
|
1949 |
caughtEx := nil. |
|
1950 |
[test debug] on:GenericException do:[:ex | caughtEx := ex. ex pass]. |
|
1951 |
caughtEx |
|
1952 |
ifNil: |
|
1953 |
[self setResult: #passed in: entry] |
|
1954 |
ifNotNil: |
|
1955 |
[((caughtEx isKindOf:TestResult resumableFailure) |
|
1956 |
or:[ caughtEx isKindOf:TestResult failure ]) |
|
1957 |
ifTrue: |
|
1958 |
[self setResult: #failed in: entry] |
|
1959 |
ifFalse: |
|
1960 |
[self setResult: #error in: entry]]. |
|
1961 |
] fork |
|
1962 |
||
1963 |
"Modified: / 07-02-2010 / 18:59:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1964 |
"Created: / 08-02-2010 / 10:08:30 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
1965 |
! ! |
|
1966 |
||
1967 |
!TestRunner2::ResultList methodsFor:'aspects'! |
|
1968 |
||
1969 |
listHolder |
|
1970 |
"return/create the 'listHolder' value holder (automatically generated)" |
|
1971 |
||
1972 |
listHolder isNil ifTrue:[ |
|
1973 |
listHolder := ValueHolder new. |
|
1974 |
]. |
|
1975 |
^ listHolder |
|
1976 |
! |
|
1977 |
||
1978 |
resultsHolder |
|
1979 |
"return/create the 'resultHolder' value holder (automatically generated)" |
|
1980 |
||
1981 |
resultsHolder isNil ifTrue:[ |
|
1982 |
resultsHolder := ValueHolder new. |
|
1983 |
resultsHolder addDependent:self. |
|
1984 |
]. |
|
1985 |
^ resultsHolder |
|
1986 |
||
1987 |
"Created: / 19-03-2010 / 08:31:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1988 |
! |
|
1989 |
||
1990 |
resultsHolder:aValueModel |
|
1991 |
"set the 'resultHolder' value holder (automatically generated)" |
|
1992 |
||
1993 |
|oldValue newValue| |
|
1994 |
||
1995 |
resultsHolder notNil ifTrue:[ |
|
1996 |
oldValue := resultsHolder value. |
|
1997 |
resultsHolder removeDependent:self. |
|
1998 |
]. |
|
1999 |
resultsHolder := aValueModel. |
|
2000 |
resultsHolder notNil ifTrue:[ |
|
2001 |
resultsHolder addDependent:self. |
|
2002 |
]. |
|
2003 |
newValue := resultsHolder value. |
|
2004 |
oldValue ~~ newValue ifTrue:[ |
|
2005 |
self update:#value with:newValue from:resultsHolder. |
|
2006 |
]. |
|
2007 |
||
2008 |
"Created: / 19-03-2010 / 08:32:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2009 |
! |
|
2010 |
||
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2011 |
selectionHolder |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2012 |
selectionHolder isNil ifTrue:[ |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2013 |
selectionHolder := ValueHolder new. |
9953 | 2014 |
]. |
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2015 |
^ selectionHolder |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2016 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2017 |
"Created: / 23-09-2011 / 19:01:57 / cg" |
9953 | 2018 |
! |
2019 |
||
10718
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2020 |
selectionHolder:something |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2021 |
selectionHolder := something. |
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2022 |
|
3153c8cd16ac
added browse in result menu
Claus Gittinger <cg@exept.de>
parents:
10645
diff
changeset
|
2023 |
"Created: / 23-09-2011 / 19:02:06 / cg" |
9953 | 2024 |
! ! |
2025 |
||
2026 |
!TestRunner2::ResultList methodsFor:'change & update'! |
|
2027 |
||
2028 |
update:aspect with:param from:sender |
|
2029 |
||
2030 |
sender == resultsHolder ifTrue: |
|
2031 |
[results := self resultsHolder value. |
|
2032 |
self updateTimestampFormat. |
|
2033 |
self updateList. |
|
2034 |
^self]. |
|
2035 |
||
2036 |
super update:aspect with:param from:sender |
|
2037 |
||
2038 |
"Modified: / 19-03-2010 / 08:50:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2039 |
! |
|
2040 |
||
2041 |
updateList |
|
2042 |
||
2043 |
| list | |
|
2044 |
list := HierarchicalList new. |
|
2045 |
list root: self makeRootEntry. |
|
2046 |
list showRoot: false. |
|
2047 |
self listHolder value: list. |
|
2048 |
||
2049 |
"Created: / 07-02-2010 / 11:03:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2050 |
"Modified: / 07-02-2010 / 13:41:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2051 |
! |
|
2052 |
||
2053 |
updateTimestampFormat |
|
2054 |
||
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2055 |
(results isEmptyOrNil or:[results size = 1]) |
9953 | 2056 |
ifTrue:[timestampFormat := nil]. |
2057 |
||
12613 | 2058 |
((results collect:[:each|each timestamp] as:Set) size = 1) |
9953 | 2059 |
ifTrue: [timestampFormat := ' (%h:%m)'] |
2060 |
ifFalse:[timestampFormat := ' (%(month)-%(day) %h:%m)'] |
|
2061 |
||
2062 |
"Created: / 19-03-2010 / 08:50:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2063 |
"Modified: / 12-09-2010 / 09:50:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2064 |
"Modified: / 04-08-2011 / 19:05:57 / cg" |
9953 | 2065 |
! ! |
2066 |
||
2067 |
!TestRunner2::ResultList methodsFor:'private'! |
|
2068 |
||
2069 |
invalidate |
|
2070 |
||
2071 |
^(self componentAt: #List) scrolledView redraw |
|
2072 |
||
2073 |
"Created: / 07-02-2010 / 18:57:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2074 |
! |
|
2075 |
||
2076 |
setResult: testResult in: entry |
|
2077 |
||
2078 |
entry result ~= testResult ifTrue: |
|
2079 |
[entry result: testResult. |
|
2080 |
self invalidate]. |
|
2081 |
||
2082 |
"Created: / 08-02-2010 / 10:28:53 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2083 |
! ! |
|
2084 |
||
2085 |
!TestRunner2::ResultList methodsFor:'private-list'! |
|
2086 |
||
2087 |
makeClassEntryFor: class result: result tests: tests |
|
2088 |
||
2089 |
| entry children | |
|
10565
3797ce5a3bd7
Uses sunitName for displaying class named (if understood)
vrany
parents:
10560
diff
changeset
|
2090 |
entry := ListEntry labeled: (class perform:#sunitName ifNotUnderstood:[class name]). |
9953 | 2091 |
children := (tests asSortedCollection: [:a :b|a selector < b selector]) |
2092 |
collect:[:test|self makeTestEntryFor: test result: result]. |
|
2093 |
entry setChildren: children. |
|
2094 |
(entry result ~= #passed and:[results size = 1]) ifTrue:[entry expand]. |
|
2095 |
^entry |
|
2096 |
||
2097 |
"Created: / 19-03-2010 / 08:41:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2098 |
! |
|
2099 |
||
2100 |
makeResultEntryFor: result |
|
2101 |
||
2102 |
| entry children classes label | |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2103 |
label := result name ? ''. |
9953 | 2104 |
result timestamp ifNotNil: |
2105 |
[label := label , (result timestamp printStringFormat: timestampFormat)]. |
|
2106 |
entry := ListEntry labeled: label. |
|
2107 |
classes := Dictionary new. |
|
2108 |
result tests do: |
|
2109 |
[:test| |
|
2110 |
(classes at: test class ifAbsentPut:[OrderedCollection new:1]) |
|
2111 |
add: test]. |
|
2112 |
children := classes keysAndValuesCollect: |
|
2113 |
[:class :tests| |
|
2114 |
self makeClassEntryFor: class result: result tests: tests]. |
|
2115 |
entry setChildren: children. |
|
2116 |
^entry. |
|
2117 |
||
2118 |
"Created: / 19-03-2010 / 08:36:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2119 |
"Modified: / 04-08-2011 / 20:30:39 / cg" |
9953 | 2120 |
! |
2121 |
||
2122 |
makeRootEntry |
|
2123 |
||
2124 |
| entry children | |
|
2125 |
entry := ListEntry labeled: 'Test Results'. |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2126 |
results isEmptyOrNil ifTrue:[^entry]. |
9953 | 2127 |
children := results size = 1 |
2128 |
ifTrue: |
|
2129 |
[(self makeResultEntryFor: results anyOne) getChildren] |
|
2130 |
ifFalse: |
|
2131 |
[results collect:[:result|self makeResultEntryFor:result]]. |
|
2132 |
entry setChildren: children. |
|
2133 |
^entry. |
|
2134 |
||
2135 |
"Created: / 07-02-2010 / 13:39:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2136 |
"Modified: / 19-03-2010 / 08:39:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2137 |
"Modified: / 04-08-2011 / 19:05:55 / cg" |
9953 | 2138 |
! |
2139 |
||
2140 |
makeTestEntryFor: test result: result |
|
2141 |
||
2142 |
| entry | |
|
2143 |
entry := ListEntry labeled: test selector. |
|
2144 |
entry test: test. |
|
2145 |
(result errors includes: test) |
|
2146 |
ifTrue: |
|
2147 |
[entry result: #error] |
|
2148 |
ifFalse: |
|
2149 |
[(result failures includes: test) |
|
2150 |
ifTrue: |
|
2151 |
[entry result: #failed] |
|
2152 |
ifFalse: |
|
2153 |
[entry result: #passed]]. |
|
2154 |
^entry |
|
2155 |
||
2156 |
"Created: / 19-03-2010 / 08:41:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2157 |
! ! |
|
2158 |
||
2159 |
!TestRunner2::ResultList::ListEntry class methodsFor:'initialization'! |
|
2160 |
||
2161 |
initialize |
|
2162 |
"Invoked at system start or when the class is dynamically loaded." |
|
2163 |
||
2164 |
"/ please change as required (and remove this comment) |
|
2165 |
||
2166 |
PassedText := ' [passed]' asText colorizeAllWith: Tools::TestRunner2 passedColor darker. |
|
2167 |
FailedText := ' [failed]' asText colorizeAllWith: Tools::TestRunner2 failedColor darker. |
|
2168 |
ErrorText := ' [error]' asText colorizeAllWith: Tools::TestRunner2 errorColor darker. |
|
2169 |
||
2170 |
"Modified: / 07-02-2010 / 15:06:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2171 |
! ! |
|
2172 |
||
2173 |
!TestRunner2::ResultList::ListEntry class methodsFor:'instance creation'! |
|
2174 |
||
2175 |
labeled: aStringOrText |
|
2176 |
||
2177 |
^self new label: aStringOrText |
|
2178 |
||
2179 |
"Created: / 07-02-2010 / 13:31:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2180 |
! ! |
|
2181 |
||
2182 |
!TestRunner2::ResultList::ListEntry methodsFor:'accessing'! |
|
2183 |
||
2184 |
icon |
|
2185 |
||
2186 |
^self result == #passed |
|
2187 |
ifTrue:[SystemBrowser greenThumbUpSmallIcon] |
|
2188 |
ifFalse:[SystemBrowser redThumbDownSmallIcon] |
|
2189 |
||
2190 |
"Created: / 07-02-2010 / 18:34:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2191 |
! |
|
2192 |
||
2193 |
label |
|
2194 |
||
2195 |
| result | |
|
2196 |
result := self result. |
|
2197 |
realLabel ifNil: |
|
2198 |
[realLabel := label. |
|
2199 |
test ifNotNil:[ |
|
2200 |
result == #passed ifTrue:[realLabel := realLabel , PassedText]. |
|
2201 |
result == #error ifTrue:[realLabel := realLabel , ErrorText]. |
|
2202 |
result == #failed ifTrue:[realLabel := realLabel , FailedText]. |
|
2203 |
] ifNil: [ |
|
2204 |
realLabel := realLabel , self summary. |
|
2205 |
] |
|
2206 |
]. |
|
2207 |
||
2208 |
^ realLabel |
|
2209 |
||
2210 |
"Modified: / 07-02-2010 / 18:28:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2211 |
"Modified: / 08-02-2010 / 10:15:35 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2212 |
! |
|
2213 |
||
2214 |
label:aText |
|
2215 |
label := aText. |
|
2216 |
realLabel := nil. |
|
2217 |
||
2218 |
"Modified: / 07-02-2010 / 14:36:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2219 |
! |
|
2220 |
||
2221 |
result |
|
2222 |
||
2223 |
result ifNil: |
|
2224 |
[result := self computeResult]. |
|
2225 |
^ result |
|
2226 |
||
2227 |
"Modified: / 07-02-2010 / 18:30:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2228 |
! |
|
2229 |
||
2230 |
result:aSymbol |
|
2231 |
||
2232 |
result := aSymbol. |
|
2233 |
self reset. |
|
2234 |
result := aSymbol. |
|
2235 |
||
2236 |
"Modified: / 07-02-2010 / 18:55:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2237 |
! |
|
2238 |
||
2239 |
test |
|
2240 |
^ test |
|
2241 |
! |
|
2242 |
||
2243 |
test:aTestCase |
|
2244 |
test := aTestCase. |
|
2245 |
! ! |
|
2246 |
||
2247 |
!TestRunner2::ResultList::ListEntry methodsFor:'enumeration'! |
|
2248 |
||
2249 |
leafsDo: aBlock |
|
2250 |
||
2251 |
self isLeafEntry ifTrue:[^aBlock value: self]. |
|
2252 |
children do:[:each|each leafsDo: aBlock] |
|
2253 |
||
2254 |
"Created: / 08-02-2010 / 10:17:32 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2255 |
! |
|
2256 |
||
2257 |
testsDo: aBlock |
|
2258 |
||
2259 |
test ifNotNil:[aBlock value: test]. |
|
2260 |
children do:[:each|each testsDo: aBlock] |
|
2261 |
||
2262 |
"Created: / 08-02-2010 / 10:10:36 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2263 |
! ! |
|
2264 |
||
2265 |
!TestRunner2::ResultList::ListEntry methodsFor:'initialization'! |
|
2266 |
||
2267 |
reset |
|
2268 |
||
2269 |
realLabel := result := nil. |
|
2270 |
(parent notNil and:[parent class == self class]) |
|
2271 |
ifTrue:[parent reset] |
|
2272 |
||
2273 |
"Created: / 07-02-2010 / 18:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2274 |
! |
|
2275 |
||
2276 |
setChildren: aCollection |
|
2277 |
||
2278 |
children := aCollection. |
|
2279 |
children do:[:e|e parent: self]. |
|
2280 |
||
2281 |
"Created: / 07-02-2010 / 11:41:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2282 |
! ! |
|
2283 |
||
2284 |
!TestRunner2::ResultList::ListEntry methodsFor:'private'! |
|
2285 |
||
2286 |
computeResult |
|
2287 |
||
2288 |
| result | |
|
2289 |
result := #passed. |
|
2290 |
(children ? #()) do: |
|
2291 |
[:entry| |
|
2292 |
entry result == #error ifTrue:[^#error]. |
|
2293 |
entry result == #failed ifTrue:[result := #failed]]. |
|
2294 |
^result |
|
2295 |
||
2296 |
"Created: / 07-02-2010 / 18:30:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2297 |
! |
|
2298 |
||
2299 |
summary |
|
2300 |
||
2301 |
| passed failed error | |
|
2302 |
passed := failed := error := 0. |
|
2303 |
self leafsDo: |
|
2304 |
[:entry| |
|
2305 |
entry isPassed ifTrue:[passed := passed + 1]. |
|
2306 |
entry isFailed ifTrue:[failed := failed + 1]. |
|
2307 |
entry isError ifTrue:[error := error + 1]]. |
|
2308 |
||
2309 |
^' [ ' , passed printString , ' / ' , failed printString , ' / ', error printString , ' ]' |
|
2310 |
||
2311 |
"Created: / 08-02-2010 / 10:16:52 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2312 |
! ! |
|
2313 |
||
2314 |
!TestRunner2::ResultList::ListEntry methodsFor:'testing'! |
|
2315 |
||
2316 |
isError |
|
2317 |
||
2318 |
^self result == #error |
|
2319 |
||
2320 |
"Created: / 08-02-2010 / 10:18:26 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2321 |
! |
|
2322 |
||
2323 |
isFailed |
|
2324 |
||
2325 |
^self result == #failed |
|
2326 |
||
2327 |
"Created: / 08-02-2010 / 10:18:21 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2328 |
! |
|
2329 |
||
2330 |
isLeafEntry |
|
2331 |
||
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2332 |
^children isEmptyOrNil |
9953 | 2333 |
|
2334 |
"Created: / 08-02-2010 / 10:11:06 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
10452
a2ce7970a068
changed: #selectedTestCases
Claus Gittinger <cg@exept.de>
parents:
10273
diff
changeset
|
2335 |
"Modified: / 04-08-2011 / 19:05:59 / cg" |
9953 | 2336 |
! |
2337 |
||
2338 |
isPassed |
|
2339 |
||
2340 |
^self result == #passed |
|
2341 |
||
2342 |
"Created: / 08-02-2010 / 10:18:15 / Jan Vrany <jan,vrany@fit.cvut.cz>" |
|
2343 |
! ! |
|
2344 |
||
2345 |
!TestRunner2 class methodsFor:'documentation'! |
|
2346 |
||
10513 | 2347 |
version |
12644 | 2348 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunner2.st,v 1.39 2013-04-04 08:15:45 cg Exp $' |
10513 | 2349 |
! |
2350 |
||
9953 | 2351 |
version_CVS |
12644 | 2352 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunner2.st,v 1.39 2013-04-04 08:15:45 cg Exp $' |
9953 | 2353 |
! |
2354 |
||
2355 |
version_SVN |
|
2356 |
^ '§Id: Tools__TestRunner2.st 7486 2009-10-26 22:06:24Z vranyj1 §' |
|
2357 |
! ! |
|
2358 |
||
12445 | 2359 |
|
9953 | 2360 |
TestRunner2 initialize! |