A comprehensive curated list of Ruby test automation frameworks, tools, libraries and software to help software engineers easily bootstrap test automation on Ruby.
Table of content:
- xUnit frameworks
- TDD \ ATTD \ BDD
- Code Analysis
- Test Data
- Web UI test automation
- Mobile test automation
- Windows UI test automation
- Unix \ Linux UI test automation
- MacOS UI test automation
- Virtual environments
- Performance & stress & load
- Security checking
- Continuous Integration
- Reporting
- Documentation generation
- Editors, IDE and consoles
- Useful libs
Also:
- Test::Unit - is intended for unit testing and comes bundled with Ruby.
- MiniTest - becomes available on attaching the minitest-reporters gem. The minitests are added to the Test::Unit framework.
- TDD
- RR - A test double framework that features a rich selection of double techniques and a terse syntax.
- BDD
- RSpec - Behaviour Driven Development for Ruby. RSpec becomes available in Ruby projects on attaching the rspec gem. For the Rails applications, rspec-rails gem is also required.
- Cucumber - This testing tool supports BDD, and enables using features and scenarios written in a human-readable language, either English or any other language specified in the # language: comment. Cucumber becomes available in project upon installing and activating the cucumber gem.
- Bacon - A small RSpec clone.
- minitest - minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking.
- Spinach - Spinach is a high-level BDD framework that leverages the expressive Gherkin language (used by Cucumber) to help you define executable specifications of your application or library's acceptance criteria.
- Assertions
- Shoulda - is intended for unit testing, and becomes available in Ruby projects on attaching the shoulda gem. So doing, the Shoulda tests are added on to the Test::Unit framework.
- shoulda-matchers - Provides Test::Unit- and RSpec-compatible one-liners that test common Rails functionality. These tests would otherwise be much longer, more complex, and error-prone.
- Mocking
- ActiveMocker - Generate mocks from ActiveRecord models for unit tests that run fast because they don’t need to load Rails or a database.
- TestXml - TestXml is a small extension for testing XML/HTML.
- WebMock - Library for stubbing and setting expectations on HTTP requests.
- Extensions
- Cutest - Isolated tests in Ruby. Each test file is run in a forked process to avoid shared state. Once a failure is found, you get a report detailing what failed and how to locate the error and the rest of the file is skipped.
- Spork - A DRb server for testing frameworks (RSpec / Cucumber currently).
- Fabrication - A simple and powerful object generation library.
- factory_girl - A library for setting up Ruby objects as test data.
- Fake Person - Uses some of the most popular given & surnames in the US & UK.
- faker - A library for generating fake data such as names, addresses, and phone numbers.
- ffaker - A faster Faker, generates dummy data, rewrite of faker.
- Forgery - Easy and customizable generation of forged data.
- Machinist - Fixtures aren't fun. Machinist is.
- Libraries
- Selenium WebDriver - This gem provides Ruby bindings for WebDriver.
- API Taster - A quick and easy way to visually test your Rails application's API.
- Watir - Web application testing in Ruby.
- Watir-webdriver - The most elegant way to use WebDriver with ruby.
- Poltergeist - Poltergeist is a driver for Capybara. It allows you to run your Capybara tests on a headless WebKit browser, provided by PhantomJS.
- PhantomJS - is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
- Frameworks
- Page Objects
- page-object - Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver.
- watirsome - Awesome page objects with Watir.
- widgeon - Yet another 'page objects for Capybara' gem with ability to create custom loadable elements akka 'widgets'
- RVM - Ruby Version Manager (RVM) is a unix command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.
- Pik - Multi-Ruby Manager for Windows
- parallel_tests - Speedup Test::Unit + RSpec + Cucumber by running parallel on multiple CPUs (or cores). ParallelTests splits tests into even groups(by number of tests or runtime) and runs each group in a single process with its own database.
- headless - Is the Ruby interface for Xvfb. It allows you to create a headless display straight from Ruby code, hiding some low-level action. It can also capture images and video from the virtual framebuffer.
- watir-jquery - Watir-jquery gem allows you to use the jQuery syntax to find page elements and returns Watir-object type (e.x. "#<Watir::Div:0x..").
Where to discover new libraries, information, tools, etc.
- automated-testing.info - Test automation community
- atinfo.github.io/at.info-knowledge-base - Knowledge base for test automation examples on different tools and technologies
- python test automation
- java test automation
- ruby test automation
- c# test automation
- php test automation
- javascript test automation
- test automation and software testing as services
Your contributions are always welcome!