/behat-training

Behat training

Primary LanguageDockerfile

Behat training

Context

This is the practical part of our Behat training.

Training goal

The participants will practice Behavior Driven Development (BDD) with Behat and they will learn how to write good user stories, meaningful tests and Behat features.

Slides

https://knplabs.slides.com/d/xqNk8HI/live

How to use it

Start

In order to start the project just run:

make start

It will build, run and install the necessary dependencies.

Stop

In order to stop the project run:

make stop

Behat

Once you installed behat you can run it using:

make behat

It will run all tests.

If you want to pass some arguments to behat command you can do it by setting the ARGS var:

make behat ARGS=--help

Crawler

Once you'll have written your Mink crawler you'll be able to run it using:

make crawler

Run any other command

In order to run any other command in the PHP container you can use the following:

make run CMD="composer require ..."

Debug headless Chrome

chrome://inspect/#devices

Read (or view) more about it

B(ehavior) D(riven) D(evelopment): https://dannorth.net/introducing-bdd/

D(omain) D(riven) D(esign): https://martinfowler.com/bliki/DomainDrivenDesign.html

Ubiquitous language: https://martinfowler.com/bliki/UbiquitousLanguage.html

Gherkin: https://cucumber.io/docs/gherkin/reference/

Behat: https://www.youtube.com/watch?v=QnPmbQbsTV0