This project is a Ruby-based BDD (Behavior Driven Development) test automation framework using Cucumber, Capybara, and Allure for reporting. It supports visual regression testing and follows the Page Object Model for maintainability.
- Ruby (2.6+ recommended)
- Bundler (
gem install bundler) - Java (required for Allure report serving)
- Allure Commandline
- Install via Allure documentation
- Clone the repository:
git clone <repo-url> cd capybara
- Install dependencies:
bundle install
- Install Allure Commandline:
- Mac:
brew install allure - Windows: Download from Allure Releases and add to PATH.
- Linux: Use package manager or download from releases.
- Mac:
bundle exec rake allure_test- This will:
- Clean previous Allure results
- Run all Cucumber tests
- Generate and serve the Allure report in your browser
bundle exec cucumber- Add options as needed (see
Rakefilefor formatter usage)
If you already have results and just want to view the report:
bundle exec rake open_allure_reportOr manually:
allure serve allure-results- Screenshots and diffs are stored in
screenshots/andvisual_snapshots/. - Visual comparison logic is in
features/support/visual_comparison_helper.rb.
features/
├── *.feature # Gherkin feature files
├── pages/ # Page Object Model classes
├── step_definitions/ # Step definitions for features
└── support/ # Env, hooks, helpers
allure-results/ # Allure raw results
screenshots/, visual_snapshots/ # Visual regression artifacts
Rakefile # Test and report automation
Gemfile # Ruby dependencies
- Allure not found? Ensure
allureis in your system PATH. - Java errors? Allure requires Java (JRE/JDK) to be installed.
- Windows: Use PowerShell or CMD, and ensure all dependencies are installed.