https://github.com/knplabs/behat-training
Behat training
https://github.com/knplabs/behat-training
hacktoberfest training-material
Last synced: 5 months ago
JSON representation
Behat training
- Host: GitHub
- URL: https://github.com/knplabs/behat-training
- Owner: KnpLabs
- Created: 2022-06-09T13:09:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-13T07:18:10.000Z (almost 4 years ago)
- Last Synced: 2025-10-06T16:44:25.778Z (10 months ago)
- Topics: hacktoberfest, training-material
- Language: Dockerfile
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
make start
```
It will build, run and install the necessary dependencies.
### **Stop**
In order to stop the project run:
```bash
make stop
```
### **Behat**
Once you installed behat you can run it using:
```bash
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:
```bash
make behat ARGS=--help
```
### **Crawler**
Once you'll have written your Mink crawler you'll be able to run it using:
```bash
make crawler
```
### **Run any other command**
In order to run any other command in the PHP container you can use the following:
```bash
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