2017 © Pedro Peláez
 

library behatch-contexts

Behatch contexts

image

sanpi/behatch-contexts

Behatch contexts

  • Wednesday, April 22, 2015
  • by sanpi
  • Repository
  • 0 Watchers
  • 0 Stars
  • 208,328 Installations
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 1 % Grown

The README.md

Behatch contexts

Build status Scrutinizer Code Quality Code Coverage SensioLabsInsight, (*1)

Behatch contexts provide most common Behat tests., (*2)

Installation

This extension requires:, (*3)

  • Behat 3+
  • Mink
  • Mink extension

Project dependency

  1. Install Composer
  2. Require the package with Composer:
$ composer require --dev behatch/contexts
  1. Activate extension by specifying its class in your behat.yml:
# behat.yml
default:
    # ...
    extensions:
        Behatch\Extension: ~

Project bootstraping

  1. Download the Behatch skeleton with composer:
$ php composer.phar create-project behatch/skeleton

Browser, json, table and rest step need a mink configuration, see Mink extension for more information., (*4)

Usage

In behat.yml, enable desired contexts:, (*5)

default:
    suites:
        default:
            contexts:
                - behatch:context:browser
                - behatch:context:debug
                - behatch:context:system
                - behatch:context:json
                - behatch:context:table
                - behatch:context:rest
                - behatch:context:xml

Examples

This project is self-tested, you can explore the features directory to find some examples., (*6)

Configuration

  • browser - more browser related steps (like mink)
    • timeout - default timeout
  • debug - helper steps for debugging
    • screenshotDir - the directory where store screenshots
  • system - shell related steps
    • root - the root directory of the filesystem
  • json - JSON related steps
    • evaluationMode - javascript "foo.bar" or php "foo->bar"
  • table - play with HTML the tables
  • rest - send GET, POST, ... requests and test the HTTP headers
  • xml - XML related steps

Configuration Example

For example, if you want to change default directory to screenshots - you can do it this way:, (*7)

default:
    suites:
        default:
            contexts:
                - behatch:context:debug:
                    screenshotDir: "var"

Translation

See more information on Transifex.com, (*8)

The Versions

10/04 2015
11/04 2014
17/12 2013

1.3

1.3.0.0

Behatch contexts

  Sources   Download

beerware

The Requires

 

The Development Requires

bdd symfony2 behat context

03/12 2012

1.2

1.2.0.0

Behatch contexts

  Sources   Download

The Requires

 

bdd symfony2 behat context

05/07 2012

1.1

1.1.0.0

Behatch contexts

  Sources   Download

bdd symfony2 behat context

29/06 2012

1.0

1.0.0.0

Behatch contexts

  Sources   Download

bdd symfony2 behat context