ruby-testrail 1.1.0 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGQ3MDc4NzM4YjdmOWRlZGY3ZjZiZjVlYjU3YzVlY2QwNTliZjUxZg==
4
+ NzZmOGQ0ODgwNDViMTVjYWY1ZTc2ZjE5ZmNjNzZiNzY0MjgwNzBiNQ==
5
5
  data.tar.gz: !binary |-
6
- MmVmOThiYzE4NWYwZTg0NDUwZDQ1ZWY0NjMzMTZiYjFkN2Y4NmVlZA==
6
+ ZjIzOGFjMWNmOWM0YmZiZmNmZjk1YWEwYmYxZjNiOTI2ODlmMTliOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDZlNGE4ZTdlNzg1OWI4MTY3YmI5YjZlZWExZDE4MzIxZDI1MWEzNWYxM2Vj
10
- MWUyYWM4NDE1YjQwNGU1NDkzZjg4ZWU4ZjQyMWY1M2Y3MTk4OWI1NWNkMjBh
11
- MGJlYWZlYjk3ODA5Mjg5MTAxYzJmMzM2OWVjOGY2MTRjNGQyYTQ=
9
+ ZDhjNGQyZjJmYjBhZmMyOGNmN2QxOTY1ZTBhNGY4MmIwYzMyNjg2MWRiMTM3
10
+ NTUzZjNlZDY4MmQyMWE2NTVmNjJhYWE3MGYxMDdkMGJlZDdlYWFjYWRmOGE3
11
+ YjljZDA3NTk4MGM0YWM4MDQ1ZGZlOGRjODZiZjQxNjhjZDRkMmY=
12
12
  data.tar.gz: !binary |-
13
- Y2FiMzhiZGRiOTgwZjA5MWI1MzhjMGFlYzFkNzU4ZWY3MTFmZGM2ZmEyOWJk
14
- OTRhODBkNmJlNTNkYjljZjk0YWYxNzRkNzM4ZjdjNTg3NDdlMmEwMmRmN2U2
15
- ZWVjNDg3NDFlOWRiYmEzODY3M2JjZDE1NDQxNGZiNTZiNjM0MzA=
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::Adaptor.new(
32
- enabled: flag, # Enable or Disable the TestRail runner(default: false)
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
@@ -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
- @test_run.add_test_result(
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
- @test_run.add_test_result(
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'ruby-testrail'
3
- spec.version = '1.1.0'
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'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-testrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Durante