The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Top 23 Ruby Testing Projects
-
faker
A library for generating fake data such as names, addresses, and phone numbers. (by faker-ruby)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
vcr
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
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.
-
minitest
minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking.
-
Database Cleaner
Strategies for cleaning databases in Ruby. Can be used to ensure a clean state for testing.
-
test-kitchen
Test Kitchen is an integration tool for developing and testing infrastructure code and software on isolated target platforms
-
Spork
A DRb server for testing frameworks (RSpec / Cucumber currently) that forks before each run to ensure a clean testing state.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Project mention: Faker – generate fake data such as names, addresses, and phone numbers | news.ycombinator.com | 2024-04-13
Cuba takes help from a lot of other technologies to bring the best of everything. For example, the responses in Cuba are the optimized version of the Rack responses. The templates are integrated via Tilt and testing via Cutest and Capybara.
Project mention: Show HN: Factory-JS – TypeScript dummy object generator for testing | news.ycombinator.com | 2024-03-29I made Factory-js inspired by factory-bot (https://github.com/thoughtbot/factory_bot), supports Prisma and Drizzle ORM and more. TypeScript is now widely used in both backend and frontend, but there is no de facto standard factory library. I'm developing a web application using Prisma, trpc, and nextjs, but I was struggling with how to write more beautiful and readable back-end tests. That's why I made factory-js.
If you want to check out an alternative to VCR, have a look at webmock.
According to the shoulda-matchers documentation:
Project mention: About time: how to unit test code that depends on time | news.ycombinator.com | 2023-12-19The Ruby equivalent is Timecop
https://github.com/travisjeffery/timecop
Dynamic languages have the advantage to be able to rewrite the standard library classes at runtime.
In this part, we’ll set up our testing environment so that we can test our Rails API using minitest with minitest/spec. We’ll look at the differences between traditional style unit tests and spec-style tests, or specs. I’ll demonstrate why you should use minitest-rails. We’ll look at using rack-test for testing our API. We’ll even create our own generator to generate API specs.
# 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
gem "test-prof" - https://github.com/test-prof/test-prof | Toolkit for inspecting and optimising your test-suite, a must-have.
Ruby Testing related posts
- Faker – generate fake data such as names, addresses, and phone numbers
- Show HN: Factory-JS – TypeScript dummy object generator for testing
- Test Driving a Rails API - Part Two
- 16 Best Ruby Frameworks For Web Development [2024]
- Full-Text Search for Ruby on Rails with Litesearch
- Leveling up your custom fake data with Faker.js
- How to Use Shoulda Matchers with RSpec for Ruby on Rails
-
A note from our sponsor - WorkOS
workos.com | 20 Apr 2024
Index
What are some of the best open-source Testing projects in Ruby? This list will help you:
Project | Stars | |
---|---|---|
1 | faker | 11,091 |
2 | Capybara | 9,960 |
3 | factory_bot | 7,875 |
4 | vcr | 5,747 |
5 | WebMock | 3,908 |
6 | shoulda-matchers | 3,468 |
7 | Parallel Tests | 3,339 |
8 | timecop | 3,333 |
9 | minitest | 3,243 |
10 | Database Cleaner | 2,914 |
11 | RSpec | 2,867 |
12 | inspec | 2,810 |
13 | Spring | 2,786 |
14 | mutant | 1,921 |
15 | test-kitchen | 1,855 |
16 | Ruby Tests Profiling Toolbox | 1,790 |
17 | DuckRails | 1,720 |
18 | ffaker | 1,544 |
19 | Watir | 1,505 |
20 | Spork | 1,400 |
21 | Appraisal | 1,229 |
22 | cuprite | 1,194 |
23 | mocha | 1,192 |
Sponsored