Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g105b/docker-behat-chromium-headless
Dead simple Behat tests running in a Docker container on a headless Chromium.
https://github.com/g105b/docker-behat-chromium-headless
chrome-headless chromium-headless docker docker-chrome docker-chromium docker-image
Last synced: 29 days ago
JSON representation
Dead simple Behat tests running in a Docker container on a headless Chromium.
- Host: GitHub
- URL: https://github.com/g105b/docker-behat-chromium-headless
- Owner: g105b
- Created: 2019-02-18T15:25:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-18T16:27:56.000Z (almost 6 years ago)
- Last Synced: 2024-10-18T12:00:06.637Z (3 months ago)
- Topics: chrome-headless, chromium-headless, docker, docker-chrome, docker-chromium, docker-image
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Dead simple Behat tests running in a Docker container on a headless Chromium.
=============================================================================This repository holds a dead simple plain PHP application and some Behat tests, all within Docker containers.
*****
Running the application yourself
--------------------------------### Manually (without Docker)
To test that things are working before adding Docker into the mix, this application can be run using PHP's inbuilt server.
1) Clone the repository: `git clone https://github.com/g105b/docker-behat-chromium-headless`.
2) Enter the directory and run the server: `cd docker-behat-chromium-headless`, `php -S 0.0.0.0:80`.
3) Visit http://localhost in your browser. You should see a _Hello, World_ message and an interactive form.Press Ctrl+C to stop PHP's inbuilt server.
### As a Docker composition
1) Clone and enter the repository.
2) Run `docker-compose up` to bring up the code and web containers, as defined within `docker-compose.yml`.
3) Visit http://localhost in your browser. You should see a _Hello, World_ message and an interactive form.Run `docker-compose down` to stop the Docker composition.
Running the tests
-----------------Docker compositions can be split across multiple files. Before the tests can be run, the dependencies for Behat must be pulled in via Composer. Compose**r**.
Install dependencies with the command `docker-compose -f docker-compose.build.yml up`. You should see the Composer output scroll past until the script completes with a successful `0` exit code.
Once the dependencies are installed, the tests can be run with the command `docker-compose -f docker-compose.test.yml up`.