Giter Site home page Giter Site logo

terrorizer1980 / cuke_slicer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hacker0x01/cuke_slicer

0.0 0.0 0.0 86 KB

A tool to slice up your Cucumber test suite into small, easy to parallelize pieces.

License: MIT License

Ruby 76.56% Gherkin 23.44%

cuke_slicer's Introduction

Basic stuff: Gem Version Project License Downloads

User stuff: Yard Docs

Developer stuff: Build Status Build status Coverage Status Maintainability


CukeSlicer

The cuke_slicer gem provides an easy and programmatic way to divide a Cucumber test suite into granular test cases that can then be dealt with on an individual basis. Often this means handing them off to a distributed testing system in order to parallelize test execution.

Installation

Add this line to your application's Gemfile:

gem 'cuke_slicer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cuke_slicer

Usage

require 'cuke_slicer'


# Choose which part of your test suite that you want to slice up
test_directory = 'path/to/your_test_directory'

# Choose your slicing filters
filters = {excluded_tags: ['@tag1','@tag2'],
           included_tags: '@tag3',
           excluded_paths: 'foo',
           included_paths: [/test_directory/]}

# Use the slicer to find all tests matching those filters
found_tests = CukeSlicer::Slicer.new.slice(test_directory, filters, :file_line)


# Arrange the sliced pieces to suit your particular needs. In this case, we will dump them
# into a file that Cucumber can consume.

File.open('tests_to_run.txt', 'w') { |file| file.puts found_tests }

system('cucumber @tests_to_run.txt')

Contributing

  1. Fork it ( https://github.com/[my-github-username]/cuke_slicer/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

cuke_slicer's People

Contributors

alexanderjeurissen avatar ashtony42 avatar cartoloupe avatar dbwest avatar enkessler avatar jmflatt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.