Giter Club home page Giter Club logo

grunt-behat-wrapper's Introduction

grunt-behat-wrapper

Build status

Build Status: Linux

Install

Install with npm

npm install grunt-behat-wrapper --save-dev

Tasks

behat-definitions

Wrapper around the behat --definitions foo command.

Print all available step definitions:

  • use --definitions l to just list definition expressions.
  • use --definitions i to show definitions with extended info.
  • use --definitions 'needle' to find specific definitions.

Use --lang to see definitions in specific language.

Configuration

With the default options the

grunt behat-definitions

is equivalent to

./bin/behat --definitions l

behat-story-syntax

Wrapper around the behat --story-syntax command.

Print *.feature example. Use --lang to see specific language.

Configuration

With the default options the

grunt behat-story-syntax

is equivalent to

./bin/behat --story-syntax

behat-config-reference

Wrapper around the behat --config-reference command.

Display the configuration reference.

Configuration

With the default options the

grunt behat-config-reference

is equivalent to

./bin/behat --config-reference

behat-run

Wrapper around the behat command.

Run tests.

Configuration

With the default options the

grunt behat-run

is equivalent to

./bin/behat

behat-rerun

Wrapper around the behat --rerun command.

Re-run scenarios that failed during last execution.

Configuration

With the default options the

grunt behat-rerun

is equivalent to

./bin/behat --rerun

Configuration

options.behatExecutable

Type: String

Default value: './bin/behat'

Path to behat executable.

options.args

Type: Object

Default value: {}

Key-value. The keys are almost the same as in the options in the CLI.

options.args.suite

Type: String

Default value: null

Only execute a specific suite.

options.args.format

Type: String

Default value: null

How to format tests output. pretty is default.

Available formats are:

  • progress: Prints one character per step.
  • pretty: Prints the feature as is.

You can use multiple formats at the same time. (multiple values allowed)

options.args.out

Type: String

Default value: null

Write format output to a file/directory instead of STDOUT (output_path). You can also provide different outputs to multiple formats. (multiple values allowed)

options.args.formatSettings

Type: String

Default value: null

@todo Set formatters parameters using json object. Keys are parameter names, values are values. (multiple values allowed)

options.args.lang

Type: String

Default value: null

Only executeCall the feature elements which match part of the given name or regex. (multiple values allowed)

options.args.tags

Type: String

Default value: null

Only executeCall the features or scenarios with tags matching tag filter expression. (multiple values allowed)

options.args.definitions

Type: String

Default value: 'l'

options.args.appendSnippets

Type: Boolean

Default value: false

Appends snippets for undefined steps into main context.

options.args.noSnippets

Type: Boolean

Default value: false

Do not print snippets for undefined steps after stats.

options.args.strict

Type: Boolean

Default value: true

Passes only if all tests are explicitly passing.

options.args.stopOnFailure

Type: Boolean

Default value: true

Stop processing on first failed scenario.

options.args.profile

Type: String

Default value: null

Specify config profile to use.

options.args.config

Type: String

Default value: null

Specify config file to use.

options.args.verbose

Type: Boolean

Default value: false

options.args.noInteraction

Type: Boolean

Default value: false

Do not ask any interactive question.

options.args.colors

Type: TriState

Default value: null

If true then force ANSI color in the output. By default color support is guessed based on your platform and the output if not specified.

If false then force no ANSI color in the output.

paths

Type: String[]

Default value: []

Optional path(s) to execute. Could be:

  • a dir (features/)
  • a feature (*.feature)
  • a scenario at specific line (*.feature:10).
  • all scenarios at or after a specific line (.feature:10-).
  • all scenarios at a line within a specific range (*.feature:10-20).
  • a scenarios list file (*.scenarios).

Flags

You can modify the arguments by Flags

Flag colors

Override the value of options.args.colors argument with true.

Flag no-colors

Override the value of options.args.colors argument with false.

Flag no-interaction

Override the value of options.args.noInteraction argument with true.

Flag verbose

Override the value of options.args.verbose argument with true.

Flag dryRun

Override the value of options.args.dryRun argument with true.

Flag strict

Override the value of options.args.strict argument with true.

Flag pretty

Override the value of options.args.format argument with 'pretty'.

Flag progress

Override the value of options.args.format argument with 'progress'.

Examples

Basic

require('jit-grunt')(
  grunt,
  // Mapping.
  {
    'behat-definitions': 'grunt-behat-wrapper',
    'behat-story-syntax': 'grunt-behat-wrapper',
    'behat-config-reference': 'grunt-behat-wrapper',
    'behat-run': 'grunt-behat-wrapper',
    'behat-rerun': 'grunt-behat-wrapper'
  }
);

grunt.config.init({
  'behat-definitions': {
    main: {}
  },
  'behat-story-syntax': {
    main: {}
  },
  'behat-config-reference': {
    main: {}
  },
  'behat-run': {
    main: {}
  },
  'behat-rerun': {
    main: {}
  }
});

Author

Andor Dávid

Release History

  • v0.0.2 - 2015-06-28
    • Add dynamic flag support for --lang, --definitions and --profile.
    • Fix "files" vs "paths" documentation bug.
  • v0.0.1 - 2015-06-27
    • Initial release with basic functions.

License

Copyright (c) 2015 Andor Dávid, contributors.

grunt-behat-wrapper's People

Contributors

sweetchuck avatar

Watchers

 avatar  avatar  avatar

Forkers

victorlazov

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.