BalkanRuby 2018 special.
TestProf documentation now lives here: https://test-prof.evilmartians.io.
Features
- Add events support to TagProf. 📝 Docs
Example usage:
TAG_PROF=type TAG_PROF_EVENT=sql.active_record rspec
- Add logging helpers for Rails. 📝 Docs
Enalbe verbose logging globally:
LOG=all rspec
Or per example (group):
it 'does smth weird', :log do
# ...
end
- Add HTML report for
TagProf
.
Generate HTML report by setting TAG_PROF_FORMAT
to html
.
-
Add ability to track multiple events at the same time with
EventProf
. -
Add
AnyFixture
DSL. 📝 Docs
Example:
# Enable DSL
using TestProf::AnyFixture::DSL
# and then you can use `fixture` method (which is just an alias for `TestProf::AnyFixture.register`)
before(:all) { fixture(:account) }
# You can also use it to fetch the record (instead of storing it in instance variable)
let(:account) { fixture(:account) }
- Add
AnyFixture
usage report. 📝 Docs
Enable AnyFixture
usage reporting with ANYFIXTURE_REPORTING=1
or with:
TestProf::AnyFixture.reporting_enabled = true
- Add
ActiveRecordSharedConnection
recipe. 📝 Docs
Force ActiveRecord to use the same connection between threads (to avoid database cleaning in browser tests).
NOTE: For Rails <5.1.
Fixes & Improvements
- Disable referential integrity when cleaning AnyFixture.