Skip to content

daigoro86dev/scenarioslicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🥒 ScenarioSlicer

License: MIT .NET

Slice your Gherkin .feature files into one file per Scenario – perfect for parallel execution, test distribution, and fine-grained test control.

✨ Handles Backgrounds, Scenario Outlines, custom tagging, wild-card exclusions, dry-run previews, and summary reporting out of the box.


🚀 Features

  • 📂 Recursively scan folders for *.feature files
  • 🔄 Expand Scenario Outlines into individual Scenarios
  • 🏷️ Preserve Feature & Scenario-level tags
  • 📝 Preserve Feature descriptions and Background steps
  • ➕ Inject a custom CLI tag into every generated Scenario
  • 🪓 Generate unique Feature: OriginalName – ScenarioName headers
  • 🚫 Skip files with --exclude "<pattern>" (wildcards supported)
  • 🚫 Skip scenarios with --exclude-tag <tag>
  • 📋 Supports .featureignore file for bulk exclusions
  • 🧪 Dry-run mode (--dry-run) to preview changes
  • 📊 Summary reporting (files processed & scenarios generated)
  • ⚡ Optional grouping by tag to balance scenarios for parallel execution
  • 📦 Distributed as a cross-platform dotnet tool

⚙️ Requirements


🛠️ Setup

1. Run locally (no install)

If using a .featureignore file, place it in the same root folder passed to --input.

🖥️ PowerShell

dotnet run --project . --% slice
  --input <gherkin folder>
  --output <destination folder>
  --tag <custom tag>
  --exclude <file pattern>
  --exclude-tag <tag to skip>
  --groups <number of groups>

🐧 Bash

dotnet run --project . slice   
    --input <gherkin folder>   
    --output <destination folder>   
    --tag <custom tag>   
    --exclude <file pattern>   
    --exclude-tag <tag to skip>   
    --groups <number of groups>

2. Install as a Global .NET Tool

dotnet pack -c Release -o ./nupkg

dotnet tool install --global --add-source ./nupkg scenarioslicer --version 1.0.0

scenarioslicer slice   
    --input <gherkin folder>   
    --output <destination folder>   
    --tag <custom tag>   
    --exclude <file pattern>   
    --exclude-tag <tag to skip>   
    --groups <number of groups>

📜 License

MIT © 2025 Bruno Maio

About

Slice your Gherkin .feature files into one file per Scenario

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages