testrailtagging 0.3.8.5 → 0.3.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +23 -10
- data/lib/files/testrail_operations.rb +1 -1
- data/lib/files/testrail_rspec_integration.rb +5 -1
- data/lib/files/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1704bff5ff0563958d35e1fadf2a6fbc6da34865
|
4
|
+
data.tar.gz: 8d72ac9b1bda1be79d704d9827f574b065979062
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb26a2d4685020a0407b335624e33df77418afa801d26f928de90198d02f54bdc2a99f063b4128b55a41d89be0bd25a3d874e8c67309f062cdc8749565b98e89
|
7
|
+
data.tar.gz: 38d54e8f36886e5d89ab126a289795244706211d1d4966085009f02f8bb9fd5c155bf92a20e3447989b09247b8d03c958065a0ca6c8e6cb3494567c6661e2111
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Testrailtagging is some ruby modules and classes that integrate rspec together with GuRock's Testrail web-application.
|
4
4
|
The main feature of this gem is to allow realtime reporting of rspec results to testrail.
|
5
5
|
|
6
|
-
There is also functionality to push and pull data to testrail.
|
6
|
+
There is also functionality to push and pull data to testrail.
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
@@ -21,15 +21,16 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
$ gem install testrailtagging
|
23
23
|
|
24
|
-
##
|
24
|
+
## Configuration
|
25
25
|
|
26
26
|
First, you must have a valid and active testrail account you want to post results to.
|
27
27
|
Second to use the API's you will need a username and a password for testrail.
|
28
28
|
|
29
29
|
Hence to do anything with this gem you will need to set the following environment variables:
|
30
|
-
|
30
|
+
|
31
31
|
`TESTRAIL_USER`
|
32
32
|
`TESTRAIL_PASSWORD`
|
33
|
+
`TESTRAIL_URL` (example:"https://canvas.testrail.com")
|
33
34
|
|
34
35
|
which this gem will look for and use.
|
35
36
|
|
@@ -37,11 +38,12 @@ which this gem will look for and use.
|
|
37
38
|
`TESTRAIL_RUN_DELETE_FORCE`
|
38
39
|
With RUN_DELETE_DAYS defined the gem will delete all test runs in the provided plan_id that are older than
|
39
40
|
the days specified. There is a limit of 7 days which can be overridden with RUN_DELETE_FORCE set to true.
|
40
|
-
|
41
|
+
|
41
42
|
### For Reporting results to testrail
|
42
43
|
|
43
44
|
This is for reporting rspec results to a pre-existing test run at testrail.com.
|
44
|
-
|
45
|
+
#### Testrail Id
|
46
|
+
In testrail find the ID of the test run you want to push results to. You can find it in URL like this:
|
45
47
|
|
46
48
|
`https://blablabla.testrail.com/index.php?/runs/view/14153`
|
47
49
|
|
@@ -51,7 +53,8 @@ Then you set an environment variable called TESTRAIL_RUN_ID, with that value. Fo
|
|
51
53
|
|
52
54
|
`export TESTRAIL_RUN_ID=14153`
|
53
55
|
|
54
|
-
|
56
|
+
#### Batching Results (optional)
|
57
|
+
You can also set an optional environment variable to report results in batches rather than after each test
|
55
58
|
case.
|
56
59
|
This helps reduce traffic to Testrail and also provides less flakiness in results not being posted when
|
57
60
|
something slow down testrail. To do this, add the following variable and set it to whatever number of test
|
@@ -59,8 +62,8 @@ case results you'd like to have posted at a time:
|
|
59
62
|
|
60
63
|
`TESTRAIL_BATCH_SIZE=15`
|
61
64
|
|
62
|
-
|
63
|
-
|
65
|
+
#### Setup
|
66
|
+
In your RSpec configuration file (usually spec_helper.rb) you need to call a registration function:
|
64
67
|
|
65
68
|
```ruby
|
66
69
|
RSpec.configure do |config|
|
@@ -68,9 +71,20 @@ RSpec.configure do |config|
|
|
68
71
|
end
|
69
72
|
```
|
70
73
|
|
71
|
-
Here you pass in the rspec config
|
74
|
+
Here you pass in the rspec config and an identifier you how you want to label your test id.
|
75
|
+
|
76
|
+
:bridge:
|
77
|
+
`:testrail_id`
|
78
|
+
:canvas
|
79
|
+
`:test_id`
|
72
80
|
|
73
81
|
|
82
|
+
#### How to Use
|
83
|
+
For each spec that you want to report on, you will need to tag it with the testcase id from tetrail. If this is done, the rspec results will automatically be reported for that testcase to the sepcified run.
|
84
|
+
|
85
|
+
example:
|
86
|
+
`it 'can do something nifty', :testrail_id => [1234] do`
|
87
|
+
|
74
88
|
## Development
|
75
89
|
|
76
90
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -91,4 +105,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
91
105
|
## License
|
92
106
|
|
93
107
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
94
|
-
|
@@ -33,7 +33,7 @@ module TestRailOperations
|
|
33
33
|
# Gets the Test Rail client
|
34
34
|
# http://docs.gurock.com/testrail-api2/bindings-ruby
|
35
35
|
def self.get_test_rail_client
|
36
|
-
url = "https://canvas.testrail.com"
|
36
|
+
url = ENV["TESTRAIL_URL"] || "https://canvas.testrail.com"
|
37
37
|
trclient = TestRail::APIClient.new(url)
|
38
38
|
trclient.user = ENV["TESTRAIL_USER"]
|
39
39
|
trclient.password = ENV["TESTRAIL_PASSWORD"]
|
@@ -14,7 +14,7 @@ module TestRailRSpecIntegration
|
|
14
14
|
# # This is different from simply creating a stand-alone test run from the results of the test.
|
15
15
|
# The tricky part about this is Jenkins run rspecs on multiple processes with different batches of
|
16
16
|
# rspec tests.
|
17
|
-
|
17
|
+
|
18
18
|
@@total_count = 0
|
19
19
|
@@run_count = 0
|
20
20
|
@@skip_count = 0
|
@@ -45,6 +45,10 @@ module TestRailRSpecIntegration
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def output
|
49
|
+
:testrailtagging
|
50
|
+
end
|
51
|
+
|
48
52
|
# Gets whether the formatter is active or not.
|
49
53
|
# We don't want to push results up to test rail for instance if --dry-run is specified on the command line.
|
50
54
|
def active
|
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.8.
|
4
|
+
version: 0.3.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-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.6.11
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Utilities for working with testrail.
|