semaphore_test_boosters 1.4.5 → 1.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a22f7e91007f32b4d63ba1d6f3f85dbd1b991296
4
- data.tar.gz: eea15b805b691bab72c235ffb3c62673c605385f
3
+ metadata.gz: 727d7c5926285ec72949d51f143c2088b761b7d1
4
+ data.tar.gz: 44d8f18eb76dd4048b47a24389f137f63e18826b
5
5
  SHA512:
6
- metadata.gz: 3c8468abaff49802acf8b9fa2fec687e64f12e3921f99aadb301b36fffb8e22c9e0a545397fea3c211103f472b07691254bbc4b7a3ea5c85fc7c11888b6e74a3
7
- data.tar.gz: aa45864746f4a6cf7568e3186d51e99f962ebe69e4de8d0c8e1d691d00dc4fcb0e63dfceb96dde54e0c82a110cf279aaf9d3063b28afaf4427fdd3f717b7381e
6
+ metadata.gz: e0627ba6468d637e49ea736d1f177097effa556d8a0ed57b77101eda851c7df13b50395f039d40a89107c7dc1677bf5520c281db68ac31d870283103fbb7c709
7
+ data.tar.gz: b1c33fffe27780b1678f029d8ddff3fde04f9b324e85a6170cea38cc51496f989cec38682f9214c4b799d7554fbb2a5e795de7859a6c3d5890621fa2de1b5f87
data/README.md CHANGED
@@ -12,7 +12,94 @@ gem install test_boosters
12
12
 
13
13
  ## Usage
14
14
 
15
- TODO: Write usage instructions here
15
+ ### RSpec Booster
16
+
17
+ The RSpec booster command allows you to run one out of several parallel rspec
18
+ threads.
19
+
20
+ ``` bash
21
+ rspec_booster --thread 3
22
+ ```
23
+
24
+ #### RSpec Split Configuration
25
+
26
+ The `rspec_split_configuration.json` located in your home directory is used to
27
+ pass test files to the booster. On Semaphore, this file contains a list of
28
+ specs files distributed across threads based on their estimated durations.
29
+
30
+ For example, if you have a `rspec_split_configuration.json` located in your home
31
+ directory with the following content:
32
+
33
+ ``` json
34
+ [
35
+ { :files => ["spec/a_spec.rb", "spec/b_spec.rb"] },
36
+ { :files => ["spec/c_spec.rb", "spec/d_spec.rb"] },
37
+ { :files => ["spec/e_spec.rb"] }
38
+ ]
39
+ ```
40
+
41
+ The `rspec_booster` command will deduce that you have 3 threads in total and
42
+ that you want to run `spec/a_spec.rb` and `spec/b_spec.rb` on the first thread,
43
+ `spec/c_spec.rb` and `spec/d_spec.rb` on the second thread, and `spec/e_spec.rb`
44
+ on the third thread.
45
+
46
+ #### Leftover files
47
+
48
+ The RSpec Split Configuration contains only those spec files that have an
49
+ estimated duration recorded on Semaphore. New files, whose estimated duration
50
+ is not yet stored on Semaphore will be distributed across threads in based on
51
+ their file size in a round robin fashion.
52
+
53
+ For example, if you have the following split configuration:
54
+
55
+ ``` json
56
+ [
57
+ { :files => ["spec/a_spec.rb"] }
58
+ { :files => ["spec/b_spec.rb"] }
59
+ { :files => ["spec/c_spec.rb"] }
60
+ ]
61
+ ```
62
+
63
+ and the following files in your spec directory:
64
+
65
+ ``` bash
66
+ spec/a_spec.rb
67
+ spec/b_spec.rb
68
+ spec/c_spec.rb
69
+ spec/d_spec.rb
70
+ spec/e_spec.rb
71
+ ```
72
+
73
+ When you run the `rspec_booster --thread 1` command, the files from the
74
+ configuration's first thread and some leftover files will be executed.
75
+
76
+ ``` bash
77
+ rspec_booster --thread 1
78
+
79
+ # => runs: bundle exec rspec spec/a_spec.rb spec/d_spec.rb
80
+ ```
81
+
82
+ #### Custom RSpec options
83
+
84
+ By default, `rspec_booster` passes the following options to RSpec:
85
+
86
+ ``` bash
87
+ --format documentation --format json --out ~/rspec_report.json
88
+ ```
89
+
90
+ If you want to pass additional parameters to RSpec, you can do that by setting
91
+ the `TB_RSPEC_OPTIONS` environment variable.
92
+
93
+ For example, if you want to pass a `--fail-fast` option to RSpec, you can do it
94
+ like this:
95
+
96
+ ``` bash
97
+ export TB_RSPEC_OPTIONS = '--fail-fast'
98
+
99
+ rspec_booster --thread 2
100
+
101
+ # => runs: bundle exec rspec --fail-fast --format documentation --format json --out ~/rspec_report.json <file_list>
102
+ ```
16
103
 
17
104
  ## Contributing
18
105
 
@@ -53,7 +53,7 @@ module TestBoosters
53
53
  end
54
54
 
55
55
  def rspec_options
56
- "--format documentation --format json --out #{report_path}"
56
+ "#{ENV["TB_RSPEC_OPTIONS"]} --format documentation --format json --out #{report_path}"
57
57
  end
58
58
 
59
59
  def rspec_command
@@ -1,3 +1,3 @@
1
1
  module TestBoosters
2
- VERSION = "1.4.5".freeze
2
+ VERSION = "1.5.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semaphore_test_boosters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Developers at Rendered Text
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-19 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semaphore_cucumber_booster_config