Description
TestProf is a collection of different tools to analyze your test suite performance.
Why does test suite performance matter? First of all, testing is a part of a developer's feedback loop (see @searls talk) and, secondly, it is a part of a deployment cycle.
Simply speaking, slow tests waste your time making you less productive.
TestProf toolbox aims to help you identify bottlenecks in your test suite. It contains:
- Plug'n'Play integrations for general Ruby profilers (ruby-prof, stackprof)
- Factories usage analyzers and profilers
- ActiveSupport-backed profilers
- RuboCop cops
- etc.
Of course, we have some solutions for common performance issues too, bundled into the gem.
Ruby Tests Profiling Toolbox alternatives and similar gems
Based on the "Testing" category.
Alternatively, view Ruby Tests Profiling Toolbox alternatives based on common mentions on social networks and blogs.
-
Selenium WebDriver
A browser automation framework and ecosystem. -
faker
A library for generating fake data such as names, addresses, and phone numbers. -
Capybara
Acceptance test framework for web applications -
factory_bot
A library for setting up Ruby objects as test data. -
vcr
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. -
shoulda-matchers
Simple one-liner tests for common Rails functionality -
WebMock
Library for stubbing and setting expectations on HTTP requests in Ruby. -
Cucumber
A home for issues that are common to multiple cucumber repositories -
Parallel Tests
Ruby: 2 CPUs = 2x Testing Speed for RSpec, Test::Unit and Cucumber -
minitest
minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking. -
timecop
A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call. -
RSpec
RSpec meta-gem that depends on the other components -
capybara-webkit
A Capybara driver for headless WebKit to test JavaScript web apps -
mutant
Automated code reviews via mutation testing - semantic code coverage. -
DuckRails
Development tool to mock API endpoints quickly and easily (docker image available) -
Spork
A DRb server for testing frameworks (RSpec / Cucumber currently) that forks before each run to ensure a clean testing state. -
Aruba
Test command-line applications with Cucumber-Ruby, RSpec or Minitest. -
Appraisal
A Ruby library for testing your library against different versions of dependencies. -
Phony
E164 international phone number normalizing, splitting, formatting. -
Konacha
Test your Rails application's JavaScript with the mocha test framework and chai assertion library -
Fabrication
This project has moved to GitLab! Please check there for the latest updates. -
Ruby-JMeter
A Ruby based DSL for building JMeter test plans -
Fuubar
The instafailing RSpec progress bar formatter -
Forgery
Easy and customizable generation of forged data. -
API Taster
A quick and easy way to visually test your Rails application's API. -
Spinach
Spinach is a BDD framework on top of Gherkin. -
Knapsack
Knapsack splits tests evenly across parallel CI nodes to run fast CI build and save you time. -
ActiveMocker
Generate mocks from ActiveRecord models for unit tests that run fast because they don’t need to load Rails or a database. -
Wrong
Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. -
RR
RR is a test double framework that features a rich selection of double techniques and a terse syntax. ⛺ -
Howitzer
A Ruby-based framework for acceptance testing -
FactoryTrace
Simple tool to maintain factories and traits from FactoryBot -
Pundit Matchers
A set of RSpec matchers for testing Pundit authorisation policies. -
Flatware
A parallel test runner for RSpec and Cucumber with pretty output -
Emoji-RSpec
Custom Emoji Formatters for RSpec -
Drawers
Group related classes together. No more silos. A solution to rails dystopia. -
RSpecTracer
RSpec Tracer is a specs dependency analyzer, flaky tests detector, tests accelerator, and coverage reporter tool 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. It uses Ruby's built-in coverage library to keep track of the coverage for each test.
Tired of breaking your main and manually rebasing outdated pull requests?
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Ruby Tests Profiling Toolbox or a related project?
README
Ruby Tests Profiling Toolbox
TestProf is a collection of different tools to analyze your test suite performance.
Why does test suite performance matter? First of all, testing is a part of a developer's feedback loop (see @searls talk) and, secondly, it is a part of a deployment cycle.
Simply speaking, slow tests waste your time making you less productive.
TestProf toolbox aims to help you identify bottlenecks in your test suite. It contains:
Plug'n'Play integrations for general Ruby profilers (
ruby-prof
,stackprof
)Factories usage analyzers and profilers
ActiveSupport-backed profilers
RSpec and minitest helpers to write faster tests
RuboCop cops
etc.
Who uses TestProf
- Discourse reduced ~27% of their test suite time
- Gitlab reduced 39% of their API tests time and improved factories usage
- CodeTriage
- Dev.to
- Open Project
- ...and others
Resources
Paris.rb, 2018, "99 Problems of Slow Tests" talk [video, slides]
BalkanRuby, 2018, "Take your slow tests to the doctor" talk [video], slides]
RailsClub, Moscow, 2017, "Faster Tests" talk [video (RU), slides]
Installation
Add test-prof
gem to your application:
group :test do
gem "test-prof", "~> 1.0"
end
And that's it)
Supported Ruby versions:
Ruby (MRI) >= 2.5.0 (NOTE: for Ruby 2.2 use TestProf < 0.7.0, Ruby 2.3 use TestProf ~> 0.7.0, Ruby 2.4 use TestProf <0.12.0)
JRuby >= 9.1.0.0 (NOTE: refinements-dependent features might require 9.2.7+)
Supported RSpec version (for RSpec features only): >= 3.5.0 (for older RSpec versions use TestProf < 0.8.0).
Usage
Check out our docs.
What's next?
Have an idea? Propose a feature request!
Already using TestProf? Share your story!
License
The gem is available as open source under the terms of the MIT License.
*Note that all licence references and agreements mentioned in the Ruby Tests Profiling Toolbox README section above
are relevant to that project's source code only.