Coder Social home page Coder Social logo

behave.example's Introduction

behave.example: Examples and Tutorials

Date: 2013-11-09
Category:BDD, testing
License:BSD

behave is a BDD test framework and cucumber-clone for Python. This project provides tutorials and examples how to use behave. It should extends the excellent documentation of behave.

SEE ALSO:
DOCUMENTATION:
REPOSITORIES:

INSTALL

The project provides tutorials and examples. Therefore, it should not be installed. To prepare the local installation, use the following command to install all prerequisites:

pip install -r requirements.txt

Snapshots of the behave and parse_type implementations are provided in the directory lib/python2/. This directory is automatically used when you use bin/behave to run behave.

HOWTO

Cleanup local workspace:

paver clean

Run behave tests:

paver test

or:

bin/behave features/
bin/behave datatype.features/
bin/behave step_matcher.features/

Build Sphinx-based documentation with tutorials:

paver docs

If paver is not installed, use the following canned script instead:

bin/paver command ...

SPECIAL CONFIGURATION

  • The behave PrettyFormatter is replaced with pretty2.SimplePrettyFormatter.

    This formatter implementation avoids cursor-ups while processing steps. ANSI escape cursor-up sequences do not work with sphinxcontrib-ansi when the sphinx-based documentation is generated (experimental feature for colorized behave output support).

  • sphinxcontrib-ansi does not process the following ANSI escape sequences correctly (set-color, set-bold):

    CSI{color_code}mCSI1m
    

    The color is reset in HTML output when set-bold is detected. The following ANSI escape sequence should be used instead:

    CSI{color_code};1m
    

    The behave runner, that is used here, patches the original functionality to use the second solution ("use_ansi_escape_colorbold_composites()").

  • The coloring schema in behave is adapted by setting the environment variable ("grey" is replaced with "white"):

    GHERKIN_COLORS="executing=white:comments=white"
    
  • To disable "ANSI coloring" support for Sphinx, set "ansiterm_supported = False" in "docs/conf.py". Note that this is not necessary on Windows.

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.