author | Claus Gittinger <cg@exept.de> |
Mon, 09 Jul 2001 11:28:17 +0200 | |
changeset 25 | ab09e4669864 |
parent 24 | 0f897c4468c3 |
child 26 | d37988dbad81 |
permissions | -rw-r--r-- |
0 | 1 |
"{ Package: 'stx:goodies/sunit' }" |
2 |
||
3 |
ApplicationModel subclass:#TestRunner |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
4 |
instanceVariableNames:'result lastPass defect allDefects defectMenu details mode |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
5 |
scriptModel script numberOfTestsToRun' |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
6 |
classVariableNames:'' |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
7 |
poolDictionaries:'' |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
8 |
category:'SUnit-UI' |
0 | 9 |
! |
10 |
||
11 | 11 |
|
8 | 12 |
!TestRunner class methodsFor:'defaults'! |
13 |
||
14 |
defaultIcon |
|
15 |
"This resource specification was automatically generated |
|
16 |
by the ImageEditor of ST/X." |
|
17 |
||
18 |
"Do not manually edit this!! If it is corrupted, |
|
19 |
the ImageEditor may not be able to read the specification." |
|
20 |
||
21 |
" |
|
22 |
self defaultIcon inspect |
|
23 |
ImageEditor openOnClass:self andSelector:#defaultIcon |
|
24 |
" |
|
25 |
||
26 |
<resource: #image> |
|
27 |
||
28 |
^Icon |
|
29 |
constantNamed:#'TestRunner class defaultIcon' |
|
30 |
ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
31 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O??C???????C?<O?0@@??<O??????<O?0??@@@@@@@@@@@@@@@@@@@@@BH"H"H" |
|
32 |
H"H"H#L3L0@@H"H"H"H"H"H#L3L3@@@"H"H"H"H"H#L3L3L@@BH"H"H"H"H#L3L3L0@@H"H"H"H@@@L1L3L3@@@"H"H"HO??<A@3L3L@@BH"H"HO???1@3L3 |
|
33 |
L0@@H"H"HO???1@@L3L3@@@"H"H <_?1@O@3L3L@@BH"H"C0G1@O<CL3L0@@H"H"HO@A@O?0L3L3@@@"H"H ?0@O??@3L3L@@BH"H#LO<O??@3L3L0@@H"H# |
|
34 |
L3C???@3L3L3@@@"H#L3L0@@@3L3L3L@@BH#L3L3L3L3L3L3L0@@H#L3L3L3L3L3L3L3@@@#L3L3L3L3L3L3L3L@@CL3L3L3L3L3L3L3L0@@@@@@@@@@@@@@ |
|
35 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
36 |
@@@@@@@@@@A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G?? |
|
37 |
?>A???? _???8G???>@@@@@@@@@@@@@a') ; yourself); yourself] |
|
38 |
! ! |
|
39 |
||
0 | 40 |
!TestRunner class methodsFor:'interface specs'! |
41 |
||
42 |
windowSpec |
|
43 |
"This resource specification was automatically generated |
|
44 |
by the UIPainter of ST/X." |
|
45 |
||
46 |
"Do not manually edit this!! If it is corrupted, |
|
47 |
the UIPainter may not be able to read the specification." |
|
48 |
||
49 |
" |
|
50 |
UIPainter new openOnClass:TestRunner andSelector:#windowSpec |
|
51 |
TestRunner new openInterface:#windowSpec |
|
52 |
TestRunner open |
|
53 |
" |
|
54 |
||
55 |
<resource: #canvas> |
|
56 |
||
57 |
^ |
|
58 |
#(#FullSpec |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
59 |
#name: #windowSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
60 |
#window: |
0 | 61 |
#(#WindowSpec |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
62 |
#label: 'SUnit Camp Smalltalk 2.7b TestRunner' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
63 |
#name: 'SUnit Camp Smalltalk 2.7b TestRunner' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
64 |
#min: #(#Point 362 122) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
65 |
#bounds: #(#Rectangle 16 46 509 221) |
8 | 66 |
#icon: #defaultIcon |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
67 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
68 |
#component: |
0 | 69 |
#(#SpecCollection |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
70 |
#collection: #( |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
71 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
72 |
#label: 'Refresh' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
73 |
#name: 'Button3' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
74 |
#layout: #(#LayoutFrame 0 0 0 0 75 0 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
75 |
#model: #refreshSuites |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
76 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
77 |
#(#MenuButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
78 |
#label: 'ExampleSetTest' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
79 |
#name: #tests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
80 |
#layout: #(#LayoutFrame 76 0 0 0 -216 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
81 |
#model: #script |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
82 |
#menu: #scriptModel |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
83 |
#useIndex: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
84 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
85 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
86 |
#label: 'Run' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
87 |
#name: 'Button1' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
88 |
#layout: #(#LayoutFrame -215 1 0 0 -160 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
89 |
#model: #runTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
90 |
#enableChannel: #enableRunButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
91 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
92 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
93 |
#label: 'ReRun Defects' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
94 |
#name: 'Button5' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
95 |
#layout: #(#LayoutFrame -159 1 0 0 -57 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
96 |
#model: #runDefects |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
97 |
#enableChannel: #enableRunDefectsButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
98 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
99 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
100 |
#label: 'Run All' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
101 |
#name: 'Button2' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
102 |
#layout: #(#LayoutFrame -56 1 0 0 0 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
103 |
#model: #runAllTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
104 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
105 |
#(#LabelSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
106 |
#label: 'N/A' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
107 |
#name: 'mode' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
108 |
#layout: #(#LayoutFrame 0 0 25 0 0 1 0 0.5) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
109 |
#style: #(#FontDescription #Arial #bold #roman 14) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
110 |
#labelChannel: #mode |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
111 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
112 |
#(#LabelSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
113 |
#label: '...' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
114 |
#name: 'details' |
19 | 115 |
#layout: #(#LayoutFrame 0 0 0 0.5 0 1 -25 1) |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
116 |
#labelChannel: #details |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
117 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
118 |
#(#MenuButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
119 |
#name: #defects |
10 | 120 |
#layout: #(#LayoutFrame 0 0 -24 1 -152 1 0 1) |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
121 |
#isOpaque: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
122 |
#flags: 40 |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
123 |
#model: #selectionHolder |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
124 |
#initiallyDisabled: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
125 |
#enableChannel: #enableDefectsList |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
126 |
#menu: #defectMenu |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
127 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
128 |
#(#ActionButtonSpec |
10 | 129 |
#label: 'Browse' |
130 |
#name: 'Button4' |
|
131 |
#layout: #(#LayoutFrame -151 1 -24 1 -76 1 0 1) |
|
132 |
#model: #browseSelectedTestCase |
|
133 |
#initiallyDisabled: true |
|
134 |
#enableChannel: #enableRunButton |
|
135 |
) |
|
136 |
#(#ActionButtonSpec |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
137 |
#label: 'Debug' |
10 | 138 |
#name: 'Button6' |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
139 |
#layout: #(#LayoutFrame -75 1 -24 1 0 1 0 1) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
140 |
#model: #debugSelectedFailure |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
141 |
#initiallyDisabled: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
142 |
#enableChannel: #enableDebugButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
143 |
) |
19 | 144 |
#(#ProgressIndicatorSpec |
145 |
#name: 'ProgressIndicator1' |
|
146 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 36 0) |
|
147 |
#visibilityChannel: #percentageIndicatorVisible |
|
148 |
#model: #percentageDone |
|
149 |
#foregroundColor: #(#Color 32.9992 32.9992 0.0) |
|
150 |
#backgroundColor: #(#Color 66.9993 66.9993 0.0) |
|
151 |
#showPercentage: false |
|
152 |
) |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
153 |
) |
0 | 154 |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
155 |
) |
0 | 156 |
) |
157 |
! ! |
|
158 |
||
159 |
!TestRunner class methodsFor:'opening'! |
|
160 |
||
161 |
open |
|
162 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
163 |
^super open |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
164 |
! |
5 | 165 |
|
166 |
openOnTestCase:aTestCaseSubclass |
|
167 |
|runner idx| |
|
168 |
||
169 |
runner := self new. |
|
170 |
runner open. |
|
171 |
runner window waitUntilVisible. |
|
15 | 172 |
|
5 | 173 |
idx := runner scriptModel value indexOf:aTestCaseSubclass name. |
174 |
runner script value:idx. |
|
175 |
||
176 |
" |
|
177 |
self openOnTestCase:CompilerTest |
|
178 |
" |
|
179 |
! ! |
|
0 | 180 |
|
181 |
!TestRunner class methodsFor:'plugIn spec'! |
|
182 |
||
183 |
aspectSelectors |
|
184 |
"This resource specification was automatically generated |
|
185 |
by the UIPainter of ST/X." |
|
186 |
||
187 |
"Do not manually edit this. If it is corrupted, |
|
188 |
the UIPainter may not be able to read the specification." |
|
189 |
||
190 |
"Return a description of exported aspects; |
|
191 |
these can be connected to aspects of an embedding application |
|
192 |
(if this app is embedded in a subCanvas)." |
|
193 |
||
194 |
^ #( |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
195 |
#script |
0 | 196 |
). |
197 |
||
198 |
! ! |
|
199 |
||
200 |
!TestRunner methodsFor:'Accessing'! |
|
201 |
||
202 |
defectMenu |
|
203 |
"automatically generated by UIPainter ..." |
|
204 |
||
205 |
"*** the code below creates a default model when invoked." |
|
206 |
"*** (which may not be the one you wanted)" |
|
207 |
"*** Please change as required and accept it in the browser." |
|
208 |
||
209 |
^defectMenu isNil |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
210 |
ifTrue: [defectMenu := OrderedCollection new asValue] |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
211 |
ifFalse: [defectMenu] |
0 | 212 |
|
213 |
"Modified: / 4.4.2000 / 20:00:31 / Sames" |
|
214 |
! |
|
215 |
||
216 |
defects |
|
217 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
218 |
^self builder componentAt: #defects |
0 | 219 |
|
220 |
"Created: / 21.6.2000 / 12:19:29 / Sames" |
|
221 |
! |
|
222 |
||
223 |
details |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
224 |
"This method was generated by UIDefiner. Any edits made here |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
225 |
may be lost whenever methods are automatically defined. The |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
226 |
initialization provided below may have been preempted by an |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
227 |
initialize method." |
0 | 228 |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
229 |
^details isNil |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
230 |
ifTrue: |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
231 |
[details := '...' asValue] |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
232 |
ifFalse: |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
233 |
[details] |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
234 |
! |
0 | 235 |
|
236 |
mode |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
237 |
"This method was generated by UIDefiner. Any edits made here |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
238 |
may be lost whenever methods are automatically defined. The |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
239 |
initialization provided below may have been preempted by an |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
240 |
initialize method." |
0 | 241 |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
242 |
^mode isNil |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
243 |
ifTrue: |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
244 |
[mode := 'N/A' asValue] |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
245 |
ifFalse: |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
246 |
[mode] |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
247 |
! |
0 | 248 |
|
19 | 249 |
percentageDone |
250 |
|holder| |
|
251 |
||
252 |
(holder := builder bindingAt:#percentageDone) isNil ifTrue:[ |
|
253 |
holder := 0 asValue. |
|
254 |
builder aspectAt:#percentageDone put:holder. |
|
255 |
]. |
|
256 |
^ holder. |
|
257 |
! |
|
258 |
||
259 |
percentageIndicatorVisible |
|
260 |
|holder| |
|
261 |
||
262 |
(holder := builder bindingAt:#percentageIndicatorVisible) isNil ifTrue:[ |
|
263 |
holder := false asValue. |
|
264 |
builder aspectAt:#percentageIndicatorVisible put:holder. |
|
265 |
]. |
|
266 |
^ holder. |
|
267 |
! |
|
268 |
||
0 | 269 |
script |
270 |
"automatically generated by UIPainter ..." |
|
271 |
||
272 |
"*** the code below creates a default model when invoked." |
|
273 |
"*** (which may not be the one you wanted)" |
|
274 |
"*** Please change as required and accept it in the browser." |
|
275 |
||
276 |
|holder| |
|
277 |
||
278 |
(holder := builder bindingAt:#script) isNil ifTrue:[ |
|
11 | 279 |
holder := ValueHolder new. |
280 |
builder aspectAt:#script put:holder. |
|
281 |
holder onChangeSend:#scriptSelectionChanged to:self. |
|
0 | 282 |
"/ holder addDependent:self. |
283 |
]. |
|
284 |
^ holder. |
|
285 |
||
286 |
"Created: / 21.6.2000 / 12:04:36 / Sames" |
|
287 |
! |
|
288 |
||
289 |
script:something |
|
290 |
"automatically generated by UIPainter ..." |
|
291 |
||
292 |
"This method is used when I am embedded as subApplication," |
|
293 |
"and the mainApp wants to connect its aspects to mine." |
|
294 |
||
295 |
"/ |holder| |
|
296 |
||
297 |
"/ (holder := builder bindingAt:#script) notNil ifTrue:[ |
|
298 |
"/ holder removeDependent:self. |
|
299 |
"/ ]. |
|
300 |
builder aspectAt:#script put:something. |
|
301 |
"/ something notNil ifTrue:[ |
|
302 |
"/ something addDependent:self. |
|
303 |
"/ ]. |
|
304 |
^ self. |
|
305 |
||
306 |
"Created: / 21.6.2000 / 12:04:36 / Sames" |
|
307 |
! |
|
308 |
||
309 |
scriptModel |
|
310 |
"This method was generated by UIDefiner. Any edits made here |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
311 |
may be lost whenever methods are automatically defined. The |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
312 |
initialization provided below may have been preempted by an |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
313 |
initialize method." |
0 | 314 |
|
315 |
^scriptModel isNil |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
316 |
ifTrue: [scriptModel := (TestCase allSubclasses collect: [:each | each name]) asValue] |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
317 |
ifFalse: [scriptModel] |
0 | 318 |
|
319 |
"Modified: / 2.4.2000 / 14:37:51 / Sames" |
|
320 |
! |
|
321 |
||
322 |
selection |
|
323 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
324 |
^defect |
0 | 325 |
|
326 |
"Created: / 4.4.2000 / 18:50:55 / Sames" |
|
327 |
! |
|
328 |
||
329 |
selectionHolder |
|
330 |
"automatically generated by UIPainter ..." |
|
331 |
||
332 |
"*** the code below creates a default model when invoked." |
|
333 |
"*** (which may not be the one you wanted)" |
|
334 |
"*** Please change as required and accept it in the browser." |
|
335 |
||
336 |
|holder| |
|
337 |
||
338 |
(holder := builder bindingAt:#selectionHolder) isNil ifTrue:[ |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
339 |
holder := AspectAdaptor new subject:self; forAspect:#selection. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
340 |
builder aspectAt:#selectionHolder put:holder. |
0 | 341 |
"/ holder addDependent:self. |
342 |
]. |
|
343 |
^ holder. |
|
344 |
||
345 |
"Created: / 4.4.2000 / 18:46:08 / Sames" |
|
346 |
"Modified: / 4.4.2000 / 18:47:31 / Sames" |
|
347 |
! |
|
348 |
||
349 |
tests |
|
350 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
351 |
^self builder componentAt: #tests |
0 | 352 |
|
353 |
"Created: / 4.4.2000 / 19:57:37 / Sames" |
|
354 |
! ! |
|
355 |
||
356 |
!TestRunner methodsFor:'Actions'! |
|
357 |
||
10 | 358 |
browseSelectedTestCase |
359 |
|testCaseName testCase| |
|
360 |
||
361 |
testCaseName := self scriptModel value at:(self script value). |
|
362 |
testCase := Smalltalk at:testCaseName asSymbol. |
|
363 |
testCase notNil ifTrue:[ |
|
16 | 364 |
(UserPreferences current systemBrowserClass openInClass:testCase) |
365 |
selectProtocolsMatching:'*' |
|
10 | 366 |
] |
367 |
! |
|
368 |
||
0 | 369 |
debugSelectedFailure |
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
370 |
self debugTest: self selection |
0 | 371 |
|
372 |
"Created: / 21.6.2000 / 10:58:58 / Sames" |
|
373 |
"Modified: / 21.6.2000 / 12:21:05 / Sames" |
|
374 |
! |
|
375 |
||
376 |
debugTest: aTestCaseName |
|
377 |
| testCase | |
|
378 |
defect := aTestCaseName. |
|
379 |
testCase := allDefects at: aTestCaseName ifAbsent: [nil]. |
|
380 |
testCase isNil ifTrue: [^self enableDebugButton value: false]. |
|
381 |
self enableDebugButton value: true. |
|
382 |
self displayMode: 'Debugging'. |
|
383 |
(result isFailure: testCase) |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
384 |
ifTrue: [testCase debugAsFailure] |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
385 |
ifFalse: [testCase debug] |
0 | 386 |
|
387 |
"Modified: / 21.6.2000 / 12:12:09 / Sames" |
|
388 |
! |
|
389 |
||
390 |
enableDebugButton |
|
391 |
"automatically generated by UIPainter ..." |
|
392 |
"*** the code below creates a default model when invoked." |
|
393 |
"*** (which may not be the one you wanted)" |
|
394 |
"*** Please change as required and accept it in the browser." |
|
395 |
||
396 |
| holder | |
|
397 |
(holder := builder bindingAt: #enableDebugButton) isNil |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
398 |
ifTrue: |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
399 |
[holder := true asValue. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
400 |
builder aspectAt: #enableDebugButton put: holder |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
401 |
" holder addDependent:self."]. |
0 | 402 |
^holder |
403 |
||
404 |
"Created: / 21.6.2000 / 10:47:34 / Sames" |
|
405 |
"Modified: / 21.6.2000 / 10:51:07 / Sames" |
|
406 |
! |
|
407 |
||
408 |
enableDefectsList |
|
409 |
"automatically generated by UIPainter ..." |
|
410 |
||
411 |
"*** the code below creates a default model when invoked." |
|
412 |
"*** (which may not be the one you wanted)" |
|
413 |
"*** Please change as required and accept it in the browser." |
|
414 |
||
415 |
|holder| |
|
416 |
||
417 |
(holder := builder bindingAt:#enableDefectsList) isNil ifTrue:[ |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
418 |
holder := true asValue. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
419 |
builder aspectAt:#enableDefectsList put:holder. |
0 | 420 |
"/ holder addDependent:self. |
421 |
]. |
|
422 |
^ holder. |
|
423 |
||
424 |
"Created: / 21.6.2000 / 10:47:34 / Sames" |
|
425 |
! |
|
426 |
||
427 |
enableRunButton |
|
428 |
"automatically generated by UIPainter ..." |
|
429 |
||
430 |
"*** the code below creates a default model when invoked." |
|
431 |
"*** (which may not be the one you wanted)" |
|
432 |
"*** Please change as required and accept it in the browser." |
|
433 |
||
434 |
|holder| |
|
435 |
||
436 |
(holder := builder bindingAt:#enableRunButton) isNil ifTrue:[ |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
437 |
holder := true asValue. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
438 |
builder aspectAt:#enableRunButton put:holder. |
0 | 439 |
"/ holder addDependent:self. |
440 |
]. |
|
441 |
^ holder. |
|
442 |
||
443 |
"Created: / 21.6.2000 / 10:47:34 / Sames" |
|
444 |
! |
|
445 |
||
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
446 |
enableRunDefectsButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
447 |
"automatically generated by UIPainter ..." |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
448 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
449 |
"*** the code below creates a default model when invoked." |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
450 |
"*** (which may not be the one you wanted)" |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
451 |
"*** Please change as required and accept it in the browser." |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
452 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
453 |
|holder| |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
454 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
455 |
(holder := builder bindingAt:#enableRunDefectsButton) isNil ifTrue:[ |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
456 |
holder := true asValue. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
457 |
builder aspectAt:#enableRunDefectsButton put:holder. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
458 |
"/ holder addDependent:self. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
459 |
]. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
460 |
^ holder. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
461 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
462 |
|
0 | 463 |
refreshSuites |
24
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
464 |
self updateSuitesList. |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
465 |
self script value:nil. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
466 |
self tests selection: 0. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
467 |
self defects selection: 0. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
468 |
result := TestResult new. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
469 |
self displayRefresh |
0 | 470 |
|
471 |
"Created: / 21.6.2000 / 10:58:34 / Sames" |
|
472 |
"Modified: / 21.6.2000 / 12:19:54 / Sames" |
|
473 |
! |
|
474 |
||
475 |
runAllTests |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
476 |
self runSuite: self allTestSuite |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
477 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
478 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
479 |
runDefectTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
480 |
| testSuite | |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
481 |
(testSuite := self defectTestSuite) notNil ifTrue: |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
482 |
[self runSuite: testSuite] |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
483 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
484 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
485 |
runDefects |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
486 |
allDefects size > 0 ifTrue:[ |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
487 |
^ self runDefectTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
488 |
]. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
489 |
self runTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
490 |
! |
0 | 491 |
|
492 |
runSuite: aTestSuite |
|
19 | 493 |
|numTests| |
494 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
495 |
"/ count the number of individual tests |
19 | 496 |
numTests := 0. |
20 | 497 |
aTestSuite tests do:[:eachTestOrSubSuite | |
498 |
(eachTestOrSubSuite isKindOf:TestSuite) ifTrue:[ |
|
499 |
numTests := numTests + eachTestOrSubSuite tests size. |
|
500 |
] ifFalse:[ |
|
501 |
numTests := numTests + 1. |
|
502 |
] |
|
19 | 503 |
]. |
504 |
numberOfTestsToRun := numTests. |
|
505 |
self percentageDone value:0. |
|
506 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
507 |
Cursor |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
508 |
wait |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
509 |
showWhile:[ |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
510 |
self displayRunning. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
511 |
aTestSuite addDependentToHierachy: self. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
512 |
result := TestResult new. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
513 |
self showPercentageIndicator. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
514 |
|
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
515 |
[ |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
516 |
aTestSuite run:result |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
517 |
] ensure: [ |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
518 |
aTestSuite removeDependentFromHierachy: self. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
519 |
self hidePercentageIndicator. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
520 |
self displayNormalColorInProgress. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
521 |
]. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
522 |
self updateWindow |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
523 |
] |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
524 |
! |
0 | 525 |
|
526 |
runTests |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
527 |
| testSuite | |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
528 |
(testSuite := self freshTestSuite) notNil ifTrue: |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
529 |
[self runSuite: testSuite] |
0 | 530 |
|
531 |
"Modified: / 2.4.2000 / 14:16:10 / Sames" |
|
532 |
! |
|
533 |
||
11 | 534 |
scriptSelectionChanged |
15 | 535 |
self enableRunButton value:(self script value notNil). |
11 | 536 |
! |
537 |
||
0 | 538 |
selection: aValue |
539 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
540 |
self debugTest: aValue |
0 | 541 |
|
542 |
"Created: / 4.4.2000 / 18:54:09 / Sames" |
|
543 |
"Modified: / 4.4.2000 / 19:01:33 / Sames" |
|
544 |
! |
|
545 |
||
546 |
suiteSelectionChanged |
|
8 | 547 |
|ok className description cls| |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
548 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
549 |
self enableRunButton value:(ok := self freshTestSuite notNil). |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
550 |
self enableRunDefectsButton value:(ok and:[allDefects size > 0]). |
0 | 551 |
|
8 | 552 |
self script value notNil ifTrue:[ |
553 |
className := self scriptModel value at:(self script value) ifAbsent:nil. |
|
554 |
(ok and:[className notNil]) ifTrue:[ |
|
555 |
cls := Smalltalk at:className. |
|
17 | 556 |
(cls class implements:#description) ifTrue:[ |
557 |
description := cls description. |
|
8 | 558 |
] |
559 |
]. |
|
560 |
]. |
|
17 | 561 |
self displayDetails:nil. |
562 |
self displayMode: (description ? ''). |
|
563 |
self displayGray. |
|
8 | 564 |
|
0 | 565 |
"Created: / 21.6.2000 / 11:31:25 / Sames" |
566 |
"Modified: / 21.6.2000 / 11:32:54 / Sames" |
|
24
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
567 |
! |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
568 |
|
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
569 |
updateSuitesList |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
570 |
self scriptModel value: (TestCase allSubclasses collect: [:each | each name]) sort. |
0 | 571 |
! ! |
572 |
||
573 |
!TestRunner methodsFor:'Private'! |
|
574 |
||
575 |
allTestSuite |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
576 |
| tokens stream | |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
577 |
tokens := (TestCase subclasses collect: [:each | each name , '* ']) |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
578 |
copyWithout: 'SUnitTest* '. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
579 |
stream := WriteStream on: String new. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
580 |
tokens do: [:each | stream nextPutAll: each]. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
581 |
^TestSuitesScripter run: stream contents |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
582 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
583 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
584 |
defectTestSuite |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
585 |
|suite| |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
586 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
587 |
suite := TestSuite new. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
588 |
allDefects keysAndValuesDo:[:nm :test | |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
589 |
suite addTest:test. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
590 |
]. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
591 |
^suite |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
592 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
593 |
! |
0 | 594 |
|
595 |
formatTime: aTime |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
596 |
aTime hours > 0 ifTrue: [^aTime hours printString , 'h']. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
597 |
aTime minutes > 0 ifTrue: [^aTime minutes printString , 'min']. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
598 |
^aTime seconds printString , ' sec' |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
599 |
! |
0 | 600 |
|
601 |
freshTestSuite |
|
602 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
603 |
^TestSuitesScripter run: self tests contents |
0 | 604 |
|
605 |
"Modified: / 4.4.2000 / 20:13:41 / Sames" |
|
606 |
! |
|
607 |
||
608 |
postOpenWith: aBuilder |
|
609 |
"automatically generated by UIPainter ..." |
|
610 |
||
611 |
super postOpenWith: aBuilder. |
|
612 |
self tests defaultLabel: ''. |
|
11 | 613 |
"/ self tests selection: 'ExampleSetTest'. self script value:1. |
15 | 614 |
|
615 |
self enableRunButton value: (self script value notNil). |
|
10 | 616 |
self enableRunDefectsButton value: false. |
0 | 617 |
self enableDebugButton value: false. |
618 |
self enableDefectsList value: false. |
|
24
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
619 |
self script onChangeSend: #suiteSelectionChanged to:self. |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
620 |
|
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
621 |
Smalltalk addDependent:self. |
0 | 622 |
|
623 |
"Created: / 2.4.2000 / 14:44:32 / Sames" |
|
624 |
"Modified: / 21.6.2000 / 12:06:30 / Sames" |
|
625 |
! |
|
626 |
||
24
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
627 |
release |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
628 |
Smalltalk removeDependent:self. |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
629 |
super release. |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
630 |
! |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
631 |
|
0 | 632 |
timeSinceLastPassAsString |
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
633 |
lastPass isNil ifTrue: [^'']. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
634 |
^', ' , (self formatTime: (Time now subtractTime: lastPass getSeconds)) , ' since last Pass' |
0 | 635 |
|
636 |
"Modified: / 3.4.2000 / 19:17:11 / Sames" |
|
637 |
! ! |
|
638 |
||
639 |
!TestRunner methodsFor:'Updating'! |
|
640 |
||
641 |
displayColor: aColorValue |
|
642 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
643 |
(builder componentAt: #mode) widget insideColor: aColorValue. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
644 |
(builder componentAt: #details) widget insideColor: aColorValue. |
0 | 645 |
|
646 |
"Modified: / 2.4.2000 / 14:21:42 / Sames" |
|
647 |
! |
|
648 |
||
649 |
displayDefault |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
650 |
self displayColor: self tests backgroundColor |
0 | 651 |
|
652 |
"Created: / 21.6.2000 / 12:28:06 / Sames" |
|
653 |
"Modified: / 21.6.2000 / 12:35:09 / Sames" |
|
654 |
! |
|
655 |
||
656 |
displayDefects: aCollection |
|
657 |
| menuButton | |
|
658 |
menuButton := self builder componentAt: #defects. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
659 |
aCollection isEmpty ifTrue: [ |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
660 |
menuButton disable. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
661 |
self enableRunDefectsButton value:false. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
662 |
^ self |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
663 |
]. |
0 | 664 |
allDefects := Dictionary new. |
665 |
aCollection do: [:each | allDefects at: each printString put: each]. |
|
21 | 666 |
self defectMenu value: allDefects keys asOrderedCollection sort. |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
667 |
menuButton enable. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
668 |
self enableRunDefectsButton value:(allDefects size > 0). |
0 | 669 |
|
670 |
"Modified: / 4.4.2000 / 20:11:06 / Sames" |
|
671 |
! |
|
672 |
||
673 |
displayDetails: aString |
|
19 | 674 |
self details value: aString. |
675 |
self windowGroup repairDamage. |
|
0 | 676 |
|
677 |
"Modified: / 21.6.2000 / 11:10:14 / Sames" |
|
678 |
! |
|
679 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
680 |
displayErrorColorInProgress |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
681 |
(self builder componentAt:#ProgressIndicator1) |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
682 |
foregroundColor: (Color red:33 green:0 blue:0). |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
683 |
|
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
684 |
"/ (self builder componentAt:#ProgressIndicator1) |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
685 |
"/ backgroundColor: (Color red:67 green:0 blue:0) |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
686 |
! |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
687 |
|
0 | 688 |
displayFail |
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
689 |
self displayRed. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
690 |
self displayMode: 'Fail'. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
691 |
self displayDetails: result printString. |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
692 |
! |
0 | 693 |
|
17 | 694 |
displayGray |
695 |
self displayColor: (View defaultViewBackgroundColor) |
|
696 |
! |
|
697 |
||
0 | 698 |
displayGreen |
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
699 |
self displayColor: ColorValue green |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
700 |
! |
0 | 701 |
|
702 |
displayMode: aString |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
703 |
self mode value: aString |
0 | 704 |
|
705 |
"Modified: / 21.6.2000 / 11:14:19 / Sames" |
|
706 |
! |
|
707 |
||
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
708 |
displayNormalColorInProgress |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
709 |
(self builder componentAt:#ProgressIndicator1) |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
710 |
foregroundColor: (Color red:33 green:33 blue:0); |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
711 |
backgroundColor: (Color red:67 green:67 blue:0) |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
712 |
! |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
713 |
|
0 | 714 |
displayPass |
715 |
self displayMode: 'Pass'. |
|
716 |
self displayDetails: result runCount printString , ' run' , self timeSinceLastPassAsString. |
|
717 |
self displayGreen. |
|
718 |
lastPass := Time now |
|
719 |
||
720 |
"Modified: / 21.6.2000 / 12:14:52 / Sames" |
|
721 |
! |
|
722 |
||
723 |
displayRed |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
724 |
self displayColor: ColorValue red. |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
725 |
! |
0 | 726 |
|
727 |
displayRefresh |
|
728 |
self displayMode: 'N/A'. |
|
729 |
self displayDetails:'...'. |
|
730 |
self updateDefects. |
|
731 |
self enableRunButton value: false. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
732 |
self enableRunDefectsButton value: false. |
0 | 733 |
self enableDebugButton value: false. |
734 |
self displayDefault |
|
735 |
||
736 |
"Created: / 21.6.2000 / 12:14:11 / Sames" |
|
737 |
"Modified: / 21.6.2000 / 12:28:24 / Sames" |
|
738 |
! |
|
739 |
||
740 |
displayRunning |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
741 |
self displayYellow. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
742 |
self displayMode: 'running'. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
743 |
self displayDetails: '...'. |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
744 |
! |
0 | 745 |
|
746 |
displayYellow |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
747 |
self displayColor: ColorValue yellow |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
748 |
! |
0 | 749 |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
750 |
hidePercentageIndicator |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
751 |
self percentageIndicatorVisible value:false. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
752 |
! |
24
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
753 |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
754 |
showPercentageIndicator |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
755 |
self percentageIndicatorVisible value:true. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
756 |
! |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
757 |
|
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
758 |
update: anObject |
24
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
759 |
changedObject == Smalltalk ifTrue:[ |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
760 |
(anArgument isBehavior and:[anArgument isSubclassOf:TestCase]) ifTrue:[ |
0f897c4468c3
automatic update, when new testCase classes arrive,
Claus Gittinger <cg@exept.de>
parents:
23
diff
changeset
|
761 |
self updateSuitesList |
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
762 |
]. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
763 |
^ self |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
764 |
]. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
765 |
|
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
766 |
(anObject isKindOf: TestCase) ifTrue: [ |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
767 |
(result errorCount + result failureCount) > 0 ifTrue:[ |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
768 |
self displayErrorColorInProgress. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
769 |
]. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
770 |
self percentageDone value:(result runCount / numberOfTestsToRun * 100) rounded. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
771 |
self displayDetails: anObject printString |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
772 |
^ self |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
773 |
]. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
774 |
|
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
775 |
super update: anObject |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
776 |
! |
0 | 777 |
|
778 |
updateDefects |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
779 |
self displayDefects: result defects |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
780 |
! |
0 | 781 |
|
782 |
updateWindow |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
783 |
result hasPassed |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
784 |
ifTrue: [self displayPass] |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
785 |
ifFalse: [self displayFail]. |
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
786 |
self updateDefects |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
787 |
! ! |
0 | 788 |
|
11 | 789 |
!TestRunner class methodsFor:'documentation'! |
790 |
||
791 |
version |
|
25
ab09e4669864
change progressindicators color to red, when an error occurs.
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
792 |
^ '$Header: /cvs/stx/stx/goodies/sunit/TestRunner.st,v 1.15 2001-07-09 09:28:17 cg Exp $' |
11 | 793 |
! ! |