testrailtagging 0.3.6.9 → 0.3.7
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 +4 -4
- data/lib/files/testcase_modifications.rb +36 -0
- data/lib/files/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3acaba01eab6b37fc87b8447823b2be644f3863
|
4
|
+
data.tar.gz: a7a692757ab0637b137943a1f97d4c8cf4541812
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac04be9e95ed0dcf8a027b80b132e37a349fcaaa72ca4d2f850162371578c4a3be77d3d6c6016609d3ed50b83a2956469d0ecc138a8a01387af248c490a32e56
|
7
|
+
data.tar.gz: f279a180c9fa138820c34a3af5512c805f318b0ef53fd57d8a94a3924d9a39ecc6c0aa9e84b9188d993406b16a0a48ad2392c8621db33ecbce7c174f01cde6e3
|
@@ -280,6 +280,42 @@ module TestCaseModifications
|
|
280
280
|
puts "Number of orphaned testcase IDs: #{orphaned_ids_count}"
|
281
281
|
end
|
282
282
|
|
283
|
+
# Inspects all request specs and checks if their associated testcase is marked as
|
284
|
+
# run once on testrail. If they are not, then the testcases on testrail get
|
285
|
+
# marked as run once
|
286
|
+
def self.update_run_once(suite_ids)
|
287
|
+
test_cases = TestRailOperations.get_test_rail_cases_for_all_suites(suite_ids)
|
288
|
+
spec_files = Dir["spec/**/*_spec.rb"].reject { |f| f.include? "spec/features/" }
|
289
|
+
|
290
|
+
request_specs = []
|
291
|
+
# parse all the files looking for examples
|
292
|
+
spec_files.each do |file|
|
293
|
+
# puts "Rspec file: #{file}"
|
294
|
+
File.open(file).each do |line|
|
295
|
+
if line.match("testrail_id")
|
296
|
+
testrail_ids = get_example_testrail_ids(line)
|
297
|
+
testrail_ids.each do |id|
|
298
|
+
# puts " id: #{id}"
|
299
|
+
tc = test_cases[id]
|
300
|
+
if tc && tc.file
|
301
|
+
unless tc.run_once
|
302
|
+
request_specs << tc
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
trclient = TestRailOperations.get_test_rail_client
|
311
|
+
request_specs.each do |tc|
|
312
|
+
puts "Marking Test Case as run_once: #{tc.id}"
|
313
|
+
url = "update_case/#{tc.id}"
|
314
|
+
data = { "custom_run_once" => true }
|
315
|
+
trclient.send_post_retry(url, data)
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
283
319
|
# checks for duplicate test case ID's in the rspec tests
|
284
320
|
def self.check_duplicates
|
285
321
|
regression_files = Dir["regression_spec/**/*_spec.rb"]
|
data/lib/files/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testrailtagging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.2.2
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Utilities for working with testrail.
|