marsh_grass 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +41 -8
- data/lib/marsh_grass/version.rb +1 -1
- data/marsh_grass.gemspec +3 -3
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: facd8238aebfd67c9c49832abce8fa371d9bba3c09d24361a952ad6398b3fd26
|
4
|
+
data.tar.gz: f2a81322cc5170eb3d51f417fc0875aa797bf3bcf3f5da9bc8294ba078b97d91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41744d41b0dbc7c89ca2389ffff88767fbe7b366f8a48f17d609d41aa152296e6b00e41e1a77e883e62360a682f24f18bd797f3f9531cc4621a7c872893b90e5
|
7
|
+
data.tar.gz: '08bac1ca41f2889ae804faac20da4982fedfa8337c0e795ef996ff3e74c9a0ea1fe6c79928c36019fa03b0c3f519b15bd4c360edd765d60513fb91622978de88'
|
data/.travis.yml
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,28 @@
|
|
1
1
|
# MarshGrass
|
2
2
|
|
3
|
-
|
3
|
+
Finally! A way to examine the behavior of intermittent failures in RSpec.
|
4
4
|
|
5
|
-
|
5
|
+
This gem allows you to subject an intermittently failing test to a variety of circumstances in an attempt to discern what combination of events leads to failure.
|
6
|
+
|
7
|
+
## Background
|
8
|
+
|
9
|
+
Intermittent failures are challenging because the failure conditions are more difficult to pinpoint than with tests that fail 100% of the time.
|
10
|
+
|
11
|
+
Intermittent failures are also more likely to make it into production. They often pass during CI testing and code review and then crop up days or weeks later.
|
12
|
+
|
13
|
+
In programming, there is no such thing as a "random" failure. Every intermittent failure actually fails consistently, every single time... under the right set of circumstances. Perhaps your test only fails on Friday afternoons. Or, 10% of the time under race conditions. We once had a test that failed on every power of 2 run: on the 2nd, 4th, 8th, 16th run, etc. The more we ran it, the more elusive it became.
|
14
|
+
|
15
|
+
Often, the first step in fixing such a failure is to make it fail consistently. That way, as you change your code, you can use the test to confirm when you've fixed the root cause. After all, that is the purpose of the test!
|
16
|
+
|
17
|
+
## Features
|
18
|
+
This gem subjects a given test to the following circumstances:
|
19
|
+
- repetitions
|
20
|
+
- range of speeds in execution
|
21
|
+
- execution at all times of day
|
22
|
+
- execution in all time zones
|
23
|
+
- execution at all the milliseconds surrounding a particular time of day
|
24
|
+
|
25
|
+
In our experience, repetitions is the option we use the most often. It gives the broadest feedback and is very effective at uncovering race conditions.
|
6
26
|
|
7
27
|
## Installation
|
8
28
|
|
@@ -21,18 +41,31 @@ Or install it yourself as:
|
|
21
41
|
$ gem install marsh_grass
|
22
42
|
|
23
43
|
## Usage
|
44
|
+
Feature use:
|
45
|
+
- N repetitions (default: 1000, or specify integer)
|
46
|
+
- Times of day (default: all hours, minutes, seconds or specify :hours, :minutes, :seconds)
|
47
|
+
- Time zones (executes against all hour and half-hour time zones)
|
48
|
+
- Elapsed time during test execution (default: (1..10) execution slow-down multipliers or specify range)
|
49
|
+
- Surrounding time, i.e., clock change over during the test (must specify hour: <integer>, minute: <integer>, second: <integer>)
|
24
50
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
51
|
+
Surrounding time runs test at every millisecond from 1 sec before to 1 sec after specified time. This is particularly useful for discerning rate of failure near and at midnight.
|
28
52
|
|
29
|
-
|
53
|
+
### Examples
|
54
|
+
Simple example:
|
55
|
+
```ruby
|
56
|
+
it 'uses default repetitions', :repetitions do
|
57
|
+
...
|
58
|
+
end
|
30
59
|
|
31
|
-
|
60
|
+
it 'uses specific repetitions', repetitions: 20 do
|
61
|
+
...
|
62
|
+
end
|
63
|
+
```
|
64
|
+
[Full Examples](./spec/marsh_grass_spec.rb) of tests using each feature.
|
32
65
|
|
33
66
|
## Contributing
|
34
67
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
68
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/RoleModel/marsh_grass.
|
36
69
|
|
37
70
|
## License
|
38
71
|
|
data/lib/marsh_grass/version.rb
CHANGED
data/marsh_grass.gemspec
CHANGED
@@ -10,11 +10,11 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.version = MarshGrass::VERSION
|
11
11
|
spec.authors = [
|
12
12
|
'Wes Rich',
|
13
|
-
'Amanda
|
13
|
+
'Amanda Pouget'
|
14
14
|
]
|
15
15
|
spec.email = [
|
16
16
|
'wes.rich@rolemodelsoftware.com',
|
17
|
-
'amanda.
|
17
|
+
'amanda.pouget@rolemodelsoftware.com'
|
18
18
|
]
|
19
19
|
|
20
20
|
spec.summary = %q{A set of tools to help diagnose random test failures.}
|
@@ -30,9 +30,9 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_paths = ['lib']
|
31
31
|
|
32
32
|
spec.add_development_dependency 'bundler', '~> 1.15'
|
33
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
34
33
|
spec.add_development_dependency 'pry-byebug', '~> 3'
|
35
34
|
spec.add_development_dependency 'pry-doc', '~> 0'
|
35
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
36
36
|
spec.add_dependency 'rspec', '~> 3.6'
|
37
37
|
spec.add_dependency 'timecop', '~> 0'
|
38
38
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marsh_grass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wes Rich
|
8
|
-
- Amanda
|
8
|
+
- Amanda Pouget
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -26,47 +26,47 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.15'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: pry-byebug
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '3'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '3'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name: pry-
|
43
|
+
name: pry-doc
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
62
|
+
version: '10.0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
69
|
+
version: '10.0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rspec
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,7 +99,7 @@ description: Currently works with RSpec tags to run against possible test failur
|
|
99
99
|
scenarios.
|
100
100
|
email:
|
101
101
|
- wes.rich@rolemodelsoftware.com
|
102
|
-
- amanda.
|
102
|
+
- amanda.pouget@rolemodelsoftware.com
|
103
103
|
executables: []
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files: []
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.7.7
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: A set of tools to help diagnose random test failures.
|