itriagetestrail 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1062b8e5cfca4b664a2778c3190d29f77a8e1ece
4
- data.tar.gz: c5f5797f7cdfbc81293d4e480438ba9a6dd3884b
3
+ metadata.gz: 17bc052adcda4579ed4ced8a48b37ff7f9b6dfc4
4
+ data.tar.gz: e45dabc8375697445b9bd8362f01d9ac2491b0a9
5
5
  SHA512:
6
- metadata.gz: 9c649f5018c628408d7e6c01943bc445c83788956d6c61852e62264bfff634889c43b4ff1907622f0d62b089d22ef37840a0d5024c71ba75c874ad55a21010a1
7
- data.tar.gz: 7ed7b3023015492c79ff6a1074264728706e2c143215ab3203436084e9a041f8ad166610c8fb3dd6444ae5768115175ae6bdfd2caa5486aa4ab414fe7d271715
6
+ metadata.gz: f40636c26415de036061f540e1eac938cd9f4c5134eaa48fc586fdc245747b11b0c7943c822041ec561af427381a775c7b8bc8ec983286dd2137027a854ce10f
7
+ data.tar.gz: 29ba218df9a116ee292fe3b100bedd919bfd1701c320e1d6db823de5e2d4a297d0aad1f8efbcb32139332efa66b747fe716101e0eeaa91caae4d11b09b19da24
@@ -1,3 +1,3 @@
1
1
  module Itriagetestrail
2
- VERSION = '0.6.4'
2
+ VERSION = '0.6.5'
3
3
  end
@@ -493,14 +493,23 @@ module Itriagetestrail
493
493
  # this is the hack at very end to exclude tests which frameworks like MiniTest and Cucumber did not touch
494
494
  # including all tests at beginning is necessary so that at least some progress can be seen when
495
495
  # real time updating is enabled.
496
- def update_test_run
497
- executed_ids = []
498
- @results[:results].each {|id| executed_ids << id[:case_id]}
496
+ def update_test_run(runtime = true)
497
+ if runtime
498
+ # collect all all the test cases executed during this thread and append them to the description
499
+ executed_ids = []
500
+ @results[:results].each {|id| executed_ids << id[:case_id]}
499
501
 
500
- # Append case ids to description
501
- existing_cases.each { |case_id| executed_ids << case_id } if @shared_run == true
502
+ # Append case ids to description
503
+ existing_cases.each { |case_id| executed_ids << case_id } if @shared_run == true
504
+
505
+ send = {include_all: true, description: executed_ids.uniq.join(",")}
506
+ else
507
+
508
+ # tests from all threads have been pushed, eliminate non executed test cases from the run
509
+ send = {include_all: false, case_ids: existing_cases, description: executed_ids.uniq.join(",")}
510
+
511
+ end
502
512
 
503
- send = {include_all: false, case_ids: executed_ids.uniq, description: executed_ids.uniq.join(",")}
504
513
  @client.send_post("update_run/#{@run_id}", send)
505
514
  end
506
515
 
@@ -527,6 +536,7 @@ module Itriagetestrail
527
536
  end
528
537
 
529
538
  def close_run(message='')
539
+ update_test_run(false)
530
540
  @client.send_post("update_run/#{@run_id}",
531
541
  {description: 'Timestamp: ' + @time_zone.now.strftime('%m/%d/%Y %I:%M %p') + ("\nBranch: #{@testrail_config[:origin]}") + "\n#{message}"})
532
542
  @client.send_post("close_run/#{@run_id}", {})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itriagetestrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - a801069
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler