Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicofuma/behatch-contexts
Behatch contexts fork (jsonschema 2) - https://github.com/Behatch/contexts
https://github.com/nicofuma/behatch-contexts
Last synced: 14 days ago
JSON representation
Behatch contexts fork (jsonschema 2) - https://github.com/Behatch/contexts
- Host: GitHub
- URL: https://github.com/nicofuma/behatch-contexts
- Owner: Nicofuma
- License: other
- Created: 2016-08-24T14:36:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-17T13:02:59.000Z (over 5 years ago)
- Last Synced: 2024-10-11T00:37:13.240Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 573 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Behatch contexts
================.. image:: https://travis-ci.org/Behatch/contexts.svg?branch=master
:target: https://travis-ci.org/Behatch/contexts
:alt: Build status.. image:: https://scrutinizer-ci.com/g/Behatch/contexts/badges/quality-score.png?b=master
:target: https://scrutinizer-ci.com/g/Behatch/contexts/?branch=master
:alt: Scrutinizer Code Quality.. image:: https://scrutinizer-ci.com/g/Behatch/contexts/badges/coverage.png?b=master
:target: https://scrutinizer-ci.com/g/Behatch/contexts/?branch=master
:alt: Code Coverage.. image:: https://insight.sensiolabs.com/projects/ed08ea06-93c2-4b90-b65b-4364302b5108/mini.png
:target: https://insight.sensiolabs.com/projects/ed08ea06-93c2-4b90-b65b-4364302b5108
:alt: SensioLabsInsightBehatch contexts provide most common Behat tests.
Installation
------------This extension requires:
* Behat 3+
* Mink
* Mink extensionThrough PHAR
~~~~~~~~~~~~Download the .phar archives:
* `behat.phar `_ - Behat itself
* `mink.phar `_ - Mink framework
* `mink_extension.phar `_ - Mink integration extension
* `behatch_contexts.phar `_ - Behatch contextsAnd activate it in your in your ``behat.yml``:
.. code-block:: yaml
# behat.yml
default:
# ...
extensions:
behatch_contexts.phar: ~Through Composer
~~~~~~~~~~~~~~~~The easiest way to keep your suite updated is to use
`Composer `_.You can add Behatch contexts as dependencies for your project or rapidly
bootstrap a Behatch projects.Project dependency
******************1. Define dependencies in your ``composer.json``:
.. code-block:: js
{
"require-dev": {
..."behatch/contexts": "*"
}
}2. Install/update your vendors:
.. code-block:: bash
$ curl http://getcomposer.org/installer | php
$ php composer.phar install3. Activate extension by specifying its class in your ``behat.yml``:
.. code-block:: yaml
# behat.yml
default:
# ...
extensions:
Sanpi\Behatch\Extension: ~Project boostraping
*******************1. Download the Behatch skeleton with composer:
.. code-block:: bash
$ curl http://getcomposer.org/installer | php
$ php composer.phar create-project behatch/skeleton.. note::
Browser, json, table and rest step need a mink configuration, see
`Mink extension `_ for more information.Usage
-----In ``behat.yml``, enable desired contexts:
.. code-block:: yaml
default:
suites:
default:
contexts:
- behatch:browser
- behatch:debug
- behatch:system
- behatch:json
- behatch:table
- behatch:rest
- behatch:xmlConfiguration
-------------* ``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 stepsTranslation
-----------.. image:: https://www.transifex.com/projects/p/behatch-contexts/resource/enxliff/chart/image_png
:target: https://www.transifex.com/projects/p/behatch-contexts/
:alt: See more information on Transifex.com