Posts

Showing posts with the label Headless Chrome

Running Tests in Docker for Front-end Developers (ng2+)

Image
Unit tests (karma/jasmine) & End-to-end tests (protractor) If you are comfortable with Docker and Angular 2, all you need is the Dockerfile. If you are new to testing in Docker, this short article will bring you up to speed. If you need more help getting up to speed with Docker, begin with my previous article: Docker for Angular 2 devs . Installation  In order to develop Angular 2+ in a container, you need to install Docker on a computer or VM. Docker takes a bit of memory and can take a lot of space so the biggest box you can give it is best. Once Docker is installed, start is up. Make sure all your docker commands are run from the folder that contains the Dockerfile. Dockerfile  Docker works by reading the description of a Dockerfile (or several in conjunction), to build out an image. Once the image is running, it is called a container. This particular Dockerfile is based on a Docker image that already has headless chrome, markadams/chromium-xvfb-js:7. There are s...