Skip to content

This project will init a Symfony project with Docker to run behat test

Notifications You must be signed in to change notification settings

Kimouss/Symfony-Behat

Repository files navigation

Symfony - Behat

This project will init a Symfony project with Docker to run behat test

Requirements

  • Docker
  • Docker-compose
  • Make

Installation

  • Edit variable PROJECT_PORT port in .env
  • make .env.local
  • Edit your .env.local
  • bash make install or make reset :)

Execution modes

You can run test with

$ make behat

or

$ docker exec -t symfony_behat_php vendor/bin/behat

If you want to run specific test, add a tag before your scenario

@javascript @demo @tag
Scenario: This is an example

Then run with your tag,

$ docker exec -t symfony_behat_php vendor/bin/behat --tags demo

Browser

By default, the tests will execute with Chrome node.

Chrome Chrome

$ docker exec -t symfony_behat_php vendor/bin/behat --profile chrome

But you can execute with Firefox node

Firefox Firefox

$ docker exec -t symfony_behat_php vendor/bin/behat --profile firefox

Preview

This project integrates a test visualization (headless) with Selenium Grid

Selenium Grid

Go to Sessions on sidebar

Selenium Session

Then, you can have live preview thanks to VNC system

Selenium VNC

You can also record your test on .mp4 file in folder .docker/test/recording

To do that:

  • run your chrome or firefox video image
  • run test
  • stop chrome or firefox video image
  • wait a few minute and your video is ready !

About

This project will init a Symfony project with Docker to run behat test

Resources

Stars

Watchers

Forks