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: How to Setup RSpec on a Rails Project | dev.to | 2023-11-29

    rspec-rails factory_bot_rails faker

  • Capybara

    Acceptance test framework for web applications

    Project mention: 🩰 Scheduling automated tests | dev.to | 2023-09-01

    I am going to use a browser based testing tool called Playwright (But you could use Capybara, or Selenium WebDriver etc.).

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • factory_bot

    A library for setting up Ruby objects as test data.

    Project mention: Metaprogramming in Ruby: Advanced Level | dev.to | 2023-06-30

    factory_bot: A fixtures replacement

  • vcr

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

    Project mention: Creating integration tests for a backend legacy codebase | dev.to | 2023-04-11

    Basically, it's a record/replay tool, similar to VCR for Ruby, but on steroids and powered by AI (khm GPT khm).

  • WebMock

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

    Project mention: CableReady broadcasts are not working in system tests | /r/rails | 2023-05-10

    If you want to check out an alternative to VCR, have a look at webmock.

  • shoulda-matchers

    Simple one-liner tests for common Rails functionality

  • 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.

    Project mention: What questions do you consider important for a Ruby on Rails technical interview? | /r/rails | 2022-12-05

    vs https://github.com/travisjeffery/timecop yes it's true and i am happy to show everybody that they don't need timecop in rails test suite anymore.

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

  • 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.

    Project mention: Where can I learn to deliver a proper solution? | /r/ruby | 2023-04-08

    I forgot to mention that reading code is also a good way to learn how to write code, it's like inspiration. Check repos of some gems you like. For example sidekiq https://github.com/sidekiq/sidekiq/tree/main/lib/sidekiq Or minitest https://github.com/minitest/minitest/tree/master/lib/minitest

  • Database Cleaner

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

  • RSpec

    RSpec meta-gem that depends on the other components

  • Spring

    Rails application preloader (by rails)

    Project mention: Could not detect rake tasks | /r/rails | 2023-05-03

    # Use the Puma web server [https://github.com/puma/puma] gem "puma", "~> 5.0" # Build JSON APIs with ease [https://github.com/rails/jbuilder] # gem "jbuilder" gem 'rack-cors' gem "devise" gem "jsonapi-serializer" gem 'devise-jwt' gem 'active_model_serializers' gem 'followability' gem 'dotenv-rails', groups: [:development, :test, :production] gem 'sprockets' # Use Redis adapter to run Action Cable in production # gem "redis", "~> 4.0" # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] # gem "kredis" # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] # gem "bcrypt", "~> 3.1.7" # 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 Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible # gem "rack-cors" group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri mingw x64_mingw ] end group :development do gem "sqlite3", "~> 1.4" # Speed up commands on slow machines / big apps [https://github.com/rails/spring] # gem "spring" end group :production do gem 'pg' end

  • inspec

    InSpec: Auditing and Testing Framework

    Project mention: Testing Terraform infra - terratest alternatives? | /r/devops | 2023-02-08
  • mutant

    Automated code reviews via mutation testing - semantic code coverage.

  • test-kitchen

    Test Kitchen is an integration tool for developing and testing infrastructure code and software on isolated target platforms

  • Ruby Tests Profiling Toolbox

    Ruby Tests Profiling Toolbox

    Project mention: Measuring load time on fixtures | /r/ruby | 2023-03-08

    You might be able to do something with https://test-prof.evilmartians.io, but I'm not sure it has anything specific to fixtures out of the box. Maybe using the event profiler on sql.active_record events would be close enough. In the limit, you could wire together your own ActiveSupport::Notifications.instrument around the relevant blocks + an ActiveSupport::Notifications.subscribe to that event so as to log the relevant information. Docs: https://api.rubyonrails.org/classes/ActiveSupport/Notifications.html

  • DuckRails

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

  • 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.

  • mocha

    Mocha is a mocking and stubbing library for Ruby (by freerange)

    Project mention: An Introduction to Mocking Tools for Elixir | dev.to | 2023-04-18

    If you are used to Mocha for other languages, you can check out Mimic. It lets you define stubs and expectations during tests by keeping track of the stubbed module in an ETS table.

  • cuprite

    Headless Chrome/Chromium driver for Capybara

    Project mention: Tanakai 1.6.0 (web scraping gem) has been released with support to Ruby 3+ | /r/ruby | 2023-02-16

    - add support to Apparition and Cuprite

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

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 2023-11-29.

Ruby Testing related posts

Index

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

Project Stars
1 faker 10,959
2 Capybara 9,892
3 factory_bot 7,848
4 vcr 5,678
5 WebMock 3,834
6 shoulda-matchers 3,447
7 timecop 3,301
8 Parallel Tests 3,288
9 minitest 3,205
10 Database Cleaner 2,894
11 RSpec 2,862
12 Spring 2,782
13 inspec 2,757
14 mutant 1,906
15 test-kitchen 1,847
16 Ruby Tests Profiling Toolbox 1,741
17 DuckRails 1,722
18 ffaker 1,526
19 Watir 1,501
20 Spork 1,402
21 Appraisal 1,206
22 mocha 1,181
23 cuprite 1,156
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com