Skip to content

avgustvik/ParaBank

Repository files navigation

Capybara BDD Test Automation Framework

Overview

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.


Prerequisites

  • Ruby (2.6+ recommended)
  • Bundler (gem install bundler)
  • Java (required for Allure report serving)
  • Allure Commandline

Setup

  1. Clone the repository:
    git clone <repo-url>
    cd capybara
  2. Install dependencies:
    bundle install
  3. Install Allure Commandline:
    • Mac: brew install allure
    • Windows: Download from Allure Releases and add to PATH.
    • Linux: Use package manager or download from releases.

Running Tests

Run All Tests and Generate Allure Report

bundle exec rake allure_test
  • This will:
    • Clean previous Allure results
    • Run all Cucumber tests
    • Generate and serve the Allure report in your browser

Run Cucumber Directly

bundle exec cucumber
  • Add options as needed (see Rakefile for formatter usage)

Viewing Reports

Serve the Latest Allure Report

If you already have results and just want to view the report:

bundle exec rake open_allure_report

Or manually:

allure serve allure-results

Visual Regression Testing

  • Screenshots and diffs are stored in screenshots/ and visual_snapshots/.
  • Visual comparison logic is in features/support/visual_comparison_helper.rb.

Project Structure

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

Troubleshooting

  • Allure not found? Ensure allure is 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.

Resources

About

Ruby Automation Framework for Web UI Testing

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages