gems test-prof 0.5.0
0.5.0 "Sunny Balkans" ☀️ ⛰

latest releases: 1.3.3, 1.3.2, 1.3.1...
5 years ago

BalkanRuby 2018 special.

TestProf documentation now lives here: https://test-prof.evilmartians.io.

Features

Example usage:

TAG_PROF=type TAG_PROF_EVENT=sql.active_record rspec

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) }

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.

Don't miss a new test-prof release

NewReleases is sending notifications on new releases.