Ruby Testing

Open-source Ruby projects categorized as Testing

Top 23 Ruby Testing Projects

  • faker

    A library for generating fake data such as names, addresses, and phone numbers. (by faker-ruby)

    Project mention: Ruby...Covered in CRUD. | | 2022-11-20

    If we have a seed file, that's amazing. If we don't, I somewhat recommend using faker to help out. It's great for making random seeds, but my project group and I ran into some trouble manipulating the output data as beginners, so I'd say it's handy, but only to a certain degree. Once our seeds are filled in, run:

  • Capybara

    Acceptance test framework for web applications

    Project mention: Using Capybara to test responsive code | | 2022-11-11

    Engineering at Aha! focuses on using and improving the Capybara test framework. We have added many helpers and additional functionality to make working with Capybara easy. Testing at mobile widths is another chance to improve our testing tooling. Here is the incremental approach that we used to add mobile testing helpers.

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

  • factory_bot

    A library for setting up Ruby objects as test data.

    Project mention: Efate Test Generator Series: Extending the library | | 2022-09-05

    Efate is actually the second test fixture library I've written and there were several lessons I learned after using the first iteration for several years myself. The first version was influenced a great deal by factor_girl (called factory_bot now), with a heavy dependency on strings to define and create the fixtures. It also wasn't very modular. You couldn't just import a specific fixture, you had to bring in the whole library. And it wasn't very extensible, if you needed to define custom behavior for how a field should be created, it wasn't very pretty.

  • vcr

    Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.

    Project mention: Configure VCR with RSpec | | 2022-07-23

    A way to avoid this is using the VCR gem.

  • WebMock

    Library for stubbing and setting expectations on HTTP requests in Ruby.

    Project mention: Configure VCR with RSpec | | 2022-07-23

    In order to keep our test suite faster and consistent, we need to mock our http requests. A simple and good way to achieve this is using the Webmock gem which allow easily mock the http responses for your requests.

  • shoulda-matchers

    Simple one-liner tests for common Rails functionality

    Project mention: Rspec - should relations between model be tested? | | 2022-10-26

    The value of shoulda-matchers is right there in the first line of the README: "test common Rails functionality that, if written by hand, would be much longer, more complex, and error-prone."

  • 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,, and in a single call.

    Project mention: What are your top useful gems? | | 2022-01-18
  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • Parallel Tests

    Ruby: 2 CPUs = 2x Testing Speed for RSpec, Test::Unit and Cucumber

    Project mention: Seeking help with moving a locally running, short-lived Docker container to CI / deployment process? | | 2022-11-21

    Thanks for that feedback. For some more context, the container is designed to run 40+ processes in parallel sending remote instructions to AWS Device Farm for testing, so I suspect that the RAM usage is expected in this case. If you have any recommendations on re-architecting the execution here I'm all ears.

  • minitest

    minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking.

    Project mention: Minitest, we've been doing it wrong? | | 2022-10-02

    The new test convention is now "test/**/test_*.rb" instead of "test/**/*_test.rb". For example, Puma and Minitest are popular repositories using this naming pattern.

  • RSpec

    RSpec meta-gem that depends on the other components

    Project mention: Why Gherkin (Cucumber, SpecFlow,…) Always Failed with UI Test Automation? | | 2022-09-15

    RSpec is the most popular “Behaviour Driven Development for Ruby”. RSpec v3.8.0 alone has over 193 million downloads on RubyGems. While RSpec may also be used for unit or integration tests, its download count is quite impressive. As a comparison, the most-downloaded Cucumber v3.1.2 is merely 8.8 million.

  • Database Cleaner

    Strategies for cleaning databases in Ruby. Can be used to ensure a clean state for testing.

  • Spring

    Rails application preloader (by rails)

    Project mention: Active_storage first time need help! | | 2022-09-25

    # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.4" # The original asset pipeline for Rails [] gem "sprockets-rails" # Use sqlite3 as the database for Active Record gem "sqlite3", "~> 1.4" # Use the Puma web server [] gem "puma", "~> 5.0" # Use JavaScript with ESM import maps [] gem "importmap-rails" # Hotwire's SPA-like page accelerator [] gem "turbo-rails" # Hotwire's modest JavaScript framework [] gem "stimulus-rails" # Build JSON APIs with ease [] gem "jbuilder" # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", require: false # Use Sass to process CSS # gem "sassc-rails" # Use Active Storage variants [] # gem "image_processing", "~> 1.2" group :development, :test do # See gem "debug", platforms: %i[ mri mingw x64_mingw ] end group :development do # Use console on exceptions pages [] gem "web-console" # Add speed badges [] # gem "rack-mini-profiler" # Speed up commands on slow machines / big apps [] # gem "spring" end group :test do # Use system testing [] gem "capybara" gem "selenium-webdriver" gem "webdrivers" end

  • inspec

    InSpec: Auditing and Testing Framework

    Project mention: Ruby: "the best" language for general automation | | 2022-05-12

    The course uses Chef Inspec, an open source Ruby DSL. I made a POC with this tool to automatically check repositories on GitHub, checks like if it contains a gitignore consistent with the language used, if node_modules is not present, etc.

  • mutant

    Automated code reviews via mutation testing - semantic code coverage.

    Project mention: An ex-Googler's guide to dev tools | | 2022-07-17

    There's a pretty good Ruby gem I've used for this before:

  • DuckRails

    Development tool to mock API endpoints quickly and easily (docker image available)

  • Ruby Tests Profiling Toolbox

    Ruby Tests Profiling Toolbox

    Project mention: A Trick For Reading Flamegraphs | | 2022-11-15

    TestProf can be used to get flamegraphs for Ruby test suites.

  • ffaker

    Faker refactored.

  • Watir

    Watir Powered By Selenium

  • Spork

    A DRb server for testing frameworks (RSpec / Cucumber currently) that forks before each run to ensure a clean testing state.

  • Appraisal

    A Ruby library for testing your library against different versions of dependencies.

    Project mention: What’s the best way to test a gem that integrates with Rails? | | 2022-03-18
  • Machinist

    Fixtures aren't fun. Machinist is.

  • Konacha

    Test your Rails application's JavaScript with the mocha test framework and chai assertion library

  • cuprite

    Headless Chrome/Chromium driver for Capybara

    Project mention: What E2E Testing tools are you using? | | 2022-03-30

    You might want to give a try, in case you are currently using the Rails default selenium-webdriver as driver for javascript tests. It's not going through selenium, but controlling a Chrome or Chromium instance in a more direct way. I've recently switched a larger test suite to it, and besides a remarkable speed improvement (I think it was around 20%), most of the previous flakyness was gone.

  • Zigi

    Workflow assistant built for devs & their teams. Automate the mundane part of your day, with live actionable messages for your GitHub & Jira tasks.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-11-21.

Ruby Testing related posts


What are some of the best open-source Testing projects in Ruby? This list will help you:

Project Stars
1 faker 10,495
2 Capybara 9,718
3 factory_bot 7,648
4 vcr 5,465
5 WebMock 3,718
6 shoulda-matchers 3,327
7 timecop 3,215
8 Parallel Tests 3,156
9 minitest 3,084
10 RSpec 2,859
11 Database Cleaner 2,826
12 Spring 2,746
13 inspec 2,595
14 mutant 1,870
15 DuckRails 1,706
16 Ruby Tests Profiling Toolbox 1,576
17 ffaker 1,491
18 Watir 1,454
19 Spork 1,401
20 Appraisal 1,156
21 Machinist 1,126
22 Konacha 1,060
23 cuprite 1,000
Build time-series-based applications quickly and at scale.
InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.