All Projects → danbuckland → Crudecumber

danbuckland / Crudecumber

Licence: mit
A manual Cucumber runner RubyGem

Labels

Projects that are alternatives of or similar to Crudecumber

karate-runner
VSCode Extension for Karate
Stars: ✭ 23 (+155.56%)
Mutual labels:  gherkin
behave-restful
BDD Framework to Test REST Services and APIs
Stars: ✭ 47 (+422.22%)
Mutual labels:  gherkin
Contexts
Behat extension with most custom helper steps
Stars: ✭ 387 (+4200%)
Mutual labels:  gherkin
CucumberSwift
A lightweight swift Cucumber implementation
Stars: ✭ 40 (+344.44%)
Mutual labels:  gherkin
flutter gherkin
A Gherkin parsers and runner for Dart and Flutter which is very similar to cucumber
Stars: ✭ 160 (+1677.78%)
Mutual labels:  gherkin
Jekyll Responsive Image
An unopinionated Jekyll plugin for generating and using responsive images
Stars: ✭ 289 (+3111.11%)
Mutual labels:  gherkin
Awesome-Cucumber
A collection of awesome Cucumber and Gherkin-related resources
Stars: ✭ 33 (+266.67%)
Mutual labels:  gherkin
Gherkin
Gherkin parser, written in PHP 5.3+ for Behat project
Stars: ✭ 924 (+10166.67%)
Mutual labels:  gherkin
bat
Gherkin based DSL for testing HTTP APIs via Cucumber.JS
Stars: ✭ 30 (+233.33%)
Mutual labels:  gherkin
Symfonyextension
🎼 Extension integrating Behat with Symfony.
Stars: ✭ 376 (+4077.78%)
Mutual labels:  gherkin
cucumber-react
React components for Cucumber
Stars: ✭ 15 (+66.67%)
Mutual labels:  gherkin
gherkin
Pure Rust implementation of Gherkin language (`.feature` file) for Cucumber testing framework.
Stars: ✭ 41 (+355.56%)
Mutual labels:  gherkin
Middleman Blog
Middleman : Blog Engine Extension
Stars: ✭ 317 (+3422.22%)
Mutual labels:  gherkin
gavel-spec
Behavior specification for Gavel, validator of HTTP transactions
Stars: ✭ 105 (+1066.67%)
Mutual labels:  gherkin
Karate
Test Automation Made Simple
Stars: ✭ 5,497 (+60977.78%)
Mutual labels:  gherkin
kheera-testrunner-android
BDD Framework for Android
Stars: ✭ 18 (+100%)
Mutual labels:  gherkin
Trema
Full-Stack OpenFlow Framework in Ruby
Stars: ✭ 267 (+2866.67%)
Mutual labels:  gherkin
Cuke linter
A linting tool for Cucumber
Stars: ✭ 24 (+166.67%)
Mutual labels:  gherkin
Opencypher
Specification of the Cypher property graph query language
Stars: ✭ 534 (+5833.33%)
Mutual labels:  gherkin
Behat
BDD in PHP
Stars: ✭ 3,696 (+40966.67%)
Mutual labels:  gherkin

Crudecumber

Gem Version

Crudecumber allows developers and testers to manually run through Cucumber scenarios written in Gherkin in the command line without the need for any step definitions.

Crudecumber was developed as a tool to promote the use of Behaviour Driven Development and Cucumber within teams that might not have the time or expertise to turn their scenarios into automated tests.

Installation

Prerequisites

You must have Ruby 1.9.3 or higher running on your machine. Enter ruby -v in a terminal to see the version that is currently running.

Installation

Install the Crudecumber Ruby gem by running gem install crudecumber. Additional dependencies, including Cucumber and its dependencies, will automatically be downloaded and installed at this time.

Running

Crudecumber can be run in two different ways, the simplest is to just run Crudecumber directly in the terminal. The alternative is to have Crudecumber called and run by Cucumber using a profile in an existing test suite. Both methods are described below.

Running as Crudecumber

After installing Crudecumber, simply type crudecumber in a terminal from within a directory that contains a features folder with at least one .feature file.

Your features and scenarios are run as they would be with Cucumber, but stop at each step to await one of the following keyboard inputs:

  • P or Return to pass the step.
  • F or X to fail the step and then type in the reason.
  • S to Skip the step.

You can append any of the usual Cucumber arguments to, for example, run a subset of your tests e.g.:

crudecumber -t @manual to run only those scenarios tagged with @manual

Running as a Cucumber Profile

Using a cucumber.yml file, it's possible to have Crudecumber run your scenarios for one or more Cucumber profiles. This allows the user to use Crudecumber to run tests, or a subset of tests, manually by typing, for example, cucumber -p manual.

After installing Crudecumber, you'll need to require it in your automation suite. However, as soon as Crudecumber is loaded into your environment, it will be used to run every scenario.

To avoid Crudecumber being used on your already automated scenarios, it's recommended to conditionally require 'crudecumber' based on a specific tag. In the below example, we're using the tag @manual.

Add the following in the Before part of your env.rb file:

# features/support/env.rb

Before do |scenario|  
  if scenario.source_tag_names.include? "@manual"
    require 'crudecumber'
  end
end

This will work now if you were to run cucumber -t @manual. However, to avoid scenarios tagged with @manual being run during automated test runs, it's recommended to exclude these scenarios from all other profiles.

Add a manual profile to run scenarios tagged @manual and exclude scenarios tagged @manual from other profiles in your project's cucumber.yml file:

# config/cucumber.yml

default: -t [email protected] -f pretty -f html -o automated_test_report.html
manual: -t @manual

Then run your manual tests by typing cucumber -p manual in a terminal and using the keyboard inputs described in the previous section.

Crudecumber uses its own modified formatters to display scenarios in the terminal and output an html report without error messages. Including other formatters and outputs in your manual profile may break something.

Force Crudecumber from Cucumber

Depending on the structure of you Cucumber tests, you may encounter an issue with the above where Cucumber runs again after Crudecumber has finished. This tends to occur if you have a lot going on in your support directory or you're using a framework like Calabash.

To fix, replace require 'crudecumber' with the following in the Before part of you env.rb file:

# features/support/env.rb

Before do |scenario|  
  if scenario.source_tag_names.include? "@manual"
    exec('crudecumber -p manual')
  end
end

Using exec replaces the currently running process – in this case Cucumber – with the specified new process – in this case Crudecumber.

As before, use a manual profile to run scenarios tagged @manual and exclude scenarios tagged @manual from other profiles in your project's cucumber.yml file:

# config/cucumber.yml

default: -t [email protected] -f pretty -f html -o automated_test_report.html
manual: -t @manual -f progress

Adding -f progress will prevent the first feature being printed before Crudecumber is called.

For this to work, you should ensure that you have Crudecumber in your Gemfile and installed through bundler.

Known issues and limitations

Crudecumber should now be feature complete, i.e. it should be able to work with all standard Cucumber scenario types. If you spot a bug, please raise an issue against the project.

In the current release there are the following known issues:

  • Crudecumber is not compatible with Cucumber 2.0 or above. Even if you're not using Cucumber 2.0 but you have it installed, you'll have a problem with steps not being rendered until after they are passed, failed or skipped. The best way to avoid this is to use rvm and use a separate gemset for your Cucumber 2.0 stuff.
  • This tool has been developed and tested on Mac OSX and Linux. Windows users may have trouble getting it to run.

If you'd like to contribute to this project and perhaps fix any of the above, please fork the project, make and test your change and then generate a pull request!

Copyright

Copyright (c) 2015-2017 Dan Buckland and Contributors. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].