<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhimanyu Singh</title>
    <description>The latest articles on DEV Community by Abhimanyu Singh (@avmnusng).</description>
    <link>https://dev.to/avmnusng</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F246182%2Fce1d834f-3233-4acf-8688-9948218a24e6.jpeg</url>
      <title>DEV Community: Abhimanyu Singh</title>
      <link>https://dev.to/avmnusng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/avmnusng"/>
    <language>en</language>
    <item>
      <title>Skip the RSpec examples you don't need: rspec-tracer 2.0 in pre-release</title>
      <dc:creator>Abhimanyu Singh</dc:creator>
      <pubDate>Thu, 07 May 2026 08:51:45 +0000</pubDate>
      <link>https://dev.to/avmnusng/skip-the-rspec-examples-you-dont-need-rspec-tracer-20-in-pre-release-1p7h</link>
      <guid>https://dev.to/avmnusng/skip-the-rspec-examples-you-dont-need-rspec-tracer-20-in-pre-release-1p7h</guid>
      <description>&lt;p&gt;A ground-up rewrite of test-skip caching for RSpec, with pluggable storage, Rails-aware tracking, and a per-example tracks: DSL.&lt;/p&gt;

&lt;p&gt;You change one model. You run &lt;code&gt;bundle exec rspec&lt;/code&gt;. Twenty minutes later, every test in the suite has run again — including the 1,800 examples that don't touch that model.&lt;/p&gt;

&lt;p&gt;This is the problem &lt;a href="https://github.com/avmnu-sng/rspec-tracer" rel="noopener noreferrer"&gt;rspec-tracer&lt;/a&gt; solves. Cold run of a suite: everything runs. Second run with no edits: nothing runs. Edit one file: only the examples that depend on that file re-run.&lt;/p&gt;

&lt;p&gt;The 1.x line has been on RubyGems since 2021. I just shipped a 2.0 pre-release after a 4-year gap and a 17-day rebuild. This post is the field guide for what changed and how to test it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;Pre-releases require explicit opt-in. In your &lt;code&gt;Gemfile&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 2.0 is in pre-release. Pin to the pre-release version explicitly;&lt;/span&gt;
&lt;span class="c1"&gt;# switch to '~&amp;gt; 2.0' once 2.0.0 final ships.&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;'rspec-tracer'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'= 2.0.0.pre.1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;group: :test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;require: &lt;/span&gt;&lt;span class="kp"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or one-shot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gem &lt;span class="nb"&gt;install &lt;/span&gt;rspec-tracer &lt;span class="nt"&gt;--pre&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in your &lt;code&gt;spec_helper.rb&lt;/code&gt; or &lt;code&gt;rails_helper.rb&lt;/code&gt;, &lt;strong&gt;before any application code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'rspec_tracer'&lt;/span&gt;
&lt;span class="no"&gt;RSpecTracer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it for the basic install. Run your suite twice; the second run skips everything that didn't change.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed since 1.x
&lt;/h2&gt;

&lt;p&gt;The 2.0 surface is rebuilt around an explicit input-taxonomy model (every test is a pure function of its inputs; cache invalidation is input-digest mismatch). What that translates to for users:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Pluggable storage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Default: JSON (preserves 1.x layout)&lt;/span&gt;
&lt;span class="n"&gt;storage_backend&lt;/span&gt; &lt;span class="ss"&gt;:json&lt;/span&gt;

&lt;span class="c1"&gt;# SQLite: single-file DB, MRI-only&lt;/span&gt;
&lt;span class="n"&gt;storage_backend&lt;/span&gt; &lt;span class="ss"&gt;:sqlite&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For large suites (5,000+ examples) the SQLite backend cuts cache-load time substantially. JRuby falls back to &lt;code&gt;:json&lt;/code&gt; automatically with a one-time warn.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Pluggable remote cache (for CI)
&lt;/h3&gt;

&lt;p&gt;The 1.x line had S3-only remote cache. 2.0 ships three backends:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# S3 (preserves the 1.x layout, including LocalStack support)&lt;/span&gt;
&lt;span class="n"&gt;remote_cache_backend&lt;/span&gt; &lt;span class="ss"&gt;:s3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;bucket: &lt;/span&gt;&lt;span class="s1"&gt;'my-cache'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;prefix: &lt;/span&gt;&lt;span class="s1"&gt;'rspec-tracer'&lt;/span&gt;

&lt;span class="c1"&gt;# Local filesystem (NFS / shared mount / dev cache)&lt;/span&gt;
&lt;span class="n"&gt;remote_cache_backend&lt;/span&gt; &lt;span class="ss"&gt;:local_fs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;path: &lt;/span&gt;&lt;span class="s1"&gt;'/mnt/shared-cache'&lt;/span&gt;

&lt;span class="c1"&gt;# Redis (with optional per-key TTL + PR-branches sidecar)&lt;/span&gt;
&lt;span class="n"&gt;remote_cache_backend&lt;/span&gt; &lt;span class="ss"&gt;:redis&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;url: &lt;/span&gt;&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'REDIS_URL'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="ss"&gt;ttl: &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;3600&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;prefix: &lt;/span&gt;&lt;span class="s1"&gt;'rspec-tracer'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CI flow (&lt;code&gt;rake rspec_tracer:remote_cache:download&lt;/code&gt; / &lt;code&gt;:upload&lt;/code&gt;) is preserved bit-for-bit. The only thing that changes is the backend you point at.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Per-example &lt;code&gt;tracks:&lt;/code&gt; DSL
&lt;/h3&gt;

&lt;p&gt;This is the headline new surface. RSpec metadata key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;RSpec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt; &lt;span class="no"&gt;AdminController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="ss"&gt;tracks: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="ss"&gt;files: &lt;/span&gt;&lt;span class="s1"&gt;'app/policies/**/*.rb'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;env: &lt;/span&gt;&lt;span class="s1"&gt;'ROLE_CONFIG'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s1"&gt;'gates on the feature flag'&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="c1"&gt;# ...&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use cases the tracker can't auto-observe:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Config files baked at boot&lt;/strong&gt; — Oj-loaded JSON / YAML that's read once and mmap'd; the IO hooks won't see runtime reads, so declared globs are the escape hatch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Env-var branches&lt;/strong&gt; — code that does &lt;code&gt;if ENV['FEATURE_X'] == 'on'&lt;/code&gt;; flipping the env should invalidate the example.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-compiled Ruby constants&lt;/strong&gt; — values baked at boot that the per-example coverage delta can't see.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cascade is union (parent + child both contribute), unlike RSpec's default metadata cascade which clobbers on shared keys.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;code&gt;track_env(*names)&lt;/code&gt; config DSL
&lt;/h3&gt;

&lt;p&gt;Symmetric to &lt;code&gt;track_files&lt;/code&gt; but for env vars every test depends on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# In .rspec-tracer&lt;/span&gt;
&lt;span class="n"&gt;track_env&lt;/span&gt; &lt;span class="s1"&gt;'AUTH_TOKEN'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'DATABASE_URL'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'RAILS_*'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'*_API_KEY'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Single-wildcard patterns supported: &lt;code&gt;'PREFIX_*'&lt;/code&gt;, &lt;code&gt;'*_SUFFIX'&lt;/code&gt;, bare &lt;code&gt;'*'&lt;/code&gt;. Patterns are expanded against the live ENV at config-load time; the persisted &lt;code&gt;env_snapshot.json&lt;/code&gt; carries concrete keys only.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Rails preset
&lt;/h3&gt;

&lt;p&gt;For Rails projects, the tracker has to attach inputs Coverage doesn't observe — views, locales, fixtures, factories, helpers, config YAML, schema. The preset handles this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# In .rspec-tracer&lt;/span&gt;
&lt;span class="n"&gt;track_rails_defaults&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Opt out per category:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;track_rails_defaults&lt;/span&gt; &lt;span class="ss"&gt;except: &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:views&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:locales&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plus auto-detection: when &lt;code&gt;::Rails::VERSION&lt;/code&gt; is defined at &lt;code&gt;RSpecTracer.start&lt;/code&gt; time, the engine attaches an &lt;code&gt;ActionView&lt;/code&gt; template subscriber + an opt-in AR schema subscriber.&lt;/p&gt;

&lt;p&gt;The ERB/Slim/Jbuilder tracking via &lt;code&gt;render_template.action_view&lt;/code&gt; was the most-requested missing 1.x feature. It's the canonical path now: a view edit invalidates exactly the examples that rendered the partial.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. &lt;code&gt;bin/rspec-tracer&lt;/code&gt; CLI
&lt;/h3&gt;

&lt;p&gt;Five sub-commands, all opt-in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rspec-tracer doctor
OK   ruby:        ruby 3.3.10 &lt;span class="o"&gt;(&lt;/span&gt;2026-04-18&lt;span class="o"&gt;)&lt;/span&gt;
OK   rspec-tracer: 2.0.0.pre.1
OK   root:        /Users/me/projects/my-app
OK   cache_path:  /Users/me/projects/my-app/rspec_tracer_cache
INFO SimpleCov:   not loaded &lt;span class="o"&gt;(&lt;/span&gt;this is fine&lt;span class="p"&gt;;&lt;/span&gt; SimpleCov is optional&lt;span class="o"&gt;)&lt;/span&gt;
OK   Rails:       7.2.0.1
OK   schema:      v3 &lt;span class="o"&gt;(&lt;/span&gt;matches gem&lt;span class="o"&gt;)&lt;/span&gt;
INFO remote_cache: not configured &lt;span class="o"&gt;(&lt;/span&gt;skip&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;rspec-tracer cache:info
Cache size: 14.4 MiB · last run: 2026-05-06T14:13:22Z · 12 runs retained

&lt;span class="nv"&gt;$ &lt;/span&gt;rspec-tracer cache:clear
Removed: rspec_tracer_cache/, rspec_tracer_coverage/, rspec_tracer_report/

&lt;span class="nv"&gt;$ &lt;/span&gt;rspec-tracer report:open
Opening rspec_tracer_report/index.html ...

&lt;span class="nv"&gt;$ &lt;/span&gt;rspec-tracer explain spec.foo_spec.rb_42
Example: spec/foo_spec.rb:42 - &lt;span class="s2"&gt;"GET /admin returns 403 for unauthenticated"&lt;/span&gt;
Status: re-run scheduled
Reason: Files changed &lt;span class="o"&gt;(&lt;/span&gt;app/controllers/admin_controller.rb&lt;span class="o"&gt;)&lt;/span&gt;
Dependencies &lt;span class="o"&gt;(&lt;/span&gt;12&lt;span class="o"&gt;)&lt;/span&gt;:
  - app/controllers/admin_controller.rb &lt;span class="o"&gt;[&lt;/span&gt;changed since cache]
  - app/policies/admin_policy.rb
  - config/locales/en.yml
  - ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI is opt-in for local dev convenience; the &lt;code&gt;rake rspec_tracer:remote_cache:*&lt;/code&gt; tasks remain first-class for CI integration.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. HTML + JSON reporters
&lt;/h3&gt;

&lt;p&gt;The 1.x line had a single HTML reporter. 2.0 adds a JSON reporter for CI dashboards and a terminal-summary reporter that fires after every run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rspec-tracer: 1887 examples tracked · 5 re-run · 1882 skipped (99% cached)
by reason: 5 Files changed
cache: /path/to/rspec_tracer_cache (14.4 MiB; +6.7 KiB vs prev run)
report: /path/to/rspec_tracer_report/report.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For parallel_tests users: 1.x emitted reports per worker, then &lt;code&gt;purge_worker_dirs!&lt;/code&gt; deleted them — leaving users with no usable output. 2.0 emits ONCE at the merged top-level location after all workers finish.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. SimpleCov branch coverage now works
&lt;/h3&gt;

&lt;p&gt;The 1.x caveat ("SimpleCov would not report branch coverage results even when enabled") is gone. The coverage-stack rewrite decoupled rspec-tracer's line-only emission from SimpleCov's branch tracking. Users who turned &lt;code&gt;enable_coverage :branch&lt;/code&gt; off when adopting rspec-tracer 1.x can re-enable in 2.0.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Boot-time warns
&lt;/h3&gt;

&lt;p&gt;For two common user-trust traps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SimpleCov loaded but not started before &lt;code&gt;RSpecTracer.start&lt;/code&gt; (load-order is part of the documented contract; the warn surfaces it instead of silently bolting onto a Coverage already in flight).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;track_ar_schema_notifications&lt;/code&gt; enabled with &lt;code&gt;use_transactional_fixtures&lt;/code&gt; defaulting to true (per-example BEGIN/COMMIT fires &lt;code&gt;sql.active_record&lt;/code&gt; and attributes &lt;code&gt;db/schema.rb&lt;/code&gt; to every AR-touching example; the warn points at the README "Narrow AR-schema attribution" guidance).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  10. Schema-version field + Rails 8.0 + CI recipes
&lt;/h3&gt;

&lt;p&gt;Schema-version field in &lt;code&gt;last_run.json&lt;/code&gt; for explicit cross-version cache validation. Cache-shape changes bump the field; mismatched caches refuse-to-load with an info-level "cold run" log line.&lt;/p&gt;

&lt;p&gt;Rails 8.0 is CI-gated (Ruby 3.2+). &lt;code&gt;docs/CI_RECIPES.md&lt;/code&gt; translates the GitHub Actions cache pattern to CircleCI / GitLab CI / Buildkite / Heroku CI — the 4-component cache-key (&lt;code&gt;runner.os&lt;/code&gt; + &lt;code&gt;.ruby-version&lt;/code&gt; + &lt;code&gt;lib/rspec_tracer/version.rb&lt;/code&gt; + Gemfile-hash) translates 1:1 across providers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migration from 1.x
&lt;/h2&gt;

&lt;p&gt;The full guide is in &lt;a href="https://github.com/avmnu-sng/rspec-tracer/blob/main/UPGRADING.md" rel="noopener noreferrer"&gt;UPGRADING.md&lt;/a&gt;. Headlines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ruby ≥ 3.1&lt;/strong&gt; is the floor (1.x supported Ruby 2.5+). Ruby 3.2 / 3.3 / 3.4 / 4.0 + JRuby 9.4 are CI-gated. Rails 7.0 / 7.1 / 7.2 / 8.0 + RSpec 3.12 / 3.13 are CI-gated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache schema bump&lt;/strong&gt; — first run on 2.0 is cold; warm caches resume on subsequent runs. Existing CI integration (the rake tasks, env vars, &lt;code&gt;rspec_tracer_cache/&lt;/code&gt; directory contracts) is preserved bit-for-bit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deprecated&lt;/strong&gt; — four configs continue to work with one warn line each, slated for removal in 3.0: &lt;code&gt;reports_s3_path&lt;/code&gt; / &lt;code&gt;use_local_aws&lt;/code&gt; config DSL, and &lt;code&gt;RSPEC_TRACER_REPORTS_S3_PATH&lt;/code&gt; / &lt;code&gt;RSPEC_TRACER_USE_LOCAL_AWS&lt;/code&gt; env vars.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removed&lt;/strong&gt; — cucumber feature-file integration suite (contributor-facing only), Ruby ≤ 3.0 / Rails ≤ 6.x support, Windows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why pre-release
&lt;/h2&gt;

&lt;p&gt;A 2.0 of a gem people use in their CI deserves a real testing window. The pre-release is on RubyGems with &lt;code&gt;--pre&lt;/code&gt; opt-in; 2.0.0 final is targeted in ~2 weeks once the observation-window feedback is incorporated.&lt;/p&gt;

&lt;p&gt;If you're a 1.x user: the migration is &lt;code&gt;bundle update rspec-tracer&lt;/code&gt; after pinning the pre-release version, plus optionally adopting &lt;code&gt;track_rails_defaults&lt;/code&gt; if you're on Rails. The first run is cold (cache schema cut); subsequent runs return to warm.&lt;/p&gt;

&lt;p&gt;If you're new to rspec-tracer: try the cookbook recipes; the &lt;a href="https://github.com/avmnu-sng/rspec-tracer#quick-start" rel="noopener noreferrer"&gt;Quick start&lt;/a&gt; gets a fresh project running in ~5 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to send feedback
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Discussions&lt;/strong&gt;: &lt;a href="https://github.com/avmnu-sng/rspec-tracer/discussions/180" rel="noopener noreferrer"&gt;the pre-release thread&lt;/a&gt; for usage questions, install reports, rough edges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issues&lt;/strong&gt;: &lt;a href="https://github.com/avmnu-sng/rspec-tracer/issues/new/choose" rel="noopener noreferrer"&gt;open one&lt;/a&gt; for bugs. Add the &lt;code&gt;2.0-feedback&lt;/code&gt; label if applicable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migration questions&lt;/strong&gt;: comment on the discussion thread; I'll answer in the open so others see.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll cut a &lt;code&gt;pre.2&lt;/code&gt; if pre.1 surfaces blockers; otherwise 2.0.0.rc.1 in ~2 weeks, then 2.0.0 final after a final review window.&lt;/p&gt;




&lt;p&gt;Repo: &lt;a href="https://github.com/avmnu-sng/rspec-tracer" rel="noopener noreferrer"&gt;https://github.com/avmnu-sng/rspec-tracer&lt;/a&gt;&lt;br&gt;
Release: &lt;a href="https://github.com/avmnu-sng/rspec-tracer/releases/tag/v2.0.0.pre.1" rel="noopener noreferrer"&gt;https://github.com/avmnu-sng/rspec-tracer/releases/tag/v2.0.0.pre.1&lt;/a&gt;&lt;br&gt;
Discussion: &lt;a href="https://github.com/avmnu-sng/rspec-tracer/discussions/180" rel="noopener noreferrer"&gt;https://github.com/avmnu-sng/rspec-tracer/discussions/180&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading. Bug reports + thoughts welcome.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>testing</category>
    </item>
    <item>
      <title>Run tests 2-3x faster on average</title>
      <dc:creator>Abhimanyu Singh</dc:creator>
      <pubDate>Thu, 16 Sep 2021 17:48:51 +0000</pubDate>
      <link>https://dev.to/avmnusng/run-tests-2-3x-faster-on-average-4bd0</link>
      <guid>https://dev.to/avmnusng/run-tests-2-3x-faster-on-average-4bd0</guid>
      <description>&lt;p&gt;I have been working on rspec-tracer that allows you to &lt;strong&gt;detect flaky tests&lt;/strong&gt; with no additional effort and provides &lt;strong&gt;better insights on dependencies&lt;/strong&gt; between various components in your project by analyzing specs and their dependencies by generating HTML reports. The gem safely skips all such tests with no dependent files changed, resulting in at least &lt;strong&gt;2-3x faster test execution&lt;/strong&gt; on average.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/avmnu-sng/rspec-tracer" rel="noopener noreferrer"&gt;https://github.com/avmnu-sng/rspec-tracer&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>testing</category>
      <category>showdev</category>
    </item>
    <item>
      <title>RSpec Tracer</title>
      <dc:creator>Abhimanyu Singh</dc:creator>
      <pubDate>Fri, 27 Aug 2021 14:42:15 +0000</pubDate>
      <link>https://dev.to/avmnusng/rspec-tracer-4l6f</link>
      <guid>https://dev.to/avmnusng/rspec-tracer-4l6f</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/avmnu-sng/rspec-tracer" rel="noopener noreferrer"&gt;https://github.com/avmnu-sng/rspec-tracer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvzptgrsf7kyt763a7h3d.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvzptgrsf7kyt763a7h3d.gif" alt="First Run" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;RSpec Tracer is a specs dependency analysis tool and a test skipper for RSpec. It maintains a list of files for each test, enabling itself to skip tests in the subsequent runs if none of the dependent files are changed.&lt;/p&gt;

&lt;p&gt;It uses Ruby's built-in coverage library to keep track of the coverage for each test. For each test executed, the coverage diff provides the desired file list. RSpec Tracer takes care of reporting the correct code coverage when skipping tests by using the cached reports. Also, note that it will never skip any tests which failed or were pending in the last runs.&lt;/p&gt;

&lt;p&gt;Knowing the examples and files dependency gives us a better insight into the codebase, and we have a clear idea of what to test for when making any changes. With this data, we can also analyze the coupling between different components and much more.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>TAP Formatters for RSpec-3</title>
      <dc:creator>Abhimanyu Singh</dc:creator>
      <pubDate>Fri, 01 Nov 2019 19:05:27 +0000</pubDate>
      <link>https://dev.to/avmnusng/tap-formatters-for-rspec-3-f2c</link>
      <guid>https://dev.to/avmnusng/tap-formatters-for-rspec-3-f2c</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/avmnu-sng/rspec-tap-formatters" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>ruby</category>
      <category>rspec</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Software Development: The Magical Number Seven, Plus or Minus Two (Cognitive Complexity)</title>
      <dc:creator>Abhimanyu Singh</dc:creator>
      <pubDate>Fri, 18 Oct 2019 15:21:44 +0000</pubDate>
      <link>https://dev.to/avmnusng/software-development-the-magical-number-seven-plus-or-minus-two-cognitive-complexity-526b</link>
      <guid>https://dev.to/avmnusng/software-development-the-magical-number-seven-plus-or-minus-two-cognitive-complexity-526b</guid>
      <description>&lt;p&gt;&lt;a href="https://blog.usejournal.com/software-development-the-magical-number-seven-plus-or-minus-two-9d1de54447d6" rel="noopener noreferrer"&gt;https://blog.usejournal.com/software-development-the-magical-number-seven-plus-or-minus-two-9d1de54447d6&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>codequality</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Algorithms behind RuboCop complexity metrics</title>
      <dc:creator>Abhimanyu Singh</dc:creator>
      <pubDate>Wed, 09 Oct 2019 14:37:01 +0000</pubDate>
      <link>https://dev.to/avmnusng/algorithms-behind-rubocop-complexity-metrics-d1b</link>
      <guid>https://dev.to/avmnusng/algorithms-behind-rubocop-complexity-metrics-d1b</guid>
      <description>&lt;p&gt;I published a series on &lt;strong&gt;Medium.com&lt;/strong&gt;, explaining the algorithms behind RuboCop complexity metrics. The third part reveals the mathematical connections between different metrics. The series will help you with configuring &lt;strong&gt;cyclomatic complexity&lt;/strong&gt;, &lt;strong&gt;perceived complexity&lt;/strong&gt;, and, &lt;strong&gt;ABC size&lt;/strong&gt; values for RuboCop analysis, which are not completely random.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;&lt;a href="https://medium.com/@avmnusng/ruby-software-complexity-metrics-part-one-prerequisites-b6f86d76a4a5" rel="noopener noreferrer"&gt;first part&lt;/a&gt;&lt;/strong&gt; we cover syntactic representation of Ruby source code. It provides all the information required to get started with the algorithms.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;&lt;a href="https://medium.com/@avmnusng/ruby-software-complexity-metrics-part-two-calculations-a00fbab610d2" rel="noopener noreferrer"&gt;second part&lt;/a&gt;&lt;/strong&gt; we go through the pseudocode of the algorithms and solve a couple of problems to see how to calculate the complexity values without drawing control flow graphs.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;&lt;a href="https://medium.com/@avmnusng/ruby-software-complexity-metric-part-three-interdependence-2fc9407c3f45" rel="noopener noreferrer"&gt;third part&lt;/a&gt;&lt;/strong&gt; we do mathematical analysis to establish a relationship between the metrics and not use a random RuboCop configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would love your feedback. Thanks!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>rubocop</category>
      <category>softwarecomplexity</category>
    </item>
  </channel>
</rss>
