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