1
1
package org .woehlke .simpleworklist ;
2
2
3
3
import lombok .extern .slf4j .Slf4j ;
4
- import org .junit .jupiter .api .BeforeEach ;
5
- import org .junit .jupiter .api .Test ;
4
+ import org .junit .jupiter .api .*;
6
5
import org .springframework .beans .factory .annotation .Autowired ;
7
6
import org .springframework .boot .test .context .SpringBootTest ;
8
7
import org .springframework .boot .web .server .LocalServerPort ;
9
8
import org .springframework .boot .web .servlet .context .ServletWebServerApplicationContext ;
10
9
import org .springframework .security .core .context .SecurityContextHolder ;
11
- import org .springframework .test .context .event .annotation .AfterTestClass ;
12
- import org .springframework .test .context .event .annotation .BeforeTestClass ;
13
10
import org .springframework .test .web .servlet .MockMvc ;
14
11
import org .springframework .web .context .WebApplicationContext ;
15
12
import org .woehlke .simpleworklist .config .UserAccountTestDataService ;
16
13
17
14
import java .net .URL ;
18
15
16
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
19
17
import static org .springframework .test .web .servlet .setup .MockMvcBuilders .webAppContextSetup ;
20
18
21
19
@ Slf4j
20
+ @ TestMethodOrder (MethodOrderer .OrderAnnotation .class )
21
+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
22
22
@ SpringBootTest (webEnvironment = SpringBootTest .WebEnvironment .DEFINED_PORT )
23
23
public class SmokeTests {
24
24
@@ -38,158 +38,267 @@ public class SmokeTests {
38
38
@ Autowired
39
39
private UserAccountTestDataService userAccountTestDataService ;
40
40
41
+
42
+ private final String eyecatcherH1 = "##################################################################" ;
43
+ private final String eyecatcherH2 = "------------------------------------------------------------------" ;
44
+ private final String eyecatcherH3 = "******************************************************************" ;
45
+
41
46
@ BeforeEach
42
47
public void setUp () throws Exception {
48
+ log .info (eyecatcherH1 );
43
49
log .info (" @BeforeEach setUp()" );
50
+ log .info (eyecatcherH2 );
44
51
this .base = new URL ("http://localhost:" + port + "/" );
45
52
this .mockMvc = webAppContextSetup (wac ).build ();
46
- userAccountTestDataService .setUp ();
53
+ log .info (" Server URL: " +this .base .toString ());
54
+ //userAccountTestDataService.setUp();
55
+ log .info (eyecatcherH1 );
47
56
}
48
57
49
- @ BeforeTestClass
58
+ @ BeforeAll
50
59
public void runBeforeTestClass () throws Exception {
60
+ log .info (eyecatcherH1 );
61
+ log .info (" @BeforeTestClass runBeforeTestClass" );
62
+ log .info (eyecatcherH2 );
63
+ this .base = new URL ("http://localhost:" + port + "/" );
64
+ this .mockMvc = webAppContextSetup (wac ).build ();
65
+ log .info (" Server URL: " +this .base .toString ());
66
+ log .info (eyecatcherH2 );
67
+ userAccountTestDataService .setUp ();
68
+ log .info (eyecatcherH2 );
51
69
log .info (" @BeforeTestClass runBeforeTestClass" );
70
+ log .info (eyecatcherH1 );
52
71
}
53
72
54
- @ AfterTestClass
73
+ @ AfterAll
55
74
public void runAfterTestClass () {
75
+ log .info (eyecatcherH1 );
56
76
log .info (" @AfterTestClass clearContext" );
77
+ log .info (eyecatcherH2 );
57
78
SecurityContextHolder .clearContext ();
79
+ log .info (eyecatcherH1 );
58
80
}
59
81
82
+
83
+ @ DisplayName ("Test Mock helloService + helloRepository" )
84
+ @ Order (1 )
60
85
@ Test
61
86
public void testF001ServerStarts (){
87
+ log .info (eyecatcherH1 );
62
88
log .info ("testF001ServerStarts" );
89
+ log .info (eyecatcherH2 );
90
+ log .info ("Server URL: " +this .base .toString ());
91
+ assertTrue (true );
92
+ log .info (eyecatcherH2 );
63
93
}
64
94
95
+ @ Order (2 )
65
96
@ Test
66
97
public void testF002HomePageRendered (){
98
+ log .info (eyecatcherH1 );
67
99
log .info ("testF002HomePageRendered" );
100
+ log .info (eyecatcherH2 );
101
+ log .info (eyecatcherH2 );
68
102
}
69
103
104
+ @ Order (3 )
70
105
@ Test
71
106
public void testF003Registration (){
107
+ log .info (eyecatcherH1 );
72
108
log .info ("testF003Registration" );
109
+ log .info (eyecatcherH2 );
73
110
}
74
111
112
+ @ Order (4 )
75
113
@ Test
76
114
public void testF004PasswordRecovery (){
115
+ log .info (eyecatcherH1 );
77
116
log .info ("testF004PasswordRecovery" );
117
+ log .info (eyecatcherH2 );
78
118
}
79
119
120
+ @ Order (5 )
80
121
@ Test
81
122
public void testF005Login (){
123
+ log .info (eyecatcherH1 );
82
124
log .info ("testF005Login" );
125
+ log .info (eyecatcherH2 );
83
126
}
84
127
128
+ @ Order (6 )
85
129
@ Test
86
130
public void testF006PageAfterFirstSuccessfulLogin (){
131
+ log .info (eyecatcherH1 );
87
132
log .info ("testF006PageAfterFirstSuccessfulLogins" );
133
+ log .info (eyecatcherH2 );
88
134
}
89
135
136
+ @ Order (7 )
90
137
@ Test
91
138
public void testF007AddFirstNewTaskToInbox (){
139
+ log .info (eyecatcherH1 );
92
140
log .info ("testF007AddFirstNewTaskToInbox" );
141
+ log .info (eyecatcherH2 );
93
142
}
94
143
144
+ @ Order (8 )
95
145
@ Test
96
146
public void testF008AddAnotherNewTaskToInbox (){
147
+ log .info (eyecatcherH1 );
97
148
log .info ("testF008AddAnotherNewTaskToInbox" );
149
+ log .info (eyecatcherH2 );
98
150
}
99
151
152
+ @ Order (9 )
100
153
@ Test
101
154
public void testF009AddTaskToProjectRoot (){
155
+ log .info (eyecatcherH1 );
102
156
log .info ("testF009AddTaskToProjectRoot" );
157
+ log .info (eyecatcherH2 );
103
158
}
159
+
160
+ @ Order (10 )
104
161
@ Test
105
162
public void testF010AddSubProjectToProjectRoot (){
163
+ log .info (eyecatcherH1 );
106
164
log .info ("testF010AddSubProjectToProjectRoot" );
165
+ log .info (eyecatcherH2 );
107
166
}
108
167
168
+ @ Order (11 )
109
169
@ Test
110
170
public void testF011SetFocusOfTask (){
171
+ log .info (eyecatcherH1 );
111
172
log .info ("testF011SetFocusOfTask" );
173
+ log .info (eyecatcherH2 );
112
174
}
113
175
176
+ @ Order (12 )
114
177
@ Test
115
178
public void testF012UnSetFocusOfTask (){
179
+ log .info (eyecatcherH1 );
116
180
log .info ("testF012UnSetFocusOfTask" );
181
+ log .info (eyecatcherH2 );
117
182
}
118
183
184
+ @ Order (13 )
119
185
@ Test
120
186
public void testF013ShowTaskstateInbox (){
187
+ log .info (eyecatcherH1 );
121
188
log .info ("testF013ShowTaskstateInbox" );
189
+ log .info (eyecatcherH2 );
122
190
}
123
191
192
+ @ Order (14 )
124
193
@ Test
125
194
public void testF014ShowTaskstateToday (){
195
+ log .info (eyecatcherH1 );
126
196
log .info ("testF014ShowTaskstateToday" );
197
+ log .info (eyecatcherH2 );
127
198
}
128
199
200
+ @ Order (15 )
129
201
@ Test
130
202
public void testF015ShowTaskstateNext (){
203
+ log .info (eyecatcherH1 );
131
204
log .info ("testF015ShowTaskstateNext" );
205
+ log .info (eyecatcherH2 );
132
206
}
133
207
208
+ @ Order (16 )
134
209
@ Test
135
210
public void testF016ShowTaskstateWaiting (){
211
+ log .info (eyecatcherH1 );
136
212
log .info ("testF016ShowTaskstateWaiting" );
213
+ log .info (eyecatcherH2 );
137
214
}
138
215
216
+ @ Order (17 )
139
217
@ Test
140
218
public void testF017ShowTaskstateScheduled (){
219
+ log .info (eyecatcherH1 );
141
220
log .info ("testF017ShowTaskstateScheduled" );
221
+ log .info (eyecatcherH2 );
142
222
}
143
223
224
+ @ Order (18 )
144
225
@ Test
145
226
public void testF018ShowTaskstateSomeday (){
227
+ log .info (eyecatcherH1 );
146
228
log .info ("testF018ShowTaskstateSomeday" );
229
+ log .info (eyecatcherH2 );
147
230
}
148
231
232
+ @ Order (19 )
149
233
@ Test
150
234
public void testF019ShowTaskstateFocus (){
235
+ log .info (eyecatcherH1 );
151
236
log .info ("testF019ShowTaskstateFocus" );
237
+ log .info (eyecatcherH2 );
152
238
}
153
239
240
+ @ Order (20 )
154
241
@ Test
155
242
public void testF020ShowTaskstateCompleted (){
243
+ log .info (eyecatcherH1 );
156
244
log .info ("testF020ShowTaskstateCompleted" );
245
+ log .info (eyecatcherH2 );
157
246
}
158
247
248
+ @ Order (21 )
159
249
@ Test
160
250
public void testF021ShowTaskstateTrash (){
251
+ log .info (eyecatcherH1 );
161
252
log .info ("testF021ShowTaskstateTrash" );
253
+ log .info (eyecatcherH2 );
162
254
}
163
255
256
+ @ Order (22 )
164
257
@ Test
165
258
public void testF022TaskEdit (){
259
+ log .info (eyecatcherH1 );
166
260
log .info ("testF022TaskEdit" );
261
+ log .info (eyecatcherH2 );
167
262
}
168
263
264
+ @ Order (23 )
169
265
@ Test
170
266
public void testF023TaskEditFormChangeTaskstateViaDropDown (){
267
+ log .info (eyecatcherH1 );
171
268
log .info ("testF023TaskEditFormChangeTaskstateViaDropDown" );
269
+ log .info (eyecatcherH2 );
172
270
}
173
271
272
+ @ Order (24 )
174
273
@ Test
175
274
public void testF024TaskComplete (){
275
+ log .info (eyecatcherH1 );
176
276
log .info ("testF024TaskComplete" );
277
+ log .info (eyecatcherH2 );
177
278
}
178
279
280
+ @ Order (25 )
179
281
@ Test
180
282
public void testF025TaskIncomplete (){
283
+ log .info (eyecatcherH1 );
181
284
log .info ("testF025TaskIncomplete" );
285
+ log .info (eyecatcherH2 );
182
286
}
183
287
288
+ @ Order (26 )
184
289
@ Test
185
290
public void testF026TaskDelete (){
291
+ log .info (eyecatcherH1 );
186
292
log .info ("testF026TaskDelete" );
293
+ log .info (eyecatcherH2 );
187
294
}
188
295
296
+ @ Order (27 )
189
297
@ Test
190
298
public void testF027TaskUndelete (){
299
+ log .info (eyecatcherH1 );
191
300
log .info ("testF027TaskUndelete" );
301
+ log .info (eyecatcherH2 );
192
302
}
193
303
194
-
195
304
}
0 commit comments