soda 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/SodaReporter.rb CHANGED
@@ -104,8 +104,15 @@ class SodaReporter
104
104
  end
105
105
 
106
106
  FileUtils.mkdir_p(@ResultsDir)
107
-
108
107
  @path = "#{@ResultsDir}/#{base_testfile_name}"
108
+
109
+ if (File.exist?("#{@path}.tmp") || File.exist?("#{@path}.log") )
110
+ t = Time.now()
111
+ t = t.strftime("%Y%m%d%H%M%S")
112
+ base_testfile_name << "-#{t}"
113
+ @path = "#{@ResultsDir}/#{base_testfile_name}"
114
+ end
115
+
109
116
  if (@path =~ /sugarinit/i)
110
117
  @log_filename = "#{@path}-#{hostname}.tmp"
111
118
  @htmllog_filename = "#{@ResultsDir}/Report-#{base_testfile_name}"+
@@ -156,7 +163,8 @@ class SodaReporter
156
163
  'Test Warning Count' => @test_warning_count,
157
164
  'Test Event Count' => @total,
158
165
  'Test Start Time' => @start_time,
159
- 'Test Stop Time' => @end_time
166
+ 'Test Stop Time' => @end_time,
167
+ 'Test Log File' => @log_filename
160
168
  }
161
169
 
162
170
  return results
@@ -671,14 +679,7 @@ class SodaReporter
671
679
  "--Test Assert Failures:#{@assertFails_count}" +
672
680
  "--Test Event Count:#{@total}" +
673
681
  "--Test Assert Count:#{@asserts_count}" +
674
- "--Test Exceptions:#{@exception_count}" +
675
- "--Test Count:#{@test_count}" +
676
- "--Test Skip Count:#{@test_skip_count}" +
677
- "--Test Blocked Count:#{@test_blocked_count}" +
678
- "--Test Failed Count:#{@test_failed_count}" +
679
- "--Test Passed Count:#{@test_passed_count}" +
680
- "--Test WatchDog Count:#{@test_watchdog_count}"+
681
- "--Test Warning Count:#{@test_warning_count}\n"
682
+ "--Test Exceptions:#{@exception_count}\n"
682
683
  log(msg)
683
684
  end
684
685
 
@@ -42,7 +42,7 @@ class SodaSuiteSummary
42
42
  # This is the class constructor. Really this does all the needed work.
43
43
  #
44
44
  # Params:
45
- # dir: This is the dorectory with raw soda logs in it.
45
+ # dir: This is the directory with raw soda logs in it.
46
46
  # outfile: This is the new summery html file to create.
47
47
  # create_links: This will create links to the soda report files in the
48
48
  # summery.
@@ -125,14 +125,22 @@ def GetLogFiles(dir)
125
125
  end
126
126
 
127
127
  files = File.join("#{dir}", "*.xml")
128
- files = Dir.glob(files)
129
- files = files.sort()
128
+ files = Dir.glob(files).sort_by{|f| File.stat(f).mtime}
129
+
130
130
  return files
131
131
  end
132
132
 
133
133
  private :GetLogFiles
134
134
 
135
135
  ###############################################################################
136
+ # GetTestInfo -- method
137
+ # This method reads the suite xml report and converts it into a hash.
138
+ #
139
+ # Input:
140
+ # kids: The XML node for the <test> element.
141
+ #
142
+ # Output:
143
+ # returns a hash of data.
136
144
  #
137
145
  ###############################################################################
138
146
  def GetTestInfo(kids)
@@ -161,6 +169,7 @@ end
161
169
  ###############################################################################
162
170
  def GenerateReportData(files)
163
171
  test_info = {}
172
+ test_info_list = []
164
173
 
165
174
  files.each do |f|
166
175
  print "(*)Opening file: #{f}\n"
@@ -195,6 +204,7 @@ def GenerateReportData(files)
195
204
 
196
205
  base_name = File.basename(tmp_hash['suitefile'])
197
206
  test_info[base_name] = tmp_hash
207
+ test_info_list.push(tmp_hash)
198
208
  end
199
209
  end
200
210
 
@@ -246,542 +256,542 @@ def GenHtmlReport(data, reportfile, create_links = false)
246
256
  <style type="text/css">
247
257
 
248
258
  .highlight {
249
- background-color: #8888FF;
259
+ background-color: #8888FF;
250
260
  }
251
261
 
252
262
  .unhighlight {
253
- background: #FFFFFF;
263
+ background: #FFFFFF;
254
264
  }
255
265
 
256
266
  .td_header_master {
257
- whitw-space: nowrap;
258
- background: #99CCFF;
259
- text-align: center;
260
- font-family: Arial;
261
- font-weight: bold;
262
- font-size: 12px;
263
- border-left: 0px solid black;
264
- border-right: 2px solid black;
265
- border-bottom: 2px solid black;
267
+ whitw-space: nowrap;
268
+ background: #99CCFF;
269
+ text-align: center;
270
+ font-family: Arial;
271
+ font-weight: bold;
272
+ font-size: 12px;
273
+ border-left: 0px solid black;
274
+ border-right: 2px solid black;
275
+ border-bottom: 2px solid black;
266
276
  }
267
277
 
268
278
  .td_header_sub {
269
- whitw-space: nowrap;
270
- background: #99CCFF;
271
- text-align: center;
272
- font-family: Arial;
273
- font-weight: bold;
274
- font-size: 12px;
275
- border-left: 1px solid black;
276
- border-right: 0px solid black;
277
- border-bottom: 2px solid black;
279
+ whitw-space: nowrap;
280
+ background: #99CCFF;
281
+ text-align: center;
282
+ font-family: Arial;
283
+ font-weight: bold;
284
+ font-size: 12px;
285
+ border-left: 1px solid black;
286
+ border-right: 0px solid black;
287
+ border-bottom: 2px solid black;
278
288
  }
279
289
 
280
290
  .td_header_skipped {
281
- whitw-space: nowrap;
282
- background: #99CCFF;
283
- text-align: center;
284
- font-family: Arial;
285
- font-weight: bold;
286
- font-size: 12px;
287
- border-left: 1px solid black;
288
- border-right: 2px solid black;
289
- border-bottom: 2px solid black;
291
+ whitw-space: nowrap;
292
+ background: #99CCFF;
293
+ text-align: center;
294
+ font-family: Arial;
295
+ font-weight: bold;
296
+ font-size: 12px;
297
+ border-left: 1px solid black;
298
+ border-right: 2px solid black;
299
+ border-bottom: 2px solid black;
290
300
  }
291
301
 
292
302
  .td_header_watchdog {
293
- whitw-space: nowrap;
294
- background: #99CCFF;
295
- text-align: center;
296
- font-family: Arial;
297
- font-weight: bold;
298
- font-size: 12px;
299
- border-left: 0px solid black;
300
- border-right: 0px solid black;
301
- border-bottom: 2px solid black;
303
+ whitw-space: nowrap;
304
+ background: #99CCFF;
305
+ text-align: center;
306
+ font-family: Arial;
307
+ font-weight: bold;
308
+ font-size: 12px;
309
+ border-left: 0px solid black;
310
+ border-right: 0px solid black;
311
+ border-bottom: 2px solid black;
302
312
  }
303
313
 
304
314
  table {
305
- width: 100%;
306
- border: 2px solid black;
307
- border-collapse: collapse;
308
- padding: 0px;
309
- background: #FFFFFF;
315
+ width: 100%;
316
+ border: 2px solid black;
317
+ border-collapse: collapse;
318
+ padding: 0px;
319
+ background: #FFFFFF;
310
320
  }
311
321
 
312
322
  .td_file_data {
313
- whitw-space: nowrap;
314
- text-align: left;
315
- font-family: Arial;
316
- font-weight: bold;
317
- font-size: 12px;
318
- border-left: 0px solid black;
319
- border-right: 2px solid black;
320
- border-bottom: 2px solid black;
323
+ whitw-space: nowrap;
324
+ text-align: left;
325
+ font-family: Arial;
326
+ font-weight: bold;
327
+ font-size: 12px;
328
+ border-left: 0px solid black;
329
+ border-right: 2px solid black;
330
+ border-bottom: 2px solid black;
321
331
  }
322
332
 
323
333
  .td_run_data {
324
- whitw-space: nowrap;
325
- text-align: center;
326
- font-family: Arial;
327
- font-weight: bold;
328
- font-size: 12px;
329
- border-left: 0px solid black;
330
- border-right: 0px solid black;
331
- border-bottom: 0px solid black;
334
+ whitw-space: nowrap;
335
+ text-align: center;
336
+ font-family: Arial;
337
+ font-weight: bold;
338
+ font-size: 12px;
339
+ border-left: 0px solid black;
340
+ border-right: 0px solid black;
341
+ border-bottom: 0px solid black;
332
342
  }
333
343
 
334
344
  .td_run_data_error {
335
- whitw-space: nowrap;
336
- text-align: center;
337
- font-family: Arial;
338
- font-weight: bold;
339
- color: #FF0000;
340
- font-size: 12px;
341
- border-left: 0px solid black;
342
- border-right: 0px solid black;
343
- border-bottom: 0px solid black;
345
+ whitw-space: nowrap;
346
+ text-align: center;
347
+ font-family: Arial;
348
+ font-weight: bold;
349
+ color: #FF0000;
350
+ font-size: 12px;
351
+ border-left: 0px solid black;
352
+ border-right: 0px solid black;
353
+ border-bottom: 0px solid black;
344
354
  }
345
355
 
346
356
  .td_passed_data {
347
- whitw-space: nowrap;
348
- text-align: center;
349
- font-family: Arial;
350
- font-weight: bold;
351
- color: #00FF00;
352
- font-size: 12px;
353
- border-left: 0px solid black;
354
- border-right: 0px solid black;
355
- border-bottom: 0px solid black;
357
+ whitw-space: nowrap;
358
+ text-align: center;
359
+ font-family: Arial;
360
+ font-weight: bold;
361
+ color: #00FF00;
362
+ font-size: 12px;
363
+ border-left: 0px solid black;
364
+ border-right: 0px solid black;
365
+ border-bottom: 0px solid black;
356
366
  }
357
367
 
358
368
  .td_failed_data {
359
- whitw-space: nowrap;
360
- text-align: center;
361
- font-family: Arial;
362
- font-weight: bold;
363
- color: #FF0000;
364
- font-size: 12px;
365
- border-left: 0px solid black;
366
- border-right: 0px solid black;
367
- border-bottom: 0px solid black;
369
+ whitw-space: nowrap;
370
+ text-align: center;
371
+ font-family: Arial;
372
+ font-weight: bold;
373
+ color: #FF0000;
374
+ font-size: 12px;
375
+ border-left: 0px solid black;
376
+ border-right: 0px solid black;
377
+ border-bottom: 0px solid black;
368
378
  }
369
379
 
370
380
  .td_blocked_data {
371
- whitw-space: nowrap;
372
- text-align: center;
373
- font-family: Arial;
374
- font-weight: bold;
375
- color: #FFCF10;
376
- font-size: 12px;
377
- border-left: 0px solid black;
378
- border-right: 0px solid black;
379
- border-bottom: 0px solid black;
381
+ whitw-space: nowrap;
382
+ text-align: center;
383
+ font-family: Arial;
384
+ font-weight: bold;
385
+ color: #FFCF10;
386
+ font-size: 12px;
387
+ border-left: 0px solid black;
388
+ border-right: 0px solid black;
389
+ border-bottom: 0px solid black;
380
390
  }
381
391
 
382
392
  .td_skipped_data {
383
- whitw-space: nowrap;
384
- text-align: center;
385
- font-family: Arial;
386
- font-weight: bold;
387
- color: #D9D9D9;
388
- font-size: 12px;
389
- border-left: 0px solid black;
390
- border-right: 2px solid black;
391
- border-bottom: 0px solid black;
393
+ whitw-space: nowrap;
394
+ text-align: center;
395
+ font-family: Arial;
396
+ font-weight: bold;
397
+ color: #D9D9D9;
398
+ font-size: 12px;
399
+ border-left: 0px solid black;
400
+ border-right: 2px solid black;
401
+ border-bottom: 0px solid black;
392
402
  }
393
403
 
394
404
  .td_watchdog_data {
395
- whitw-space: nowrap;
396
- text-align: center;
397
- font-family: Arial;
398
- font-weight: normal;
399
- font-size: 12px;
400
- border-left: 0px solid black;
401
- border-right: 0px solid black;
402
- border-bottom: 0px solid black;
405
+ whitw-space: nowrap;
406
+ text-align: center;
407
+ font-family: Arial;
408
+ font-weight: normal;
409
+ font-size: 12px;
410
+ border-left: 0px solid black;
411
+ border-right: 0px solid black;
412
+ border-bottom: 0px solid black;
403
413
  }
404
414
 
405
415
  .td_watchdog_error_data {
406
- whitw-space: nowrap;
407
- color: #FF0000;
408
- text-align: center;
409
- font-family: Arial;
410
- font-weight: bold;
411
- font-size: 12px;
412
- border-left: 0px solid black;
413
- border-right: 0px solid black;
414
- border-bottom: 0px solid black;
416
+ whitw-space: nowrap;
417
+ color: #FF0000;
418
+ text-align: center;
419
+ font-family: Arial;
420
+ font-weight: bold;
421
+ font-size: 12px;
422
+ border-left: 0px solid black;
423
+ border-right: 0px solid black;
424
+ border-bottom: 0px solid black;
415
425
  }
416
426
 
417
427
  .td_exceptions_data {
418
- whitw-space: nowrap;
419
- text-align: center;
420
- font-family: Arial;
421
- font-weight: normal;
422
- font-size: 12px;
423
- border-left: 0px solid black;
424
- border-right: 0px solid black;
425
- border-bottom: 0px solid black;
428
+ whitw-space: nowrap;
429
+ text-align: center;
430
+ font-family: Arial;
431
+ font-weight: normal;
432
+ font-size: 12px;
433
+ border-left: 0px solid black;
434
+ border-right: 0px solid black;
435
+ border-bottom: 0px solid black;
426
436
  }
427
437
 
428
438
  .td_exceptions_error_data {
429
- whitw-space: nowrap;
430
- text-align: center;
431
- font-family: Arial;
432
- font-weight: bold;
433
- color: #FF0000;
434
- font-size: 12px;
435
- border-left: 0px solid black;
436
- border-right: 0px solid black;
437
- border-bottom: 0px solid black;
439
+ whitw-space: nowrap;
440
+ text-align: center;
441
+ font-family: Arial;
442
+ font-weight: bold;
443
+ color: #FF0000;
444
+ font-size: 12px;
445
+ border-left: 0px solid black;
446
+ border-right: 0px solid black;
447
+ border-bottom: 0px solid black;
438
448
  }
439
449
 
440
450
  .td_javascript_data {
441
- whitw-space: nowrap;
442
- text-align: center;
443
- font-family: Arial;
444
- font-weight: normal;
445
- font-size: 12px;
446
- border-left: 0px solid black;
447
- border-right: 0px solid black;
448
- border-bottom: 0px solid black;
451
+ whitw-space: nowrap;
452
+ text-align: center;
453
+ font-family: Arial;
454
+ font-weight: normal;
455
+ font-size: 12px;
456
+ border-left: 0px solid black;
457
+ border-right: 0px solid black;
458
+ border-bottom: 0px solid black;
449
459
  }
450
460
 
451
461
  .td_javascript_error_data {
452
- whitw-space: nowrap;
453
- text-align: center;
454
- font-family: Arial;
455
- font-weight: bold;
456
- color: #FF0000;
457
- font-size: 12px;
458
- border-left: 0px solid black;
459
- border-right: 0px solid black;
460
- border-bottom: 0px solid black;
462
+ whitw-space: nowrap;
463
+ text-align: center;
464
+ font-family: Arial;
465
+ font-weight: bold;
466
+ color: #FF0000;
467
+ font-size: 12px;
468
+ border-left: 0px solid black;
469
+ border-right: 0px solid black;
470
+ border-bottom: 0px solid black;
461
471
  }
462
472
 
463
473
  .td_assert_data {
464
- whitw-space: nowrap;
465
- text-align: center;
466
- font-family: Arial;
467
- font-weight: normal;
468
- font-size: 12px;
469
- border-left: 0px solid black;
470
- border-right: 0px solid black;
471
- border-bottom: 0px solid black;
474
+ whitw-space: nowrap;
475
+ text-align: center;
476
+ font-family: Arial;
477
+ font-weight: normal;
478
+ font-size: 12px;
479
+ border-left: 0px solid black;
480
+ border-right: 0px solid black;
481
+ border-bottom: 0px solid black;
472
482
  }
473
483
 
474
484
  .td_assert_error_data {
475
- whitw-space: nowrap;
476
- text-align: center;
477
- font-family: Arial;
478
- font-weight: bold;
479
- color: #FF0000;
480
- font-size: 12px;
481
- border-left: 0px solid black;
482
- border-right: 0px solid black;
483
- border-bottom: 0px solid black;
485
+ whitw-space: nowrap;
486
+ text-align: center;
487
+ font-family: Arial;
488
+ font-weight: bold;
489
+ color: #FF0000;
490
+ font-size: 12px;
491
+ border-left: 0px solid black;
492
+ border-right: 0px solid black;
493
+ border-bottom: 0px solid black;
484
494
  }
485
495
 
486
496
  .td_other_data {
487
- whitw-space: nowrap;
488
- text-align: center;
489
- font-family: Arial;
490
- font-weight: normal;
491
- font-size: 12px;
492
- border-left: 0px solid black;
493
- border-right: 0px solid black;
494
- border-bottom: 0px solid black;
497
+ whitw-space: nowrap;
498
+ text-align: center;
499
+ font-family: Arial;
500
+ font-weight: normal;
501
+ font-size: 12px;
502
+ border-left: 0px solid black;
503
+ border-right: 0px solid black;
504
+ border-bottom: 0px solid black;
495
505
  }
496
506
 
497
507
  .td_other_error_data {
498
- whitw-space: nowrap;
499
- text-align: center;
500
- font-family: Arial;
501
- font-weight: bold;
502
- color: #FF0000;
503
- font-size: 12px;
504
- border-left: 0px solid black;
505
- border-right: 0px solid black;
506
- border-bottom: 0px solid black;
508
+ whitw-space: nowrap;
509
+ text-align: center;
510
+ font-family: Arial;
511
+ font-weight: bold;
512
+ color: #FF0000;
513
+ font-size: 12px;
514
+ border-left: 0px solid black;
515
+ border-right: 0px solid black;
516
+ border-bottom: 0px solid black;
507
517
  }
508
518
 
509
519
  .td_total_data {
510
- whitw-space: nowrap;
511
- text-align: center;
512
- font-family: Arial;
513
- font-weight: normal;
514
- font-size: 12px;
515
- border-left: 0px solid black;
516
- border-right: 2px solid black;
517
- border-bottom: 0px solid black;
520
+ whitw-space: nowrap;
521
+ text-align: center;
522
+ font-family: Arial;
523
+ font-weight: normal;
524
+ font-size: 12px;
525
+ border-left: 0px solid black;
526
+ border-right: 2px solid black;
527
+ border-bottom: 0px solid black;
518
528
  }
519
529
 
520
530
  .td_total_error_data {
521
- whitw-space: nowrap;
522
- text-align: center;
523
- font-family: Arial;
524
- font-weight: bold;
525
- color: #FF0000;
526
- font-size: 12px;
527
- border-left: 0px solid black;
528
- border-right: 2px solid black;
529
- border-bottom: 0px solid black;
531
+ whitw-space: nowrap;
532
+ text-align: center;
533
+ font-family: Arial;
534
+ font-weight: bold;
535
+ color: #FF0000;
536
+ font-size: 12px;
537
+ border-left: 0px solid black;
538
+ border-right: 2px solid black;
539
+ border-bottom: 0px solid black;
530
540
  }
531
541
 
532
542
  .td_css_data {
533
- whitw-space: nowrap;
534
- text-align: center;
535
- font-family: Arial;
536
- font-weight: normal;
537
- font-size: 12px;
538
- border-left: 0px solid black;
539
- border-right: 0px solid black;
540
- border-bottom: 0px solid black;
543
+ whitw-space: nowrap;
544
+ text-align: center;
545
+ font-family: Arial;
546
+ font-weight: normal;
547
+ font-size: 12px;
548
+ border-left: 0px solid black;
549
+ border-right: 0px solid black;
550
+ border-bottom: 0px solid black;
541
551
  }
542
552
 
543
553
  .td_sodawarnings_data {
544
- whitw-space: nowrap;
545
- text-align: center;
546
- font-family: Arial;
547
- font-weight: normal;
548
- font-size: 12px;
549
- border-left: 0px solid black;
550
- border-right: 2px solid black;
551
- border-bottom: 0px solid black;
554
+ whitw-space: nowrap;
555
+ text-align: center;
556
+ font-family: Arial;
557
+ font-weight: normal;
558
+ font-size: 12px;
559
+ border-left: 0px solid black;
560
+ border-right: 2px solid black;
561
+ border-bottom: 0px solid black;
552
562
  }
553
563
 
554
564
  .td_time_data {
555
- whitw-space: nowrap;
556
- text-align: center;
557
- font-family: Arial;
558
- font-weight: normal;
559
- font-size: 12px;
560
- border-left: 0px solid black;
561
- border-right: 1px solid black;
562
- border-bottom: 0px solid black;
565
+ whitw-space: nowrap;
566
+ text-align: center;
567
+ font-family: Arial;
568
+ font-weight: normal;
569
+ font-size: 12px;
570
+ border-left: 0px solid black;
571
+ border-right: 1px solid black;
572
+ border-bottom: 0px solid black;
563
573
  }
564
574
 
565
575
  .td_footer_run {
566
- whitw-space: nowrap;
567
- background: #99CCFF;
568
- text-align: center;
569
- font-family: Arial;
570
- font-weight: bold;
571
- font-size: 12px;
572
- color: #000000;
573
- border-top: 2px solid black;
574
- border-left: 0px solid black;
575
- border-right: 2px solid black;
576
- border-bottom: 2px solid black;
576
+ whitw-space: nowrap;
577
+ background: #99CCFF;
578
+ text-align: center;
579
+ font-family: Arial;
580
+ font-weight: bold;
581
+ font-size: 12px;
582
+ color: #000000;
583
+ border-top: 2px solid black;
584
+ border-left: 0px solid black;
585
+ border-right: 2px solid black;
586
+ border-bottom: 2px solid black;
577
587
  }
578
588
 
579
589
  .td_footer_passed {
580
- whitw-space: nowrap;
581
- background: #99CCFF;
582
- text-align: center;
583
- font-family: Arial;
584
- font-weight: bold;
585
- font-size: 12px;
586
- color: #00FF00;
587
- border-top: 2px solid black;
588
- border-left: 0px solid black;
589
- border-right: 0px solid black;
590
- border-bottom: 2px solid black;
590
+ whitw-space: nowrap;
591
+ background: #99CCFF;
592
+ text-align: center;
593
+ font-family: Arial;
594
+ font-weight: bold;
595
+ font-size: 12px;
596
+ color: #00FF00;
597
+ border-top: 2px solid black;
598
+ border-left: 0px solid black;
599
+ border-right: 0px solid black;
600
+ border-bottom: 2px solid black;
591
601
  }
592
602
 
593
603
  .td_footer_failed {
594
- whitw-space: nowrap;
595
- background: #99CCFF;
596
- text-align: center;
597
- font-family: Arial;
598
- font-weight: bold;
599
- font-size: 12px;
600
- color: #FF0000;
601
- border-top: 2px solid black;
602
- border-left: 0px solid black;
603
- border-right: 2px solid black;
604
- border-bottom: 2px solid black;
604
+ whitw-space: nowrap;
605
+ background: #99CCFF;
606
+ text-align: center;
607
+ font-family: Arial;
608
+ font-weight: bold;
609
+ font-size: 12px;
610
+ color: #FF0000;
611
+ border-top: 2px solid black;
612
+ border-left: 0px solid black;
613
+ border-right: 2px solid black;
614
+ border-bottom: 2px solid black;
605
615
  }
606
616
 
607
617
  .td_footer_blocked {
608
- whitw-space: nowrap;
609
- background: #99CCFF;
610
- text-align: center;
611
- font-family: Arial;
612
- font-weight: bold;
613
- font-size: 12px;
614
- color: #FFCF10;
615
- border-top: 2px solid black;
616
- border-left: 0px solid black;
617
- border-right: 0px solid black;
618
- border-bottom: 2px solid black;
618
+ whitw-space: nowrap;
619
+ background: #99CCFF;
620
+ text-align: center;
621
+ font-family: Arial;
622
+ font-weight: bold;
623
+ font-size: 12px;
624
+ color: #FFCF10;
625
+ border-top: 2px solid black;
626
+ border-left: 0px solid black;
627
+ border-right: 0px solid black;
628
+ border-bottom: 2px solid black;
619
629
  }
620
630
 
621
631
  .td_footer_skipped {
622
- whitw-space: nowrap;
623
- background: #99CCFF;
624
- text-align: center;
625
- font-family: Arial;
626
- font-weight: bold;
627
- font-size: 12px;
628
- color: #D9D9D9;
629
- border-top: 2px solid black;
630
- border-left: 0px solid black;
631
- border-right: 2px solid black;
632
- border-bottom: 2px solid black;
632
+ whitw-space: nowrap;
633
+ background: #99CCFF;
634
+ text-align: center;
635
+ font-family: Arial;
636
+ font-weight: bold;
637
+ font-size: 12px;
638
+ color: #D9D9D9;
639
+ border-top: 2px solid black;
640
+ border-left: 0px solid black;
641
+ border-right: 2px solid black;
642
+ border-bottom: 2px solid black;
633
643
  }
634
644
 
635
645
  .td_footer_watchdog {
636
- whitw-space: nowrap;
637
- background: #99CCFF;
638
- text-align: center;
639
- font-family: Arial;
640
- font-weight: bold;
641
- font-size: 12px;
642
- color: #FF0000;
643
- border-top: 2px solid black;
644
- border-left: 0px solid black;
645
- border-right: 0px solid black;
646
- border-bottom: 2px solid black;
646
+ whitw-space: nowrap;
647
+ background: #99CCFF;
648
+ text-align: center;
649
+ font-family: Arial;
650
+ font-weight: bold;
651
+ font-size: 12px;
652
+ color: #FF0000;
653
+ border-top: 2px solid black;
654
+ border-left: 0px solid black;
655
+ border-right: 0px solid black;
656
+ border-bottom: 2px solid black;
647
657
  }
648
658
 
649
659
  .td_footer_exceptions {
650
- whitw-space: nowrap;
651
- background: #99CCFF;
652
- text-align: center;
653
- font-family: Arial;
654
- font-weight: bold;
655
- font-size: 12px;
656
- color: #FF0000;
657
- border-top: 2px solid black;
658
- border-left: 0px solid black;
659
- border-right: 0px solid black;
660
- border-bottom: 2px solid black;
660
+ whitw-space: nowrap;
661
+ background: #99CCFF;
662
+ text-align: center;
663
+ font-family: Arial;
664
+ font-weight: bold;
665
+ font-size: 12px;
666
+ color: #FF0000;
667
+ border-top: 2px solid black;
668
+ border-left: 0px solid black;
669
+ border-right: 0px solid black;
670
+ border-bottom: 2px solid black;
661
671
  }
662
672
 
663
673
  .td_footer_javascript {
664
- whitw-space: nowrap;
665
- background: #99CCFF;
666
- text-align: center;
667
- font-family: Arial;
668
- font-weight: bold;
669
- font-size: 12px;
670
- color: #FF0000;
671
- border-top: 2px solid black;
672
- border-left: 0px solid black;
673
- border-right: 0px solid black;
674
- border-bottom: 2px solid black;
674
+ whitw-space: nowrap;
675
+ background: #99CCFF;
676
+ text-align: center;
677
+ font-family: Arial;
678
+ font-weight: bold;
679
+ font-size: 12px;
680
+ color: #FF0000;
681
+ border-top: 2px solid black;
682
+ border-left: 0px solid black;
683
+ border-right: 0px solid black;
684
+ border-bottom: 2px solid black;
675
685
  }
676
686
 
677
687
  .td_footer_assert {
678
- whitw-space: nowrap;
679
- background: #99CCFF;
680
- text-align: center;
681
- font-family: Arial;
682
- font-weight: bold;
683
- font-size: 12px;
684
- color: #FF0000;
685
- border-top: 2px solid black;
686
- border-left: 0px solid black;
687
- border-right: 0px solid black;
688
- border-bottom: 2px solid black;
688
+ whitw-space: nowrap;
689
+ background: #99CCFF;
690
+ text-align: center;
691
+ font-family: Arial;
692
+ font-weight: bold;
693
+ font-size: 12px;
694
+ color: #FF0000;
695
+ border-top: 2px solid black;
696
+ border-left: 0px solid black;
697
+ border-right: 0px solid black;
698
+ border-bottom: 2px solid black;
689
699
  }
690
700
 
691
701
  .td_footer_other {
692
- whitw-space: nowrap;
693
- background: #99CCFF;
694
- text-align: center;
695
- font-family: Arial;
696
- font-weight: bold;
697
- font-size: 12px;
698
- color: #FF0000;
699
- border-top: 2px solid black;
700
- border-left: 0px solid black;
701
- border-right: 0px solid black;
702
- border-bottom: 2px solid black;
702
+ whitw-space: nowrap;
703
+ background: #99CCFF;
704
+ text-align: center;
705
+ font-family: Arial;
706
+ font-weight: bold;
707
+ font-size: 12px;
708
+ color: #FF0000;
709
+ border-top: 2px solid black;
710
+ border-left: 0px solid black;
711
+ border-right: 0px solid black;
712
+ border-bottom: 2px solid black;
703
713
  }
704
714
 
705
715
  .td_footer_total {
706
- whitw-space: nowrap;
707
- background: #99CCFF;
708
- text-align: center;
709
- font-family: Arial;
710
- font-weight: bold;
711
- font-size: 12px;
712
- color: #FF0000;
713
- border-top: 2px solid black;
714
- border-left: 2px solid black;
715
- border-right: 2px solid black;
716
- border-bottom: 2px solid black;
716
+ whitw-space: nowrap;
717
+ background: #99CCFF;
718
+ text-align: center;
719
+ font-family: Arial;
720
+ font-weight: bold;
721
+ font-size: 12px;
722
+ color: #FF0000;
723
+ border-top: 2px solid black;
724
+ border-left: 2px solid black;
725
+ border-right: 2px solid black;
726
+ border-bottom: 2px solid black;
717
727
  }
718
728
 
719
729
  .td_footer_css {
720
- whitw-space: nowrap;
721
- background: #99CCFF;
722
- text-align: center;
723
- font-family: Arial;
724
- font-weight: bold;
725
- font-size: 12px;
726
- color: #000000;
727
- border-top: 2px solid black;
728
- border-left: 0px solid black;
729
- border-right: 0px solid black;
730
- border-bottom: 2px solid black;
730
+ whitw-space: nowrap;
731
+ background: #99CCFF;
732
+ text-align: center;
733
+ font-family: Arial;
734
+ font-weight: bold;
735
+ font-size: 12px;
736
+ color: #000000;
737
+ border-top: 2px solid black;
738
+ border-left: 0px solid black;
739
+ border-right: 0px solid black;
740
+ border-bottom: 2px solid black;
731
741
  }
732
742
 
733
743
  .td_footer_sodawarnings {
734
- whitw-space: nowrap;
735
- background: #99CCFF;
736
- text-align: center;
737
- font-family: Arial;
738
- font-weight: bold;
739
- font-size: 12px;
740
- color: #000000;
741
- border-top: 2px solid black;
742
- border-left: 0px solid black;
743
- border-right: 0px solid black;
744
- border-bottom: 2px solid black;
744
+ whitw-space: nowrap;
745
+ background: #99CCFF;
746
+ text-align: center;
747
+ font-family: Arial;
748
+ font-weight: bold;
749
+ font-size: 12px;
750
+ color: #000000;
751
+ border-top: 2px solid black;
752
+ border-left: 0px solid black;
753
+ border-right: 0px solid black;
754
+ border-bottom: 2px solid black;
745
755
  }
746
756
 
747
757
  .td_footer_times {
748
- whitw-space: nowrap;
749
- background: #99CCFF;
750
- text-align: center;
751
- font-family: Arial;
752
- font-weight: bold;
753
- font-size: 12px;
754
- color: #000000;
755
- border-top: 2px solid black;
756
- border-left: 2px solid black;
757
- border-right: 0px solid black;
758
- border-bottom: 2px solid black;
758
+ whitw-space: nowrap;
759
+ background: #99CCFF;
760
+ text-align: center;
761
+ font-family: Arial;
762
+ font-weight: bold;
763
+ font-size: 12px;
764
+ color: #000000;
765
+ border-top: 2px solid black;
766
+ border-left: 2px solid black;
767
+ border-right: 0px solid black;
768
+ border-bottom: 2px solid black;
759
769
  }
760
770
  </style>
761
771
  <body>
762
772
  <table>
763
773
  <tr>
764
- <td class="td_header_master" rowspan="2">Suite</br>
765
- (click link for full report)</td>
766
- <td class="td_header_master" colspan="5">Tests</td>
767
- <td class="td_header_master" colspan="6">Failures</td>
768
- <td class="td_header_master" colspan="2">Warnings</td>
769
- <td class="td_header_master" rowspan="2">Run Time</br>(hh:mm:ss)</td>
774
+ <td class="td_header_master" rowspan="2">Suite</br>
775
+ (click link for full report)</td>
776
+ <td class="td_header_master" colspan="5">Tests</td>
777
+ <td class="td_header_master" colspan="6">Failures</td>
778
+ <td class="td_header_master" colspan="2">Warnings</td>
779
+ <td class="td_header_master" rowspan="2">Run Time</br>(hh:mm:ss)</td>
770
780
  </tr>
771
781
  <tr>
772
- <td class="td_header_sub">Run</td>
773
- <td class="td_header_sub">Passed</td>
774
- <td class="td_header_sub">Failed</td>
775
- <td class="td_header_sub">Blocked</td>
776
- <td class="td_header_skipped">Skipped</td>
777
- <td class="td_header_watchdog">Watchdogs</td>
778
- <td class="td_header_sub">Exceptions</td>
779
- <td class="td_header_sub">JavaScript</br>Errors</td>
780
- <td class="td_header_sub">Assert</br>Failures</td>
781
- <td class="td_header_sub">Other</br>Failures</td>
782
- <td class="td_header_skipped">Total</br>Failures</td>
783
- <td class="td_header_watchdog">CSS Errors</td>
784
- <td class="td_header_skipped">Soda</br>Warnings</td>
782
+ <td class="td_header_sub">Run</td>
783
+ <td class="td_header_sub">Passed</td>
784
+ <td class="td_header_sub">Failed</td>
785
+ <td class="td_header_sub">Blocked</td>
786
+ <td class="td_header_skipped">Skipped</td>
787
+ <td class="td_header_watchdog">Watchdogs</td>
788
+ <td class="td_header_sub">Exceptions</td>
789
+ <td class="td_header_sub">JavaScript</br>Errors</td>
790
+ <td class="td_header_sub">Assert</br>Failures</td>
791
+ <td class="td_header_sub">Other</br>Failures</td>
792
+ <td class="td_header_skipped">Total</br>Failures</td>
793
+ <td class="td_header_watchdog">CSS Errors</td>
794
+ <td class="td_header_skipped">Soda</br>Warnings</td>
785
795
  </tr>
786
796
  HTML
787
797
 
@@ -855,7 +865,7 @@ HTML
855
865
  hours,minutes,seconds,frac =
856
866
  Date.day_fraction_to_time(suite_hash['Total Time'])
857
867
 
858
- if (hours < 10)
868
+ if (hours < 10)
859
869
  hours = "0#{hours}"
860
870
  end
861
871
 
@@ -870,39 +880,39 @@ HTML
870
880
  suite_hash['Test Other Failures'] = 0
871
881
 
872
882
  test_run_class = "td_run_data"
873
- if (suite_hash['Test Assert Failures'] > 0 ||
883
+ if (suite_hash['Test Assert Failures'] > 0 ||
874
884
  suite_hash['Test Exceptions'] > 0)
875
- test_run_class = "td_run_data_error"
876
- end
885
+ test_run_class = "td_run_data_error"
886
+ end
877
887
 
878
888
  exceptions_td = "td_exceptions_data"
879
- if (suite_hash['Test Exceptions'] > 0)
880
- exceptions_td = "td_exceptions_error_data"
881
- end
889
+ if (suite_hash['Test Exceptions'] > 0)
890
+ exceptions_td = "td_exceptions_error_data"
891
+ end
882
892
 
883
- asserts_td = "td_assert_data"
884
- if (suite_hash['Test Assert Failures'] > 0)
885
- asserts_td = "td_assert_error_data"
886
- end
893
+ asserts_td = "td_assert_data"
894
+ if (suite_hash['Test Assert Failures'] > 0)
895
+ asserts_td = "td_assert_error_data"
896
+ end
887
897
 
888
- watchdog_td = "td_watchdog_data"
889
- if (suite_hash['Test WatchDog Count'] > 0)
890
- watchdog_td = "td_watchdog_error_data"
891
- end
898
+ watchdog_td = "td_watchdog_data"
899
+ if (suite_hash['Test WatchDog Count'] > 0)
900
+ watchdog_td = "td_watchdog_error_data"
901
+ end
892
902
 
893
- jscript_td = "td_javascript_data"
894
- if (suite_hash['Test JavaScript Error Count'] > 0)
895
- jscript_td = "td_javascript_error_data"
896
- end
903
+ jscript_td = "td_javascript_data"
904
+ if (suite_hash['Test JavaScript Error Count'] > 0)
905
+ jscript_td = "td_javascript_error_data"
906
+ end
897
907
 
898
908
  t_passedcount = suite_hash['Test Count']
899
- t_passedcount -= suite_hash['Test Failure Count']
900
- total_failures = 0
901
- # total_failures += suite_hash['Test Failure Count']
902
- total_failures += suite_hash['Test WatchDog Count']
903
- total_failures += suite_hash['Test Assert Failures']
904
- total_failures += suite_hash['Test Other Failures']
905
- total_failures += suite_hash['Test JavaScript Error Count']
909
+ t_passedcount -= suite_hash['Test Failure Count']
910
+ total_failures = 0
911
+ # total_failures += suite_hash['Test Failure Count']
912
+ total_failures += suite_hash['Test WatchDog Count']
913
+ total_failures += suite_hash['Test Assert Failures']
914
+ total_failures += suite_hash['Test Other Failures']
915
+ total_failures += suite_hash['Test JavaScript Error Count']
906
916
  # total_failure_count += total_failures
907
917
 
908
918
  ran_count = suite_hash['Test Count'].to_i()
@@ -914,7 +924,6 @@ HTML
914
924
 
915
925
  reportdir = File.dirname(reportfile)
916
926
  suite_mini_file = GenSuiteMiniSummary(data[suite_name], reportdir)
917
- suite_mini_file = File.basename(suite_mini_file)
918
927
 
919
928
  str = "<tr id=\"#{row_id}\" class=\"unhighlight\" "+
920
929
  "onMouseOver=\"this.className='highlight'\" "+
@@ -922,38 +931,38 @@ HTML
922
931
  "\t<td class=\"td_file_data\"><a href=\"#{suite_mini_file}\">"+
923
932
  "#{suite_name}</a></td>\n"+
924
933
  "\t<td class=\"#{test_run_class}\">"+
925
- "#{ran_count}/#{suite_hash['Test Count']}</td>\n"+
926
- "\t<td class=\"td_passed_data\">"+
927
- "#{suite_hash['Test Passed Count']}</td>\n"+
934
+ "#{ran_count}/#{suite_hash['Test Count']}</td>\n"+
935
+ "\t<td class=\"td_passed_data\">"+
936
+ "#{suite_hash['Test Passed Count']}</td>\n"+
928
937
  "\t<td class=\"td_failed_data\">"+
929
- "#{suite_hash['Test Failure Count']}</td>\n"+
938
+ "#{suite_hash['Test Failure Count']}</td>\n"+
930
939
  "\t<td class=\"td_blocked_data\">"+
931
- "#{suite_hash['Test Blocked Count']}</td>\n"+
940
+ "#{suite_hash['Test Blocked Count']}</td>\n"+
932
941
  "\t<td class=\"td_skipped_data\">"+
933
- "#{suite_hash['Test Skip Count']}</td>\n"+
934
- "\t<td class=\"#{watchdog_td}\">"+
935
- "#{suite_hash['Test WatchDog Count']}</td>\n"+
936
- "\t<td class=\"#{exceptions_td}\">"+
937
- "#{suite_hash['Test Exceptions']}</td>\n"+
942
+ "#{suite_hash['Test Skip Count']}</td>\n"+
943
+ "\t<td class=\"#{watchdog_td}\">"+
944
+ "#{suite_hash['Test WatchDog Count']}</td>\n"+
945
+ "\t<td class=\"#{exceptions_td}\">"+
946
+ "#{suite_hash['Test Exceptions']}</td>\n"+
938
947
  "\t<td class=\"#{jscript_td}\">"+
939
- "#{suite_hash['Test JavaScript Error Count']}</td>\n"+
948
+ "#{suite_hash['Test JavaScript Error Count']}</td>\n"+
940
949
  "\t<td class=\"#{asserts_td}\">"+
941
- "#{suite_hash['Test Assert Failures']}</td>\n"+
942
- "\t<td class=\"td_other_data\">"+
943
- "0</td>\n"+
944
- "\t<td class=\"td_total_data\">#{total_failures}</td>\n"+
950
+ "#{suite_hash['Test Assert Failures']}</td>\n"+
951
+ "\t<td class=\"td_other_data\">"+
952
+ "0</td>\n"+
953
+ "\t<td class=\"td_total_data\">#{total_failures}</td>\n"+
945
954
  "\t<td class=\"td_css_data\">"+
946
- "#{suite_hash['Test CSS Error Count']}</td>\n"+
947
- "\t<td class=\"td_sodawarnings_data\">"+
948
- "#{suite_hash['Test Warning Count']}</td>\n"+
955
+ "#{suite_hash['Test CSS Error Count']}</td>\n"+
956
+ "\t<td class=\"td_sodawarnings_data\">"+
957
+ "#{suite_hash['Test Warning Count']}</td>\n"+
949
958
  "\t<td class=\"td_time_data\">"+
950
- "#{hours}:#{minutes}:#{seconds}</td>\n</tr>\n"
959
+ "#{hours}:#{minutes}:#{seconds}</td>\n</tr>\n"
951
960
  fd.write(str)
952
961
  end
953
962
 
954
963
  test_totals = suite_totals['Test Count']
955
- test_totals += suite_totals['Test Skip Count']
956
- test_totals += suite_totals['Test Blocked Count']
964
+ test_totals += suite_totals['Test Skip Count']
965
+ test_totals += suite_totals['Test Blocked Count']
957
966
 
958
967
  hours,minutes,seconds,frac =
959
968
  Date.day_fraction_to_time(suite_totals['Total Time'])
@@ -972,32 +981,32 @@ HTML
972
981
  sub_totals = "<tr id=\"totals\">\n"+
973
982
  "\t<td class=\"td_header_master\">Totals:</td>\n"+
974
983
  "\t<td class=\"td_footer_run\">#{suite_totals['Test Count']}"+
975
- "/#{test_totals}</td>\n"+
976
- "\t<td class=\"td_footer_passed\">#{suite_totals['Test Passed Count']}"+
977
- "</td>\n"+
978
- "\t<td class=\"td_footer_failed\">"+
979
- "#{suite_totals['Test Failure Count']}</td>\n"+
980
- "\t<td class=\"td_footer_blocked\">"+
981
- "#{suite_totals['Test Blocked Count']}</td>\n"+
982
- "\t<td class=\"td_footer_skipped\">"+
983
- "#{suite_totals['Test Skip Count']}</td>\n"+
984
- "\t<td class=\"td_footer_watchdog\">"+
985
- "#{suite_totals['Test WatchDog Count']}</td>\n"+
986
- "\t<td class=\"td_footer_exceptions\">"+
987
- "#{suite_totals['Test Exceptions']}</td>\n"+
984
+ "/#{test_totals}</td>\n"+
985
+ "\t<td class=\"td_footer_passed\">#{suite_totals['Test Passed Count']}"+
986
+ "</td>\n"+
987
+ "\t<td class=\"td_footer_failed\">"+
988
+ "#{suite_totals['Test Failure Count']}</td>\n"+
989
+ "\t<td class=\"td_footer_blocked\">"+
990
+ "#{suite_totals['Test Blocked Count']}</td>\n"+
991
+ "\t<td class=\"td_footer_skipped\">"+
992
+ "#{suite_totals['Test Skip Count']}</td>\n"+
993
+ "\t<td class=\"td_footer_watchdog\">"+
994
+ "#{suite_totals['Test WatchDog Count']}</td>\n"+
995
+ "\t<td class=\"td_footer_exceptions\">"+
996
+ "#{suite_totals['Test Exceptions']}</td>\n"+
988
997
  "\t<td class=\"td_footer_javascript\">"+
989
- "#{suite_totals['Test JavaScript Error Count']}</td>\n"+
998
+ "#{suite_totals['Test JavaScript Error Count']}</td>\n"+
990
999
  "\t<td class=\"td_footer_assert\">"+
991
- "#{suite_totals['Test Assert Failures']}</td>\n"+
1000
+ "#{suite_totals['Test Assert Failures']}</td>\n"+
992
1001
  "\t<td class=\"td_footer_other\">0</td>\n"+
993
1002
  "\t<td class=\"td_footer_total\">"+
994
- "#{total_failure_count}</td>\n"+
1003
+ "#{total_failure_count}</td>\n"+
995
1004
  "\t<td class=\"td_footer_css\">"+
996
- "#{suite_totals['Test CSS Error Count']}</td>\n"+
997
- "\t<td class=\"td_footer_sodawarnings\">"+
998
- "#{suite_totals['Test Warning Count']}</td>\n"+
999
- "\t<td class=\"td_footer_times\">"+
1000
- "#{hours}:#{minutes}:#{seconds}</td>\n"+
1005
+ "#{suite_totals['Test CSS Error Count']}</td>\n"+
1006
+ "\t<td class=\"td_footer_sodawarnings\">"+
1007
+ "#{suite_totals['Test Warning Count']}</td>\n"+
1008
+ "\t<td class=\"td_footer_times\">"+
1009
+ "#{hours}:#{minutes}:#{seconds}</td>\n"+
1001
1010
  "</tr>\n"
1002
1011
  fd.write(sub_totals)
1003
1012
  fd.write("</table>\n</body>\n</html>\n")
@@ -1011,8 +1020,10 @@ end
1011
1020
  def GenSuiteMiniSummary(suite_hash, reportdir)
1012
1021
  suite_file = suite_hash['suitefile']
1013
1022
  suite_file = File.basename(suite_file, ".xml")
1023
+ suite_name = "#{suite_file}"
1014
1024
  suite_file << ".html"
1015
- suite_file = "#{reportdir}/#{suite_file}"
1025
+ href = "#{suite_name}/#{suite_file}"
1026
+ suite_file = "#{reportdir}/#{suite_name}/#{suite_file}"
1016
1027
 
1017
1028
  html = <<HTML
1018
1029
  <html>
@@ -1025,58 +1036,63 @@ table {
1025
1036
  background: #FFFFFF;
1026
1037
  }
1027
1038
  .td_header_master {
1028
- whitw-space: nowrap;
1029
- background: #99CCFF;
1030
- text-align: center;
1031
- font-family: Arial;
1032
- font-weight: bold;
1033
- font-size: 12px;
1034
- border-left: 0px solid black;
1035
- border-right: 2px solid black;
1036
- border-bottom: 2px solid black;
1039
+ whitw-space: nowrap;
1040
+ background: #99CCFF;
1041
+ text-align: center;
1042
+ font-family: Arial;
1043
+ font-weight: bold;
1044
+ font-size: 12px;
1045
+ border-left: 0px solid black;
1046
+ border-right: 2px solid black;
1047
+ border-bottom: 2px solid black;
1037
1048
  }
1038
1049
  .td_file_data {
1039
- whitw-space: nowrap;
1040
- text-align: left;
1041
- font-family: Arial;
1042
- font-weight: bold;
1043
- font-size: 12px;
1044
- border-left: 0px solid black;
1045
- border-right: 2px solid black;
1046
- border-bottom: 2px solid black;
1050
+ whitw-space: nowrap;
1051
+ text-align: left;
1052
+ font-family: Arial;
1053
+ font-weight: bold;
1054
+ font-size: 12px;
1055
+ border-left: 0px solid black;
1056
+ border-right: 2px solid black;
1057
+ border-bottom: 2px solid black;
1047
1058
  }
1048
1059
  .td_passed_data {
1049
- whitw-space: nowrap;
1050
- text-align: center;
1051
- font-family: Arial;
1052
- font-weight: bold;
1053
- color: #00FF00;
1054
- font-size: 12px;
1055
- border-left: 0px solid black;
1056
- border-right: 0px solid black;
1057
- border-bottom: 2px solid black;
1060
+ whitw-space: nowrap;
1061
+ text-align: center;
1062
+ font-family: Arial;
1063
+ font-weight: bold;
1064
+ color: #00FF00;
1065
+ font-size: 12px;
1066
+ border-left: 0px solid black;
1067
+ border-right: 0px solid black;
1068
+ border-bottom: 2px solid black;
1058
1069
  }
1059
-
1060
1070
  .td_failed_data {
1061
- whitw-space: nowrap;
1062
- text-align: center;
1063
- font-family: Arial;
1064
- font-weight: bold;
1065
- color: #FF0000;
1066
- font-size: 12px;
1067
- border-left: 0px solid black;
1068
- border-right: 0px solid black;
1069
- border-bottom: 2px solid black;
1071
+ whitw-space: nowrap;
1072
+ text-align: center;
1073
+ font-family: Arial;
1074
+ font-weight: bold;
1075
+ color: #FF0000;
1076
+ font-size: 12px;
1077
+ border-left: 0px solid black;
1078
+ border-right: 0px solid black;
1079
+ border-bottom: 2px solid black;
1070
1080
  }
1071
1081
  .td_report_data {
1072
- whitw-space: nowrap;
1073
- text-align: center;
1074
- font-family: Arial;
1075
- font-weight: normal;
1076
- font-size: 12px;
1077
- border-left: 2px solid black;
1078
- border-right: 1px solid black;
1079
- border-bottom: 2px solid black;
1082
+ whitw-space: nowrap;
1083
+ text-align: center;
1084
+ font-family: Arial;
1085
+ font-weight: normal;
1086
+ font-size: 12px;
1087
+ border-left: 2px solid black;
1088
+ border-right: 1px solid black;
1089
+ border-bottom: 2px solid black;
1090
+ }
1091
+ .highlight {
1092
+ background-color: #8888FF;
1093
+ }
1094
+ .tr_normal {
1095
+ background-color: #FFFFFF;
1080
1096
  }
1081
1097
  </style>
1082
1098
  <body>
@@ -1096,13 +1112,17 @@ HTML
1096
1112
  fd = File.new(suite_file, "w+")
1097
1113
  fd.write(html)
1098
1114
  id = 0
1099
- suite_hash['tests'].each do |test|
1115
+
1116
+ tr_css = "onMouseOver=\"this.className='highlight'\""+
1117
+ " onMouseOut=\"this.className='tr_normal'\" class=\"tr_normal\""
1118
+
1119
+ suite_hash['tests'].sort_by { |h| h['Test Log File'] }.each do |test|
1100
1120
  id += 1
1101
- test_report = test['testfile']
1102
- test_report = File.basename(test_report, ".xml")
1121
+ test_report = test['Test Log File']
1122
+ test_report = File.basename(test_report, ".log")
1103
1123
  test_report = "Report-#{test_report}.html"
1104
1124
 
1105
- str = "<tr id=\"#{id}\">\n"+
1125
+ str = "<tr id=\"#{id}\" #{tr_css} >\n"+
1106
1126
  "\t<td class=\"td_file_data\">#{test['testfile']}</td>\n"
1107
1127
 
1108
1128
  if (test['result'].to_i != 0)
@@ -1120,11 +1140,9 @@ HTML
1120
1140
  fd.write("</table>\n</body>\n</html>\n")
1121
1141
  fd.close()
1122
1142
 
1123
- return suite_file
1124
-
1143
+ return href
1125
1144
  end
1126
1145
 
1127
-
1128
1146
  end
1129
1147
 
1130
1148