test-prof 0.11.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +109 -448
- data/LICENSE.txt +1 -1
- data/README.md +9 -13
- data/config/default.yml +3 -3
- data/lib/minitest/test_prof_plugin.rb +3 -0
- data/lib/test_prof/before_all.rb +0 -4
- data/lib/test_prof/cops/inject.rb +16 -14
- data/lib/test_prof/cops/rspec/aggregate_examples.rb +2 -2
- data/lib/test_prof/cops/rspec/aggregate_examples/its.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/line_range_helpers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/matchers_with_side_effects.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/metadata_helpers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/node_matchers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_failures.rb +2 -4
- data/lib/test_prof/event_prof/instrumentations/active_support.rb +22 -4
- data/lib/test_prof/ext/active_record_3.rb +1 -1
- data/lib/test_prof/recipes/minitest/before_all.rb +18 -13
- data/lib/test_prof/recipes/minitest/sample.rb +6 -10
- data/lib/test_prof/recipes/rspec/before_all.rb +1 -9
- data/lib/test_prof/recipes/rspec/let_it_be.rb +108 -11
- data/lib/test_prof/recipes/rspec/sample.rb +4 -2
- data/lib/test_prof/stack_prof.rb +3 -0
- data/lib/test_prof/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 796e133e85e58fec13b94d1dd51c3c9c934e122d04470115ef15788916a55d0b
|
4
|
+
data.tar.gz: a8519944d9f36a9a74371b6a9fc19e69ecfbd1155679f178a3d6b6a62425dff3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca5c8984a8ca9c4b2051be517bb462f8f0b9ba8ac582dd9cb74abeee81a98869400cbdf4e54e446de27215674bf0c90fe3b4dbeefdba620a1c5c67ff4a0ea0ce
|
7
|
+
data.tar.gz: 4591aadd9f5616d939f7e9fcf91e4b8f635f921722bbed4225b8094cd78f7e557efbf3c58e45a0ebac18acf02f5744697e87a46524081124ebf15c0232dd2e08
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,65 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
-
## master (
|
3
|
+
## master (unrealeased)
|
4
|
+
|
5
|
+
## 0.12.2 (2020-09-03)
|
6
|
+
|
7
|
+
- Execute Minitest `before_all` in the context of the current test object. ([@palkan][])
|
8
|
+
|
9
|
+
## 0.12.1 (2020-09-01)
|
10
|
+
|
11
|
+
- Minor improvements.
|
12
|
+
|
13
|
+
## 0.12.0 (2020-07-17)
|
14
|
+
|
15
|
+
- Add state leakage detection for `let_it_be`. ([@pirj][], [@jaimerson][], [@alexvko][])
|
16
|
+
|
17
|
+
- Add default let_it_be modifiers configuration. ([@palkan][])
|
18
|
+
|
19
|
+
You can configure global modifiers:
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
TestProf::LetItBe.configure do |config|
|
23
|
+
# Make refind activated by default
|
24
|
+
config.default_modifiers[:refind] = true
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
Or for specific contexts via tags:
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
context "with let_it_be reload", let_it_be_modifiers: {reload: true} do
|
32
|
+
# examples
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
- **Drop Ruby 2.4 support.** ([@palkan][])
|
37
|
+
|
38
|
+
- SAMPLE and SAMPLE_GROUP work consistently with seed in RSpec and Minitest. ([@stefkin][])
|
39
|
+
|
40
|
+
- Make sure EventProf is not affected by time freezing. ([@palkan][])
|
41
|
+
|
42
|
+
EventProf results now is not affected by `Timecop.freeze` or similar.
|
43
|
+
|
44
|
+
See more in [#181](https://github.com/test-prof/test-prof/issues/181).
|
45
|
+
|
46
|
+
- Adds the ability to define stackprof's interval sampling by using `TEST_STACK_PROF_INTERVAL` env variable ([@LynxEyes][])
|
47
|
+
|
48
|
+
Now you can use `$ TEST_STACK_PROF=1 TEST_STACK_PROF_INTERVAL=10000 rspec` to define a custom interval (in microseconds).
|
49
|
+
|
50
|
+
## 0.11.3 (2020-02-11)
|
51
|
+
|
52
|
+
- Disable `RSpec/AggregateFailures` by default. ([@pirj][])
|
53
|
+
|
54
|
+
## 0.11.2 (2020-02-11)
|
55
|
+
|
56
|
+
- Fix RuboCop integration regressions. ([@palkan][])
|
4
57
|
|
5
58
|
## 0.11.1 (2020-02-10)
|
6
59
|
|
7
60
|
- Add `config/` to the gem contents. ([@palkan][])
|
8
61
|
|
9
|
-
|
62
|
+
Fixes RuboCop integration regression from 0.11.0.
|
10
63
|
|
11
64
|
## 0.11.0 (2020-02-09)
|
12
65
|
|
@@ -32,33 +85,33 @@
|
|
32
85
|
|
33
86
|
- Use RSpec example ID instead of full description for RubyProf/Stackprof report names. ([@palkan][])
|
34
87
|
|
35
|
-
|
88
|
+
For more complex scenarios feel free to use your own report name generator:
|
36
89
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
90
|
+
```ruby
|
91
|
+
# for RubyProf
|
92
|
+
TestProf::RubyProf::Listener.report_name_generator = ->(example) { "..." }
|
93
|
+
# for Stackprof
|
94
|
+
TestProf::StackProf::Listener.report_name_generator = ->(example) { "..." }
|
95
|
+
```
|
43
96
|
|
44
97
|
- Support arrays in `let_it_be` with modifiers. ([@palkan][])
|
45
98
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
99
|
+
```ruby
|
100
|
+
# Now you can use modifiers with arrays
|
101
|
+
let_it_be(:posts, reload: true) { create_pair(:post) }
|
102
|
+
```
|
50
103
|
|
51
104
|
- Refactor `let_it_be` modifiers and allow adding custom modifiers. ([@palkan][])
|
52
105
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
106
|
+
```ruby
|
107
|
+
TestProf::LetItBe.config.register_modifier :reload do |record, val|
|
108
|
+
# ignore when `reload: false`
|
109
|
+
next record unless val
|
110
|
+
# ignore non-ActiveRecord objects
|
111
|
+
next record unless record.is_a?(::ActiveRecord::Base)
|
112
|
+
record.reload
|
113
|
+
end
|
114
|
+
```
|
62
115
|
|
63
116
|
- Print warning when `ActiveRecordSharedConnection` is used in the version of Rails
|
64
117
|
supporting `lock_threads` (5.1+). ([@palkan][])
|
@@ -67,450 +120,54 @@ supporting `lock_threads` (5.1+). ([@palkan][])
|
|
67
120
|
|
68
121
|
- Add threshold and custom event support to FactoryDoctor. ([@palkan][])
|
69
122
|
|
70
|
-
|
71
|
-
|
72
|
-
|
123
|
+
```sh
|
124
|
+
$ FDOC=1 FDOC_EVENT="sql.rom" FDOC_THRESHOLD=0.1 rspec
|
125
|
+
```
|
73
126
|
|
74
127
|
- Add Fabrication support to FactoryDoctor. ([@palkan][])
|
75
128
|
|
76
129
|
- Add `guard` and `top_level` options to `EventProf::Monitor`. ([@palkan][])
|
77
130
|
|
78
|
-
|
131
|
+
For example:
|
79
132
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
133
|
+
```ruby
|
134
|
+
TestProf::EventProf.monitor(
|
135
|
+
Sidekiq::Client,
|
136
|
+
"sidekiq.inline",
|
137
|
+
:raw_push,
|
138
|
+
top_level: true,
|
139
|
+
guard: ->(*) { Sidekiq::Testing.inline? }
|
140
|
+
)
|
141
|
+
```
|
89
142
|
|
90
143
|
- Add global `before_all` hooks. ([@danielwaterworth][], [@palkan][])
|
91
144
|
|
92
|
-
|
93
|
-
|
145
|
+
Now you can run additional code before and after every `before_all` transaction
|
146
|
+
begins and rollbacks:
|
94
147
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
148
|
+
```ruby
|
149
|
+
TestProf::BeforeAll.configure do |config|
|
150
|
+
config.before(:begin) do
|
151
|
+
# do something before transaction opens
|
152
|
+
end
|
100
153
|
|
101
|
-
|
102
|
-
|
103
|
-
end
|
154
|
+
config.after(:rollback) do
|
155
|
+
# do something after transaction closes
|
104
156
|
end
|
105
|
-
|
157
|
+
end
|
158
|
+
```
|
106
159
|
|
107
160
|
- Add ability to use `let_it_be` aliases with predefined options. ([@danielwaterworth][])
|
108
161
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
162
|
+
```ruby
|
163
|
+
TestProf::LetItBe.configure do |config|
|
164
|
+
config.alias_to :let_it_be_with_refind, refind: true
|
165
|
+
end
|
166
|
+
```
|
114
167
|
|
115
168
|
- Made FactoryProf measure and report on timing ([@danielwaterworth][])
|
116
169
|
|
117
|
-
|
118
|
-
|
119
|
-
- **Ruby 2.4+ is requiered** ([@palkan][])
|
120
|
-
|
121
|
-
- **RSpec 3.5+ is requiered for RSpec features** ([@palkan][])
|
122
|
-
|
123
|
-
- Make `before_all` compatible with [`isolator`](https://github.com/palkan/isolator). ([@palkan][])
|
124
|
-
|
125
|
-
- Add `with_logging` and `with_ar_logging` helpers to logging recipe. ([@palkan][])
|
126
|
-
|
127
|
-
- Make `before_all` for Active Record `lock_thread` aware. ([@palkan][])
|
128
|
-
|
129
|
-
`before_all` can went crazy if you open multiple connections within it
|
130
|
-
(since it tracks the number of open transactions).
|
131
|
-
Rails 5+ `lock_thread` feature only locks the connection thread in
|
132
|
-
`before`/`setup` hook thus making it possible to have multiple connections/transactions
|
133
|
-
in `before_all` (e.g. performing jobs with Active Job async adapter).
|
134
|
-
|
135
|
-
## 0.7.5 (2019-02-22)
|
136
|
-
|
137
|
-
- Make `let_it_be` and `before_all` work with `include_context`. ([@palkan][])
|
138
|
-
|
139
|
-
Fixes [#117](https://github.com/palkan/test-prof/issues/117)
|
140
|
-
|
141
|
-
## 0.7.4 (2019-02-16)
|
142
|
-
|
143
|
-
- Add JSON report support for StackProf. ([@palkan][])
|
144
|
-
|
145
|
-
- Add ability to specify report/artifact name suffixes. ([@palkan][])
|
146
|
-
|
147
|
-
## 0.7.3 (2018-11-07)
|
148
|
-
|
149
|
-
- Add a header with the general information on factories usage [#99](https://github.com/palkan/test-prof/issues/99) ([@szemek][])
|
150
|
-
|
151
|
-
- Improve test sampling.([@mkldon][])
|
152
|
-
|
153
|
-
```bash
|
154
|
-
$ SAMPLE=10 rake test # runs 10 random test examples
|
155
|
-
$ SAMPLE_GROUPS=10 rake test # runs 10 random example groups
|
156
|
-
```
|
157
|
-
|
158
|
-
- Extend Event Prof formatter to include the absolute run time and the percentage of the event tim [#100](https://github.com/palkan/test-prof/issues/100) ([@dmagro][])
|
159
|
-
|
160
|
-
## 0.7.2 (2018-10-08)
|
161
|
-
|
162
|
-
- Add `RSpec/AggregateFailures` support for non-regular 'its' examples. ([@broels][])
|
163
|
-
|
164
|
-
## 0.7.1 (2018-08-20)
|
165
|
-
|
166
|
-
- Add ability to ignore connection configurations in shared connection.([@palkan][])
|
167
|
-
|
168
|
-
Example:
|
169
|
-
|
170
|
-
```ruby
|
171
|
-
# Do not use shared connection for sqlite db
|
172
|
-
TestProf::ActiveRecordSharedConnection.ignore { |config| config[:adapter] == "sqlite3" }
|
173
|
-
```
|
174
|
-
|
175
|
-
## 0.7.0 (2018-08-12)
|
176
|
-
|
177
|
-
- **Ruby 2.3+ is required**. ([@palkan][])
|
178
|
-
|
179
|
-
Ruby 2.2 EOL was on 2018-03-31.
|
180
|
-
|
181
|
-
- Upgrade RubyProf integration to `ruby-prof >= 0.17`. ([@palkan][])
|
182
|
-
|
183
|
-
Use `exclude_common_methods!` instead of the deprecated `eliminate_methods!`.
|
184
|
-
|
185
|
-
Add RSpec specific exclusions.
|
186
|
-
|
187
|
-
Add ability to specify custom exclusions through `config.custom_exclusions`, e.g.:
|
188
|
-
|
189
|
-
```ruby
|
190
|
-
TestProf::RubyProf.configure do |config|
|
191
|
-
config.custom_exclusions = {User => %i[save save!]}
|
192
|
-
end
|
193
|
-
```
|
194
|
-
|
195
|
-
## 0.6.0 (2018-06-29)
|
196
|
-
|
197
|
-
### Features
|
198
|
-
|
199
|
-
- Add `EventProf.monitor` to instrument arbitrary methods. ([@palkan][])
|
200
|
-
|
201
|
-
Add custom instrumetation easily:
|
202
|
-
|
203
|
-
```ruby
|
204
|
-
class Work
|
205
|
-
def do
|
206
|
-
# ...
|
207
|
-
end
|
208
|
-
end
|
209
|
-
|
210
|
-
# Instrument Work#do calls with "my.work" event
|
211
|
-
TestProf::EventProf.monitor(Work, "my.work", :do)
|
212
|
-
```
|
213
|
-
|
214
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/event_prof?id=profile-arbitrary-methods)
|
215
|
-
|
216
|
-
- Adapterize `before_all`. ([@palkan][])
|
217
|
-
|
218
|
-
Now it's possible to write your own adapter for `before_all` to manage transactions.
|
219
|
-
|
220
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/before_all?id=database-adapters)
|
221
|
-
|
222
|
-
- Add `before_all` for Minitest. ([@palkan][])
|
223
|
-
|
224
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/before_all?id=minitest-experimental)
|
225
|
-
|
226
|
-
### Fixes & Improvements
|
227
|
-
|
228
|
-
- Show top `let` declarations per example group in RSpecDissect profiler. ([@palkan][])
|
229
|
-
|
230
|
-
The output now includes the following information:
|
231
|
-
|
232
|
-
```
|
233
|
-
Top 5 slowest suites (by `let` time):
|
234
|
-
|
235
|
-
FunnelsController (./spec/controllers/funnels_controller_spec.rb:3) – 00:38.532 of 00:43.649 (133)
|
236
|
-
↳ user – 3
|
237
|
-
↳ funnel – 2
|
238
|
-
ApplicantsController (./spec/controllers/applicants_controller_spec.rb:3) – 00:33.252 of 00:41.407 (222)
|
239
|
-
↳ user – 10
|
240
|
-
↳ funnel – 5
|
241
|
-
```
|
242
|
-
|
243
|
-
Enabled by default. Disable it with:
|
244
|
-
|
245
|
-
```ruby
|
246
|
-
TestProf::RSpecDissect.configure do |config|
|
247
|
-
config.let_stats_enabled = false
|
248
|
-
end
|
249
|
-
```
|
250
|
-
|
251
|
-
- [Fix [#80](https://github.com/palkan/test-prof/issues/80)] Added ability to preserve traits. ([@Vasfed][])
|
252
|
-
|
253
|
-
Disabled by default for compatibility. Enable globally by `FactoryDefault.preserve_traits = true` or for single `create_default`: `create_default(:user, preserve_traits: true)`
|
254
|
-
|
255
|
-
When enabled - default object will be used only when there's no [traits](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#traits) in association.
|
256
|
-
|
257
|
-
- Add ability to run only `let` or `before` profiler with RSpecDissect. ([@palkan][])
|
258
|
-
|
259
|
-
- Collect _raw_ data with StackProf by default. ([@palkan][])
|
260
|
-
|
261
|
-
- Refactor `:with_clean_fixture` to clean data once per group. ([@palkan][])
|
262
|
-
|
263
|
-
- [Fix [#75](https://github.com/palkan/test-prof/issues/75)] Fix `RSpec/Aggregate` failures with non-regular examples. ([@palkan][])
|
264
|
-
|
265
|
-
Do not take into account `xit`, `pending`, `its`, etc. examples,
|
266
|
-
only consider regular `it`, `specify`, `scenario`, `example`.
|
267
|
-
|
268
|
-
## 0.5.0 (2018-04-25)
|
269
|
-
|
270
|
-
### Features
|
271
|
-
|
272
|
-
- Add events support to TagProf. ([@palkan][])
|
273
|
-
|
274
|
-
Example usage:
|
275
|
-
|
276
|
-
```sh
|
277
|
-
TAG_PROF=type TAG_PROF_EVENT=sql.active_record rspec
|
278
|
-
```
|
279
|
-
|
280
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/tag_prof?id=profiling-events)
|
281
|
-
|
282
|
-
- Add logging helpers for Rails. ([@palkan][])
|
283
|
-
|
284
|
-
Enable verbose logging globally:
|
285
|
-
|
286
|
-
```sh
|
287
|
-
LOG=all rspec
|
288
|
-
```
|
289
|
-
|
290
|
-
Or per example (group):
|
291
|
-
|
292
|
-
```ruby
|
293
|
-
it "does smth weird", :log do
|
294
|
-
# ...
|
295
|
-
end
|
296
|
-
```
|
297
|
-
|
298
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/logging)
|
299
|
-
|
300
|
-
- Add HTML report for `TagProf`. ([@palkan][])
|
301
|
-
|
302
|
-
Generate HTML report by setting `TAG_PROF_FORMAT` to `html`.
|
303
|
-
|
304
|
-
- Add ability to track multiple events at the same time with `EventProf`. ([@palkan][])
|
305
|
-
|
306
|
-
- Add `AnyFixture` DSL. ([@palkan][])
|
307
|
-
|
308
|
-
Example:
|
309
|
-
|
310
|
-
```ruby
|
311
|
-
# Enable DSL
|
312
|
-
using TestProf::AnyFixture::DSL
|
313
|
-
|
314
|
-
# and then you can use `fixture` method (which is just an alias for `TestProf::AnyFixture.register`)
|
315
|
-
before(:all) { fixture(:account) }
|
316
|
-
|
317
|
-
# You can also use it to fetch the record (instead of storing it in instance variable)
|
318
|
-
let(:account) { fixture(:account) }
|
319
|
-
```
|
320
|
-
|
321
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=dsl)
|
322
|
-
|
323
|
-
- Add `AnyFixture` usage report. ([@palkan][])
|
324
|
-
|
325
|
-
Enable `AnyFixture` usage reporting with `ANYFIXTURE_REPORTING=1` or with:
|
326
|
-
|
327
|
-
```ruby
|
328
|
-
TestProf::AnyFixture.reporting_enabled = true
|
329
|
-
```
|
330
|
-
|
331
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=usage-report)
|
332
|
-
|
333
|
-
- Add `ActiveRecordSharedConnection` recipe. ([@palkan][])
|
334
|
-
|
335
|
-
Force ActiveRecord to use the same connection between threads (to avoid database cleaning in browser tests).
|
336
|
-
|
337
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/active_record_shared_connection)
|
338
|
-
|
339
|
-
- [#70](https://github.com/palkan/test-prof/pull/70) Add `FactoryAllStub` recipe. ([@palkan][])
|
340
|
-
|
341
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/factory_all_stub)
|
342
|
-
|
343
|
-
- Add `ActiveRecordRefind` refinement. ([@palkan][])
|
344
|
-
|
345
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=activerecordrefind)
|
346
|
-
|
347
|
-
### Fixes & Improvements
|
348
|
-
|
349
|
-
- **Brand new documentatation website: https://test-prof.evilmartians.io/**
|
350
|
-
|
351
|
-
- Disable referential integrity when cleaning AnyFixture. ([@palkan][])
|
352
|
-
|
353
|
-
|
354
|
-
## 0.4.9 (2018-03-20)
|
355
|
-
|
356
|
-
- [Fix [#64](https://github.com/palkan/test-prof/issues/64)] Fix dependencies requiring for FactoryDefault. ([@palkan][])
|
357
|
-
|
358
|
-
- [Fix [#60](https://github.com/palkan/test-prof/issues/60)] Fix RSpecDissect reporter hooks. ([@palkan][])
|
359
|
-
|
360
|
-
Consider only `example_failed` and `example_passed` to ensure that the `run_time`
|
361
|
-
is available.
|
362
|
-
|
363
|
-
## 0.4.8 (2018-01-17)
|
364
|
-
|
365
|
-
- Add `minitest` 5.11 support. ([@palkan][])
|
366
|
-
|
367
|
-
- Fix `spring` detection. ([@palkan][])
|
368
|
-
|
369
|
-
Some `spring`-related gems do not check whether Spring is running and load
|
370
|
-
Spring modules. Thus we have `Spring` defined (and even `Spring.after_fork` defined) but no-op.
|
371
|
-
|
372
|
-
Now we require that `Spring::Applcation` is defined in order to rely on Spring.
|
373
|
-
|
374
|
-
Possibly fixes [#47](https://github.com/palkan/test-prof/issues/47).
|
375
|
-
|
376
|
-
## 0.4.7 (2017-12-25)
|
377
|
-
|
378
|
-
- [#57](https://github.com/palkan/test-prof/pull/57) Fix RubyProf Printers Support ([@rabotyaga][])
|
379
|
-
|
380
|
-
## 0.4.6 (2017-12-17)
|
381
|
-
|
382
|
-
- Upgrade RSpec/AggregateFailures to RuboCop 0.52.0. ([@palkan][])
|
383
|
-
|
384
|
-
RuboCop < 0.51.0 is not supported anymore.
|
385
|
-
|
386
|
-
- [Fixes [#49](https://github.com/palkan/test-prof/issues/49)] Correctly detect RSpec version in `let_it_be`. ([@desoleary][])
|
387
|
-
|
388
|
-
## 0.4.5 (2017-12-09)
|
389
|
-
|
390
|
-
- Fix circular require in `lib/factory_doctor/minitest`. ([@palkan][])
|
391
|
-
|
392
|
-
## 0.4.4 (2017-11-08)
|
393
|
-
|
394
|
-
- [Fixes [#48](https://github.com/palkan/test-prof/issues/48)] Respect RubyProf reports files extensions. ([@palkan][])
|
395
|
-
|
396
|
-
## 0.4.3 (2017-10-26)
|
397
|
-
|
398
|
-
- [#46](https://github.com/palkan/test-prof/pull/46) Support FactoryBot, which is [former FactoryGirl](https://github.com/thoughtbot/factory_bot/pull/1051),
|
399
|
-
while maintaining compatibility with latter. ([@Shkrt][])
|
400
|
-
|
401
|
-
## 0.4.2 (2017-10-23)
|
402
|
-
|
403
|
-
- Fix bug with multiple `before_all` within one group. ([@palkan][])
|
404
|
-
|
405
|
-
## 0.4.1 (2017-10-18)
|
406
|
-
|
407
|
-
- [#44](https://github.com/palkan/test-prof/pull/44) Support older versions of RSpec. ([@palkan][])
|
408
|
-
|
409
|
-
Support RSpec 3.1.0+ in general.
|
410
|
-
|
411
|
-
`let_it_be` supports only RSpec 3.3.0+.
|
412
|
-
|
413
|
-
RSpecDissect `let` tracking supports only RSpec 3.3.0+.
|
414
|
-
|
415
|
-
- [#38](https://github.com/palkan/test-prof/pull/38) Factory Doctor Minitest integration. ([@IDolgirev][])
|
416
|
-
|
417
|
-
It is possible now to use Factory Doctor with Minitest
|
418
|
-
|
419
|
-
## 0.4.0 (2017-10-03)
|
420
|
-
|
421
|
-
### Features:
|
422
|
-
|
423
|
-
- [#29](https://github.com/palkan/test-prof/pull/29) EventProf Minitest integration. ([@IDolgirev][])
|
424
|
-
|
425
|
-
It is possible now to use Event Prof with Minitest
|
426
|
-
|
427
|
-
- [#30](https://github.com/palkan/test-prof/pull/30) Fabrication support for FactoryProf. ([@Shkrt][])
|
428
|
-
|
429
|
-
FactoryProf now also accounts objects created by Fabrication gem (in addition to FactoryGirl)
|
430
|
-
|
431
|
-
## 0.3.0 (2017-09-21)
|
432
|
-
|
433
|
-
### Features:
|
434
|
-
|
435
|
-
- Combine RSpecStamp with FactoryDoctor. ([@palkan][])
|
436
|
-
|
437
|
-
Automatically mark _bad_ examples with custom tags.
|
438
|
-
|
439
|
-
- [#17](https://github.com/palkan/test-prof/pull/17) Combine RSpecStamp with EventProf and RSpecDissect. ([@palkan][])
|
440
|
-
|
441
|
-
It is possible now to automatically mark _slow_ examples and groups with custom tags. For example:
|
442
|
-
|
443
|
-
```sh
|
444
|
-
$ EVENT_PROF="sql.active_record" EVENT_PROF_STAMP="slow:sql" rspec ...
|
445
|
-
```
|
446
|
-
|
447
|
-
After running the command above the top 5 slowest example groups would be marked with `slow: :sql` tag.
|
448
|
-
|
449
|
-
- [#14](https://github.com/palkan/test-prof/pull/14) RSpecDissect profiler. ([@palkan][])
|
450
|
-
|
451
|
-
RSpecDissect tracks how much time do you spend in `before` hooks and memoization helpers (i.e. `let`) in your tests.
|
452
|
-
|
453
|
-
- [#13](https://github.com/palkan/test-prof/pull/13) RSpec `let_it_be` method. ([@palkan][])
|
454
|
-
|
455
|
-
Just like `let`, but persist the result for the whole group (i.e. `let` + `before_all`).
|
456
|
-
|
457
|
-
### Improvements:
|
458
|
-
|
459
|
-
- Add ability to specify RubyProf report through `TEST_RUBY_PROF` env variable. ([@palkan][])
|
460
|
-
|
461
|
-
- Add ability to specify StackProf raw mode through `TEST_STACK_PROF` env variable. ([@palkan][])
|
462
|
-
|
463
|
-
### Changes
|
464
|
-
|
465
|
-
- Use RubyProf `FlatPrinter` by default (was `CallStackPrinter`). ([@palkan][])
|
466
|
-
|
467
|
-
## 0.2.5 (2017-08-30)
|
468
|
-
|
469
|
-
- [#16](https://github.com/palkan/test-prof/pull/16) Support Ruby >= 2.2.0 (was >= 2.3.0). ([@palkan][])
|
470
|
-
|
471
|
-
## 0.2.4 (2017-08-29)
|
472
|
-
|
473
|
-
- EventProf: Fix regression bug with examples profiling. ([@palkan][])
|
474
|
-
|
475
|
-
There was a bug when an event occurs before the example has started (e.g. in `before(:context)` hook).
|
476
|
-
|
477
|
-
## 0.2.3 (2017-08-28)
|
478
|
-
|
479
|
-
- Minor improvements. ([@palkan][])
|
480
|
-
|
481
|
-
## 0.2.2 (2017-08-23)
|
482
|
-
|
483
|
-
- Fix time calculation when Time class is monkey-patched. ([@palkan][])
|
484
|
-
|
485
|
-
Add `TestProf.now` method which is just a copy of original `Time.now` and use it everywhere.
|
486
|
-
|
487
|
-
Fixes [#10](https://github.com/palkan/test-prof/issues/10).
|
488
|
-
|
489
|
-
## 0.2.1 (2017-08-19)
|
490
|
-
|
491
|
-
- Detect `RSpec` by checking the presence of `RSpec::Core`. ([@palkan][])
|
492
|
-
|
493
|
-
Fixes [#8](https://github.com/palkan/test-prof/issues/8).
|
494
|
-
|
495
|
-
## 0.2.0 (2017-08-18)
|
496
|
-
|
497
|
-
- Ensure output directory exists. ([@danielwestendorf][])
|
498
|
-
|
499
|
-
**Change default output dir** to "tmp/test_prof".
|
500
|
-
|
501
|
-
Rename `#artefact_path` to `#artifact_path` to be more US-like
|
502
|
-
|
503
|
-
Ensure output dir exists in `#artifact_path` method.
|
504
|
-
|
505
|
-
- FactoryDoctor: print success message when no bad examples found. ([@palkan][])
|
506
|
-
|
507
|
-
## 0.1.1 (2017-08-17)
|
508
|
-
|
509
|
-
- AnyFixture: clean tables in reverse order to not fail when foreign keys exist. ([@marshall-lee][])
|
510
|
-
|
511
|
-
## 0.1.0 (2017-08-15)
|
512
|
-
|
513
|
-
- Initial version. ([@palkan][])
|
170
|
+
See [changelog](https://github.com/test-prof/test-prof/blob/v0.8.0/CHANGELOG.md) for versions <0.9.0.
|
514
171
|
|
515
172
|
[@palkan]: https://github.com/palkan
|
516
173
|
[@marshall-lee]: https://github.com/marshall-lee
|
@@ -528,3 +185,7 @@ Fixes [#10](https://github.com/palkan/test-prof/issues/10).
|
|
528
185
|
[@tyleriguchi]: https://github.com/tyleriguchi
|
529
186
|
[@lostie]: https://github.com/lostie
|
530
187
|
[@pirj]: https://github.com/pirj
|
188
|
+
[@LynxEyes]: https://github.com/LynxEyes
|
189
|
+
[@stefkin]: https://github.com/stefkin
|
190
|
+
[@jaimerson]: https://github.com/jaimerson
|
191
|
+
[@alexvko]: https://github.com/alexvko
|