2 Feature: Summary reports
3 Warning: Assumes the time format is ISO-8601 (the default)
6 Given I have these hostgroups configured:
12 And I have these hosts:
13 | host_name | host_groups |
14 | linux-server1 | LinuxServers,MixedGroup |
15 | linux-server2 | LinuxServers |
16 | win-server1 | WindowsServers |
17 | win-server2 | WindowsServers,MixedGroup |
18 And I have these servicegroups:
19 | servicegroup_name | alias |
20 | pings | ping services plus one non-ping |
21 | empty | nothing in here |
22 And I have these services:
23 | service_description | host_name | check_command | notifications_enabled | active_checks_enabled | service_groups |
24 | System Load | linux-server1 | check_nrpe!load | 1 | 1 | |
25 | PING | linux-server1 | check_ping | 1 | 0 | pings |
26 | System Load | linux-server2 | check_nrpe!load | 1 | 1 | |
27 | PING | win-server1 | check_ping | 1 | 0 | pings |
28 | Swap Usage | win-server1 | check_swap | 1 | 0 | pings |
29 | PING | win-server2 | check_ping | 0 | 1 | pings |
30 And I have these report data entries:
31 | timestamp | event_type | flags | attrib | host_name | service_description | state | hard | retry | downtime_depth | output |
32 | 2012-01-01 12:00:02 | 701 | NULL | NULL | linux-server1 | System Load | 0 | 1 | 1 | NULL | OK - Åke Cato |
33 | 2013-01-01 12:00:00 | 100 | NULL | NULL | | | 0 | 0 | 0 | NULL | NULL |
34 | 2013-01-01 12:00:01 | 801 | NULL | NULL | win-server1 | | 0 | 1 | 1 | NULL | OK - laa-laa |
35 | 2013-01-01 12:00:02 | 801 | NULL | NULL | linux-server1 | | 0 | 1 | 1 | NULL | OK - Sven Melander |
36 | 2013-01-01 12:00:03 | 701 | NULL | NULL | win-server1 | PING | 0 | 1 | 1 | NULL | OK - po |
37 | 2013-01-01 12:00:04 | 701 | NULL | NULL | win-server1 | PING | 1 | 0 | 1 | NULL | ERROR - tinky-winky |
38 | 2013-01-01 12:00:05 | 701 | NULL | NULL | win-server1 | Swap Usage | 1 | 0 | 1 | NULL | ERROR - out of teletubbies |
39 | 2013-01-01 12:00:02 | 801 | NULL | NULL | linux-server2 | | 0 | 1 | 1 | NULL | PRETTY OK - Jon Skolmen |
41 And I have activated the configuration
43 @configuration @asmonitor @reports
44 Scenario: See that the default-custom selector works
45 Given I am on the Host details page
46 And I hover over the "Reporting" button
47 When I click "Alert Summary"
48 Then "Standard" should be checked
49 And I should see "Standard type"
50 And I should see "Items to show"
51 And I should see button "Show report"
52 And I shouldn't see "Reporting period"
53 And I shouldn't see "Host states"
54 And I shouldn't see "Available hostgroups"
55 When I choose "Custom"
56 Then I shouldn't see "Standard type"
57 And I should see "Items to show"
58 And I should see button "Show report"
59 And I should see "Reporting period"
60 And I should see "Host states"
61 When I choose "Standard"
62 Then I should see "Standard type"
63 And I should see "Items to show"
64 And I should see button "Show report"
65 And I shouldn't see "Reporting period"
66 And I shouldn't see "Host states"
68 @configuration @asmonitor @reports
69 Scenario: Generate report without objects
70 Given I am on the Host details page
71 And I hover over the "Reporting" button
72 When I click "Alert Summary"
74 And I click "Show report"
75 Then I should see "Please select what objects to base the report on"
76 And I should see "Report Settings"
78 @configuration @asmonitor @reports
79 Scenario: Generate report on empty hostgroup
80 Given I am on the Host details page
81 And I hover over the "Reporting" button
82 When I click "Alert Summary"
84 And I select "EmptyGroup" from "Available hostgroups"
85 And I doubleclick "EmptyGroup"
86 Then "Selected hostgroups" should have option "EmptyGroup"
87 And I click "Show report"
88 Then I should see "No objects could be found in your selected groups to base the report on"
89 And I should see "Report Mode"
91 @configuration @asmonitor @reports
92 Scenario: Generate report on empty servicegroup
93 Given I am on the Host details page
94 And I hover over the "Reporting" button
95 When I click "Alert Summary"
97 And I select "Servicegroups" from "Report type"
98 And I select "empty" from "Available servicegroups"
99 And I doubleclick "empty"
100 Then "Selected servicegroups" should have option "empty"
101 And I click "Show report"
102 Then I should see "No objects could be found in your selected groups to base the report on"
103 And I should see "Report Mode"
105 @configuration @asmonitor @reports
106 Scenario: Generate report for host should by default include service alerts
107 Given I am on the Host details page
108 And I hover over the "Reporting" button
109 When I click "Alert Summary"
110 And I choose "Custom"
111 And I select "Hosts" from "Report type"
112 And I select "win-server1" from "Available hosts"
113 And I doubleclick "win-server1"
114 Then "Selected hosts" should have option "win-server1"
115 When I select "Forever" from "Reporting period"
116 And I select "Most recent alerts" from "Summary type"
117 And I click "Show report"
118 Then I should see "Most recent alerts"
119 And I should see "win-server1"
120 And I should see "PING"
121 And I shouldn't see "linux-server"
122 And I shouldn't see "win-server2"
123 And I shouldn't see "System Load"
124 And I should see "Host alert"
125 And I should see "Service alert"
126 When I click "Edit settings"
127 And I select "Top alert producers" from "Summary type"
128 And I click "Show report"
129 Then I should see "Top alert producers"
130 And I should see "win-server1"
131 And I should see "PING"
132 # FIXME: would look better with a generic table content helper...
133 # The number of host alerts
135 # The number of service alerts
137 And I shouldn't see "linux-server"
138 And I shouldn't see "win-server2"
139 And I shouldn't see "System Load"
140 When I click "Edit settings"
141 And I select "Alert totals" from "Summary type"
142 And I click "Show report"
143 Then I should see "Alert totals"
144 And I should see "Host alerts for win-server1"
145 And I should see "Service alerts for win-server1"
146 # The number of host alerts
148 # The number of service alerts
150 And I shouldn't see "linux-server"
151 And I shouldn't see "win-server2"
152 And I shouldn't see "System Load"
154 @configuration @asmonitor @reports
155 Scenario: Generate multi host report
156 Given I am on the Host details page
157 And I hover over the "Reporting" button
158 When I click "Alert Summary"
159 And I choose "Custom"
160 And I select "Hosts" from "Report type"
161 And I select "win-server1" from "Available hosts"
162 And I doubleclick "win-server1"
163 And I select "linux-server1" from "Available hosts"
164 And I doubleclick "linux-server1"
165 Then "Selected hosts" should have option "win-server1"
166 When I select "Forever" from "Reporting period"
167 And I select "Top alert producers" from "Summary type"
168 And I click "Show report"
169 Then I should see "Top alert producers"
170 And I should see "win-server1"
171 And I should see "linux-server1"
172 And I should see "PING"
173 # FIXME: would look better with a generic table content helper...
176 And I shouldn't see "linux-server2"
177 And I shouldn't see "win-server2"
178 When I click "Edit settings"
179 And I select "Most recent alerts" from "Summary type"
180 And I check "Include full output"
181 And I click "Show report"
182 Then I should see "Most recent alerts"
183 And I should see "win-server1"
184 And I should see "linux-server1"
185 And I should see "PING"
186 And I shouldn't see "linux-server2"
187 And I shouldn't see "win-server2"
188 And I should see "Host alert"
189 And I should see "Service alert"
190 When I click "Edit settings"
191 And I select "Alert totals" from "Summary type"
192 And I click "Show report"
193 Then I should see "Alert totals"
194 And I should see "Host alerts for win-server1"
195 And I should see "Service alerts for win-server1"
196 And I should see "Host alerts for linux-server1"
197 And I should see "Service alerts for linux-server1"
200 And I shouldn't see "linux-server2"
201 And I shouldn't see "win-server2"
203 @configuration @asmonitor @reports
204 Scenario: Generate single service report should by default include host alerts
205 Given I am on the Host details page
206 And I hover over the "Reporting" button
207 When I click "Alert Summary"
208 And I choose "Custom"
209 And I select "Services" from "Report type"
210 And I select "win-server1;PING" from "Available services"
211 And I doubleclick "win-server1;PING"
212 Then "Selected services" should have option "win-server1;PING"
213 When I select "Forever" from "Reporting period"
214 And I select "Alert totals" from "Summary type"
215 And I click "Show report"
216 Then I should see "Alert totals"
217 And I should see "Host alerts for win-server1"
218 And I should see "Service alerts for win-server1;PING"
219 And I shouldn't see "Host alerts for win-server1;PING"
220 # The number of host alerts
222 # The number of service alerts
224 And I shouldn't see "linux-server"
225 And I shouldn't see "win-server2"
226 And I shouldn't see "System Load"
227 When I click "Edit settings"
228 And I select "Most recent alerts" from "Summary type"
229 And I click "Show report"
230 Then I should see "Most recent alerts"
231 And I should see "win-server1"
232 And I should see "PING"
233 And I shouldn't see "linux-server"
234 And I shouldn't see "win-server2"
235 And I shouldn't see "System Load"
236 And I should see "Host alert"
237 And I should see "Service alert"
238 When I click "Edit settings"
239 And I select "Top alert producers" from "Summary type"
240 And I click "Show report"
241 Then I should see "Top alert producers"
242 And I should see "win-server1"
243 And I should see "PING"
244 # The number of host alerts
246 # The number of service alerts
248 And I shouldn't see "linux-server"
249 And I shouldn't see "win-server2"
250 And I shouldn't see "System Load"
252 @configuration @asmonitor @reports
253 Scenario: Generate multi service on same host report
254 Given I am on the Host details page
255 And I hover over the "Reporting" button
256 When I click "Alert Summary"
257 And I choose "Custom"
258 And I select "Services" from "Report type"
259 And I select "win-server1;PING" from "Available services"
260 And I doubleclick "win-server1;PING"
261 And I select "win-server1;Swap Usage" from "Available services"
262 And I doubleclick "win-server1;Swap Usage"
263 Then "Selected services" should have option "win-server1;PING"
264 And "Selected services" should have option "win-server1;Swap Usage"
265 When I select "Forever" from "Reporting period"
266 And I select "Alert totals" from "Summary type"
267 And I click "Show report"
268 Then I should see "Alert totals"
269 And I should see "Host alerts for win-server1"
270 And I should see "Service alerts for win-server1;PING"
271 And I should see "Service alerts for win-server1;Swap Usage"
272 And I shouldn't see "Host alerts for win-server1;PING"
273 And I shouldn't see "Host alerts for win-server1;Swap Usage"
274 # The number of host alerts
276 # The number of service alerts
278 And I shouldn't see "linux-server"
279 And I shouldn't see "win-server2"
280 And I shouldn't see "System Load"
281 When I click "Edit settings"
282 And I select "Most recent alerts" from "Summary type"
283 And I click "Show report"
284 Then I should see "Most recent alerts"
285 And I should see "win-server1"
286 And I should see "PING"
287 And I should see "Swap Usage"
288 And I shouldn't see "linux-server"
289 And I shouldn't see "win-server2"
290 And I shouldn't see "System Load"
291 And I should see "Host alert"
292 And I should see "Service alert"
293 When I click "Edit settings"
294 And I select "Top alert producers" from "Summary type"
295 And I click "Show report"
296 Then I should see "Top alert producers"
297 And I should see "win-server1"
298 And I should see "PING"
299 And I should see "Swap Usage"
300 # The number of host alerts
302 # The number of service alerts
304 And I shouldn't see "linux-server"
305 And I shouldn't see "win-server2"
306 And I shouldn't see "System Load"
308 @configuration @asmonitor @reports
309 Scenario: Generate multi service on different host report
310 Given I am on the Host details page
311 And I hover over the "Reporting" button
312 When I click "Alert Summary"
313 And I choose "Custom"
314 And I select "Services" from "Report type"
315 And I select "linux-server1;System Load" from "Available services"
316 And I doubleclick "linux-server1;System Load"
317 And I select "win-server1;PING" from "Available services"
318 And I doubleclick "win-server1;PING"
319 Then "Selected services" should have option "linux-server1;System Load"
320 And "Selected services" should have option "win-server1;PING"
321 When I select "Forever" from "Reporting period"
322 And I select "Alert totals" from "Summary type"
323 And I click "Show report"
324 Then I should see "Alert totals"
325 And I should see "Host alerts for linux-server1"
326 And I should see "Host alerts for win-server1"
327 And I should see "Service alerts for linux-server1;System Load"
328 And I should see "Service alerts for win-server1;PING"
329 And I shouldn't see "Host alerts for linux-server1;System Load"
330 And I shouldn't see "Host alerts for win-server1;PING"
331 # The number of host alerts
333 # The number of service alerts
335 And I shouldn't see "linux-server2"
336 And I shouldn't see "win-server2"
337 And I shouldn't see "Swap Usage"
338 When I click "Edit settings"
339 And I select "Most recent alerts" from "Summary type"
340 And I click "Show report"
341 Then I should see "Most recent alerts"
342 And I should see "win-server1"
343 And I should see "linux-server1"
344 And I should see "PING"
345 And I should see "System Load"
346 And I shouldn't see "win-server2"
347 And I shouldn't see "Swap Usage"
348 And I should see "Host alert"
349 And I should see "Service alert"
350 When I click "Edit settings"
351 And I select "Top alert producers" from "Summary type"
352 And I click "Show report"
353 Then I should see "Top alert producers"
354 And I should see "win-server1"
355 And I should see "linux-server1"
356 And I should see "PING"
357 And I should see "System Load"
358 # The number of host alerts
360 # The number of service alerts
362 And I shouldn't see "linux-server2"
363 And I shouldn't see "win-server2"
364 And I shouldn't see "Swap Usage"
366 @configuration @asmonitor @reports
367 Scenario: Generate single hostgroup report
368 Given I am on the Host details page
369 And I hover over the "Reporting" button
370 When I click "Alert Summary"
371 And I choose "Custom"
372 And I select "LinuxServers" from "Available hostgroups"
373 And I doubleclick "LinuxServers"
374 Then "Selected hostgroups" should have option "LinuxServers"
375 When I select "Forever" from "Reporting period"
376 And I select "Alert totals" from "Summary type"
377 And I click "Show report"
378 Then I should see "Alert totals"
379 And I should see "Host alerts for LinuxServers"
380 And I should see "Service alerts for LinuxServers"
381 # The number of host alerts
383 # The number of service alerts
385 And I shouldn't see "PING"
386 And I shouldn't see "Swap Usage"
387 And I shouldn't see "linux-server"
388 And I shouldn't see "win-server"
389 When I click "Edit settings"
390 And I select "Most recent alerts" from "Summary type"
391 And I click "Show report"
392 Then I should see "Most recent alerts"
393 And I should see "linux-server1"
394 And I should see "linux-server2"
395 And I shouldn't see "win-server"
396 And I shouldn't see "Swap Usage"
397 And I should see "Host alert"
398 When I click "Edit settings"
399 And I select "Top alert producers" from "Summary type"
400 And I click "Show report"
401 Then I should see "Top alert producers"
402 And I should see "linux-server1"
403 And I should see "linux-server2"
404 # The number of host alerts
406 And I shouldn't see "win-server"
407 And I shouldn't see "PING"
408 And I shouldn't see "Swap Usage"
410 @configuration @asmonitor @reports
411 Scenario: Generate multi hostgroup report
412 Given I am on the Host details page
413 And I hover over the "Reporting" button
414 When I click "Alert Summary"
415 And I choose "Custom"
416 And I select "LinuxServers" from "Available hostgroups"
417 And I doubleclick "LinuxServers"
418 And I select "WindowsServers" from "Available hostgroups"
419 And I doubleclick "WindowsServers"
420 Then "Selected hostgroups" should have option "LinuxServers"
421 And "Selected hostgroups" should have option "WindowsServers"
422 When I select "Forever" from "Reporting period"
423 And I select "Alert totals" from "Summary type"
424 And I click "Show report"
425 Then I should see "Alert totals"
426 And I should see "Host alerts for LinuxServers"
427 And I should see "Service alerts for LinuxServers"
428 And I should see "Host alerts for WindowsServers"
429 And I should see "Service alerts for WindowsServers"
430 # The number of host alerts
432 # The number of service alerts
434 And I shouldn't see "PING"
435 And I shouldn't see "Swap Usage"
436 And I shouldn't see "System Load"
437 And I shouldn't see "linux-server"
438 And I shouldn't see "win-server"
439 When I click "Edit settings"
440 And I select "Most recent alerts" from "Summary type"
441 And I click "Show report"
442 Then I should see "Most recent alerts"
443 And I should see "linux-server1"
444 And I should see "linux-server2"
445 And I should see "win-server1"
446 And I should see "Swap Usage"
447 And I should see "PING"
448 And I should see "Host alert"
449 And I should see "Service alert"
450 When I click "Edit settings"
451 And I select "Top alert producers" from "Summary type"
452 And I click "Show report"
453 Then I should see "Top alert producers"
454 And I should see "linux-server1"
455 And I should see "linux-server2"
456 And I should see "win-server1"
457 And I should see "PING"
458 And I should see "Swap Usage"
459 # The number of host alerts
462 @configuration @asmonitor @reports
463 Scenario: Generate hostgroup report with overlapping members
464 Given I am on the Host details page
465 And I hover over the "Reporting" button
466 When I click "Alert Summary"
467 And I choose "Custom"
468 And I select "LinuxServers" from "Available hostgroups"
469 And I doubleclick "LinuxServers"
470 And I select "MixedGroup" from "Available hostgroups"
471 And I doubleclick "MixedGroup"
472 Then "Selected hostgroups" should have option "LinuxServers"
473 And "Selected hostgroups" should have option "MixedGroup"
474 When I select "Forever" from "Reporting period"
475 And I select "Alert totals" from "Summary type"
476 And I click "Show report"
477 Then I should see "Alert totals"
478 And I should see "Host alerts for LinuxServers"
479 And I should see "Service alerts for LinuxServers"
480 And I should see "Host alerts for MixedGroup"
481 And I should see "Service alerts for MixedGroup"
482 # The number of host alerts
484 # The number of service alerts
486 And I shouldn't see "PING"
487 And I shouldn't see "Swap Usage"
488 And I shouldn't see "System Load"
489 And I shouldn't see "linux-server"
490 And I shouldn't see "win-server"
491 When I click "Edit settings"
492 And I select "Most recent alerts" from "Summary type"
493 And I click "Show report"
494 Then I should see "Most recent alerts"
495 And I should see "linux-server1"
496 And I should see "linux-server2"
497 And I shouldn't see "PING"
498 And I shouldn't see "win-server1"
499 And I shouldn't see "Swap Usage"
500 And I should see "Host alert"
501 When I click "Edit settings"
502 And I select "Top alert producers" from "Summary type"
503 And I click "Show report"
504 Then I should see "Top alert producers"
505 And I should see "linux-server1"
506 And I should see "linux-server2"
507 And I shouldn't see "win-server1"
508 And I shouldn't see "PING"
509 And I shouldn't see "Swap Usage"
510 # The number of host alerts
513 @configuration @asmonitor @reports
514 Scenario: Generate single servicegroup report
515 Given I am on the Host details page
516 And I hover over the "Reporting" button
517 When I click "Alert Summary"
518 And I choose "Custom"
519 And I select "Servicegroups" from "Report type"
520 And I select "pings" from "Available servicegroups"
521 And I doubleclick "pings"
522 Then "Selected servicegroups" should have option "pings"
523 When I select "Forever" from "Reporting period"
524 And I select "Alert totals" from "Summary type"
525 And I click "Show report"
526 Then I should see "Alert totals"
527 And I should see "Host alerts for pings"
528 And I should see "Service alerts for pings"
529 # The number of host alerts
531 # The number of service alerts
533 And I shouldn't see "PING"
534 And I shouldn't see "Swap Usage"
535 And I shouldn't see "System Load"
536 And I shouldn't see "linux-server"
537 And I shouldn't see "win-server"
538 When I click "Edit settings"
539 And I select "Most recent alerts" from "Summary type"
540 And I click "Show report"
541 Then I should see "Most recent alerts"
542 And I should see "linux-server1"
543 And I should see "win-server1"
544 And I should see "Swap Usage"
545 And I shouldn't see "linux-server2"
546 And I shouldn't see "System Load"
547 And I should see "Host alert"
548 When I click "Edit settings"
549 And I select "Top alert producers" from "Summary type"
550 And I click "Show report"
551 Then I should see "Top alert producers"
552 And I should see "linux-server1"
553 And I should see "win-server1"
554 And I should see "PING"
555 And I should see "Swap Usage"
556 # The number of host alerts
558 And I shouldn't see "linux-server2"
559 And I shouldn't see "System Load"
561 @configuration @asmonitor @reports
562 Scenario: Generate multi servicegroup report
563 Given I am on the Host details page
564 And I hover over the "Reporting" button
565 When I click "Alert Summary"
566 And I choose "Custom"
567 And I select "Servicegroups" from "Report type"
568 And I select "pings" from "Available servicegroups"
569 And I doubleclick "pings"
570 And I select "empty" from "Available servicegroups"
571 And I doubleclick "empty"
572 Then "Selected servicegroups" should have option "pings"
573 And "Selected servicegroups" should have option "empty"
574 When I select "Forever" from "Reporting period"
575 And I select "Alert totals" from "Summary type"
576 And I click "Show report"
577 Then I should see "Alert totals"
578 And I should see "Host alerts for pings"
579 And I should see "Service alerts for pings"
580 # The number of host alerts
582 # The number of service alerts
584 And I shouldn't see "PING"
585 And I shouldn't see "Swap Usage"
586 And I shouldn't see "System Load"
587 And I shouldn't see "linux-server"
588 And I shouldn't see "win-server"
589 When I click "Edit settings"
590 And I select "Most recent alerts" from "Summary type"
591 And I click "Show report"
592 Then I should see "Most recent alerts"
593 And I should see "linux-server1"
594 And I should see "win-server1"
595 And I should see "Swap Usage"
596 And I shouldn't see "linux-server2"
597 And I shouldn't see "System Load"
598 And I should see "Host alert"
599 When I click "Edit settings"
600 And I select "Top alert producers" from "Summary type"
601 And I click "Show report"
602 Then I should see "Top alert producers"
603 And I should see "linux-server1"
604 And I should see "win-server1"
605 And I should see "PING"
606 And I should see "Swap Usage"
607 # The number of host alerts
609 And I shouldn't see "linux-server2"
610 And I shouldn't see "System Load"
612 @configuration @asmonitor @reports
613 Scenario: Generate report on custom report date
614 Given I am on the Host details page
615 And I hover over the "Reporting" button
616 When I click "Alert Summary"
617 And I choose "Custom"
618 And I select "LinuxServers" from "Available hostgroups"
619 And I doubleclick "LinuxServers"
620 Then "Selected hostgroups" should have option "LinuxServers"
621 When I select "Custom" from "Reporting period"
622 And I enter "2013-01-02" into "Start date"
623 And I enter "23:31" into "time_start"
624 And I enter "2013-04-03" into "End date"
625 And I enter "22:32" into "time_end"
626 And I select "workhours" from "Report time period"
627 And I select "Alert totals" from "Summary type"
628 And I click "Show report"
629 Then I should see "Alert totals"
630 And I should see "Reporting period: 2013-01-02 23:31:00 to 2013-04-03 22:32:00 - workhours"
631 When I click "Edit settings"
632 And I select "Most recent alerts" from "Summary type"
633 And I click "Show report"
634 Then I should see "Most recent alerts"
635 And I should see "Reporting period: 2013-01-02 23:31:00 to 2013-04-03 22:32:00 - workhours"
636 When I click "Edit settings"
637 And I select "Top alert producers" from "Summary type"
638 And I click "Show report"
639 Then I should see "Top alert producers"
640 And I should see "Reporting period: 2013-01-02 23:31:00 to 2013-04-03 22:32:00 - workhours"
642 @configuration @asmonitor @reports
643 Scenario: Save report with misc options
644 Given I am on the Host details page
645 And I hover over the "Reporting" button
646 When I click "Alert Summary"
647 And I choose "Custom"
648 And I select "LinuxServers" from "Available hostgroups"
649 And I doubleclick "LinuxServers"
650 Then "Selected hostgroups" should have option "LinuxServers"
651 # Toggle *everything*!
652 When I select "Most recent alerts" from "Summary type"
653 And I enter "50" into "Items to show"
654 And I select "Custom" from "Reporting period"
655 And I enter "2013-01-01" into "Start date"
656 And I enter "01:31" into "time_start"
657 And I enter "2013-04-03" into "End date"
658 And I enter "22:32" into "time_end"
659 And I select "workhours" from "Report time period"
660 And I select "Host alerts" from "Alert types"
661 And I select "Hard states" from "State types"
662 And I select "Host up states" from "Host states"
663 And I select "Service problem states" from "Service states"
664 And I select "pink_n_fluffy" from "Skin"
665 And I enter "This is a saved test report" into "Description"
666 And I click "Show report"
667 # I don't care where, but I want everything to be visible somehow
668 Then I should see "2013-01-01 01:31:00 to 2013-04-03 22:32:00"
669 And I should see "workhours"
670 And I should see "Hard states"
671 And I should see "Host up states"
672 And I should see "Sven Melander"
673 # Tänk på pocenten, helge!
674 And I should see "This is a saved test report"
675 When I click "Save report"
676 And I enter "saved test report" into "report_name"
677 And I click "Save report" inside "#save_report_form"
678 Then I should see "Report was successfully saved"
680 @configuration @asmonitor @reports
681 Scenario: View saved report
682 Given I am on the Host details page
683 When I hover over the "Reporting" button
684 And I click "Alert Summary"
685 Then I should see "Saved reports"
686 And "Saved reports" should have option "saved test report"
687 When I select "saved test report" from "Saved reports"
688 Then "Custom" should be checked
689 And "Selected hostgroups" should have option "LinuxServers"
690 And "Most recent alerts" should be selected from "Summary type"
691 And "Items to show" should contain "50"
692 And "Custom" should be selected from "Reporting period"
693 And "Start date" should contain "2013-01-01"
694 And "time_start" should contain "01:31"
695 And "End date" should contain "2013-04-03"
696 And "time_end" should contain "22:32"
697 And "workhours" should be selected from "Report time period"
698 And "Host alerts" should be selected from "Alert types"
699 And "Hard states" should be selected from "State types"
700 And "Host up states" should be selected from "Host states"
701 And "Service problem states" should be selected from "Service states"
702 And "pink_n_fluffy" should be selected from "Skin"
703 And "Description" should contain "This is a saved test report"
704 When I click "Show report"
705 Then I should see "2013-01-01 01:31:00 to 2013-04-03 22:32:00"
706 And I should see "workhours"
707 And I should see "Hard states"
708 And I should see "Host up states"
709 And I should see "Sven Melander"
710 And I should see "This is a saved test report"
712 @configuration @asmonitor @reports
713 Scenario: Delete previously created report
714 Given I am on the Host details page
715 And I hover over the "Reporting" button
716 When I click "Alert Summary"
717 Then I should see "Saved reports"
718 And "Saved reports" should have option "saved test report"
719 When I select "saved test report"
720 Then "Selected hostgroups" should have option "LinuxServers"
721 When I click "Delete"
722 Then "Saved reports" shouldn't have option "saved test report"
723 And "Selected hostgroups" shouldn't have option "LinuxServers"
725 # FIXME: all the standard report tests are crap, because I don't yet have
726 # a way to create alerts for the last 7 days that won't break in a week
727 @configuration @asmonitor @reports
728 Scenario: Standard Most recent hard alerts
729 Given I am on the Host details page
730 And I hover over the "Reporting" button
731 When I click "Alert Summary"
732 And I select "Most recent hard alerts" from "Standard type"
733 And I click "Show report"
734 Then I should see "Most recent alerts"
736 @configuration @asmonitor @reports
737 Scenario: Standard Most recent hard host alerts
738 Given I am on the Host details page
739 And I hover over the "Reporting" button
740 When I click "Alert Summary"
741 And I select "Most recent hard host alerts" from "Standard type"
742 And I click "Show report"
743 Then I should see "Most recent alerts"
745 @configuration @asmonitor @reports
746 Scenario: Standard Most recent hard service alerts
747 Given I am on the Host details page
748 And I hover over the "Reporting" button
749 When I click "Alert Summary"
750 And I select "Most recent hard host alerts" from "Standard type"
751 And I click "Show report"
752 Then I should see "Most recent alerts"
754 @configuration @asmonitor @reports
755 Scenario: Standard Top hard alerts
756 Given I am on the Host details page
757 And I hover over the "Reporting" button
758 When I click "Alert Summary"
759 And I select "Top hard alert producers" from "Standard type"
760 And I click "Show report"
761 Then I should see "Top alert producers"
763 @configuration @asmonitor @reports
764 Scenario: Standard Top hard host alerts
765 Given I am on the Host details page
766 And I hover over the "Reporting" button
767 When I click "Alert Summary"
768 And I select "Top hard host alert producers" from "Standard type"
769 And I click "Show report"
770 Then I should see "Top alert producers"
772 @configuration @asmonitor @reports
773 Scenario: Standard Top hard service alerts
774 Given I am on the Host details page
775 And I hover over the "Reporting" button
776 When I click "Alert Summary"
777 And I select "Top hard service alert producers" from "Standard type"
778 And I click "Show report"
779 Then I should see "Top alert producers"