Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Behat extension with most custom helper steps

License

NotificationsYou must be signed in to change notification settings

rtlnl/contexts

 
 

Repository files navigation

Build statusScrutinizer Code QualityCode CoverageSensioLabsInsight

Behatch contexts provide most common Behat tests.

Installation

This extension requires:

  • 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 yourbehat.yml:
# behat.ymldefault:# ...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, seeMinkextension for more information.

Usage

Inbehat.yml, enable desired contexts:

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 thefeaturesdirectory to find some examples.

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:

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

Translation

See more information on Transifex.com

About

Behat extension with most custom helper steps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Gherkin57.6%
  • PHP42.4%

[8]ページ先頭

©2009-2025 Movatter.jp