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