Ruby Raider
Explore the docs
Rubygems
·
Report Bug
·
Request Feature
For more information and updates on releases, see https://ruby-raider.onrender.com/
What is Ruby Raider?
Ruby Raider is a CLI gem and API backend for scaffolding and generating UI test automation frameworks. It supports both interactive command-line usage and programmatic invocation via Raider Desktop.
Supported Frameworks
Web Testing
| Test Framework | Selenium | Watir |
|---|---|---|
| RSpec | ✅ | ✅ |
| Cucumber | ✅ | ✅ |
Mobile Testing (Appium)
| Test Framework | iOS | Android | Cross-Platform |
|---|---|---|---|
| RSpec | ✅ | ✅ | ✅ |
| Cucumber | ✅ | ✅ | ✅ |
Optional Add-on (Web Only)
| Add-on | Flag | Description |
|---|---|---|
| Accessibility | --accessibility |
Adds axe gem + example accessibility tests |
All generated projects include a GitHub Actions CI pipeline out of the box.
The web tests run against the Raider Test Store.
To run Appium tests, download the example app and start the server:
raider u start_appium
This works on all platforms (Mac OS, Linux and Windows).
Getting Started
Install the gem:
gem install ruby_raider
Create a new project interactively:
raider new [project_name]
Or skip the menu with parameters:
raider new [project_name] -p framework:rspec automation:selenium
Add optional features:
raider new my_project -p framework:rspec automation:selenium --accessibility
Commands
Anything between square brackets ([...]) is where your input goes
Main Commands
raider new [PROJECT_NAME] # Create a new framework project
raider generate # Access scaffolding commands
raider utility # Access utility commands
raider version # Show current version
raider help [COMMAND] # Describe available commands
Shortcuts: n (new), g (generate), u (utility), v (version)
Scaffolding Commands
raider g page [NAME] # Create a page object
raider g spec [NAME] # Create an RSpec test
raider g feature [NAME] # Create a Cucumber feature
raider g steps [NAME] # Create step definitions
raider g helper [NAME] # Create a helper class
raider g component [NAME] # Create a component class
raider g scaffold [NAME(S)] # Create page + test + steps
Options:
--uses [PAGES]— Specify page dependencies--path [PATH]— Custom output path
Utility Commands
raider u path [PATH] # Set default paths for scaffolding
raider u url [URL] # Set default project URL
raider u browser [BROWSER] # Set default browser
raider u [OPTS] # Set browser options
raider u raid # Run all tests
raider u timeout [SECONDS] # Set test timeout
raider u [DIMENSIONS] # Set viewport size (e.g., 1920x1080)
raider u platform [PLATFORM] # Set platform for cross-platform tests
raider u start_appium # Start Appium server
raider u desktop # Download Raider Desktop
Development
bundle install # Install dependencies
bundle exec rspec # Run all tests
bundle exec rspec --tag ~slow # Run fast tests only (skip E2E)
bundle exec rubocop # Run linter
bundle exec reek # Run code smell detection