Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Behatch/contexts
Behat extension with most custom helper steps
https://github.com/Behatch/contexts
behat-contexts behat-extension
Last synced: 4 days ago
JSON representation
Behat extension with most custom helper steps
- Host: GitHub
- URL: https://github.com/Behatch/contexts
- Owner: Behatch
- License: other
- Archived: true
- Created: 2012-04-16T21:01:02.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-02-03T11:14:52.000Z (9 months ago)
- Last Synced: 2024-10-29T20:55:57.806Z (13 days ago)
- Topics: behat-contexts, behat-extension
- Language: Gherkin
- Homepage:
- Size: 826 KB
- Stars: 393
- Watchers: 14
- Forks: 203
- Open Issues: 55
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Behatch contexts
================[![Build status](https://travis-ci.org/Behatch/contexts.svg?branch=master)](https://travis-ci.org/Behatch/contexts)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Behatch/contexts/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Behatch/contexts/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/Behatch/contexts/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Behatch/contexts/?branch=master)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/ed08ea06-93c2-4b90-b65b-4364302b5108/mini.png)](https://insight.sensiolabs.com/projects/ed08ea06-93c2-4b90-b65b-4364302b5108)Behatch contexts provide most common Behat tests.
Installation
------------This extension requires:
* Behat 3+
* Mink
* Mink extension### Project dependency
1. [Install Composer](https://getcomposer.org/download/)
2. Require the package with Composer:```
$ composer require --dev behatch/contexts
```3. Activate extension by specifying its class in your `behat.yml`:
```yaml
# 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](https://github.com/Behat/MinkExtension) for more information.Usage
-----In `behat.yml`, enable desired contexts:
```yaml
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](./tests/features) 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:
```yaml
default:
suites:
default:
contexts:
- behatch:context:debug:
screenshotDir: "var"
```Translation
-----------[![See more information on Transifex.com](https://www.transifex.com/projects/p/behatch-contexts/resource/enxliff/chart/image_png)](https://www.transifex.com/projects/p/behatch-contexts/)