ruby-testrail 1.1.0 → 1.1.2
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 +8 -8
- data/README.md +26 -3
- data/lib/testrail/adaptor.rb +16 -0
- data/lib/testrail/cucumber_adaptor.rb +3 -2
- data/lib/testrail/rspec_adaptor.rb +3 -2
- data/ruby-testrail.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NzZmOGQ0ODgwNDViMTVjYWY1ZTc2ZjE5ZmNjNzZiNzY0MjgwNzBiNQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZjIzOGFjMWNmOWM0YmZiZmNmZjk1YWEwYmYxZjNiOTI2ODlmMTliOQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZDhjNGQyZjJmYjBhZmMyOGNmN2QxOTY1ZTBhNGY4MmIwYzMyNjg2MWRiMTM3
|
|
10
|
+
NTUzZjNlZDY4MmQyMWE2NTVmNjJhYWE3MGYxMDdkMGJlZDdlYWFjYWRmOGE3
|
|
11
|
+
YjljZDA3NTk4MGM0YWM4MDQ1ZGZlOGRjODZiZjQxNjhjZDRkMmY=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
OWY3ODExMzIwN2Y4NTQxYzEwZTUzOWZkZWM5NWRkNGNhYmQ3YmE0ZjM1MzMz
|
|
14
|
+
MmEzZWUxYWMzNjU5NWYxMWRlZTk3NDZiMDQwMGYzNzRkY2ZlY2MxYWQ3YmRi
|
|
15
|
+
ZWYyZGFkNzIxZmQ0ZDExMmM4MmFkNDUzZDNmNWJjYmYyZDExZWI=
|
data/README.md
CHANGED
|
@@ -25,11 +25,12 @@ gem 'ruby-testrail'
|
|
|
25
25
|
|
|
26
26
|
### Usage
|
|
27
27
|
|
|
28
|
-
Create a Test Adaptor with the required configuration
|
|
28
|
+
Create a Test Adaptor with the required configuration. In this case a [CucumberAdaptor](lib/testrail/cucumber_adaptor.rb)
|
|
29
|
+
is used ([RSpecAdaptor](lib/testrail/rspec_adaptor.rb) is also available)
|
|
29
30
|
|
|
30
31
|
```ruby
|
|
31
|
-
testrail_adaptor = TestRail::
|
|
32
|
-
enabled: flag, # Enable or Disable the TestRail runner(default:
|
|
32
|
+
testrail_adaptor = TestRail::CucumberAdaptor.new(
|
|
33
|
+
enabled: flag, # Enable or Disable the TestRail runner(default: true)
|
|
33
34
|
url: url, # URL for custom TestRail Integration
|
|
34
35
|
username: username, # Authentication Username
|
|
35
36
|
password: password, # Authentication Password
|
|
@@ -61,3 +62,25 @@ end
|
|
|
61
62
|
|
|
62
63
|
At the end of the test suite the adaptor needs to be finished to send the results
|
|
63
64
|
to TestRail. This is done with the **end_test_run** method.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
Custom Adaptor
|
|
68
|
+
==============
|
|
69
|
+
|
|
70
|
+
A cusom adaptor could be created. It just needs to extend the base TestRail adaptor
|
|
71
|
+
and determine the data that is going to be sent to TestRail:
|
|
72
|
+
|
|
73
|
+
- section_name: The name of the section to group test cases in TestRail
|
|
74
|
+
- test_name: The name of the particular test case
|
|
75
|
+
- success: The result of the test
|
|
76
|
+
- comment: A comment describing the test
|
|
77
|
+
|
|
78
|
+
For example implementations check [CucumberAdaptor](lib/testrail/cucumber_adaptor.rb)
|
|
79
|
+
or [RSpecAdaptor](lib/testrail/rspec_adaptor.rb)
|
|
80
|
+
|
|
81
|
+
TODO
|
|
82
|
+
====
|
|
83
|
+
|
|
84
|
+
- Unit test for all classes
|
|
85
|
+
- Configurable test run start and end
|
|
86
|
+
- Functional Test again a real TestRail integration project
|
data/lib/testrail/adaptor.rb
CHANGED
|
@@ -68,6 +68,22 @@ module TestRail
|
|
|
68
68
|
@test_run.close unless @test_run.failure_count > 0
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
+
protected
|
|
72
|
+
|
|
73
|
+
def submit_test_result(
|
|
74
|
+
section_name:,
|
|
75
|
+
test_name:,
|
|
76
|
+
success:,
|
|
77
|
+
comment:
|
|
78
|
+
)
|
|
79
|
+
@test_run.add_test_result(
|
|
80
|
+
section_name: section_name,
|
|
81
|
+
test_name: test_name,
|
|
82
|
+
success: success,
|
|
83
|
+
comment: comment
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
71
87
|
end
|
|
72
88
|
|
|
73
89
|
end
|
|
@@ -35,11 +35,12 @@ module TestRail
|
|
|
35
35
|
test_comment = scenario.exception
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
submit_test_result(
|
|
39
39
|
section_name: test_case_section,
|
|
40
40
|
test_name: test_case_name,
|
|
41
41
|
success: test_result,
|
|
42
|
-
comment: test_comment
|
|
42
|
+
comment: test_comment
|
|
43
|
+
)
|
|
43
44
|
end
|
|
44
45
|
|
|
45
46
|
end
|
|
@@ -26,11 +26,12 @@ module TestRail
|
|
|
26
26
|
test_result = example.exception.nil?
|
|
27
27
|
test_comment = example.exception
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
submit_test_result(
|
|
30
30
|
section_name: test_case_section,
|
|
31
31
|
test_name: test_case_name,
|
|
32
32
|
success: test_result,
|
|
33
|
-
comment: test_comment
|
|
33
|
+
comment: test_comment
|
|
34
|
+
)
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
end
|
data/ruby-testrail.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = 'ruby-testrail'
|
|
3
|
-
spec.version = '1.1.
|
|
3
|
+
spec.version = '1.1.2'
|
|
4
4
|
spec.date = '2016-04-26'
|
|
5
5
|
spec.summary = 'Ruby TestRail integration with RSpec and Cucumber Test Suites'
|
|
6
6
|
spec.description = 'Library to integrate Test Suite with TestRail'
|