Skip to content

Smashtest package inside a Docker container. This repo also contains sample code.

Notifications You must be signed in to change notification settings

mendhak/docker-smashtest

Repository files navigation

This Docker image contains the Smashtest CLI.

It is meant to be run as part of a local Docker development environment, or as part of a CI job, against a Selenium Grid.

Example, if you've got your .smash files in the current directory and optionally a smashtest.json.

# by default runs the `smashtest` command
docker run -v ${PWD}:/code --rm mendhak/smashtest  

# or be explicit
docker run -v ${PWD}:/code --rm mendhak/smashtest  smashtest

You can also use the same command line arguments as Smashtest:

docker run -v ${PWD}:/code --rm mendhak/smashtest smashtest --help

Samples

To run these samples, clone this repo, which provides a smashtest file, a smashtest.json, and some docker compose files.

Docker Compose sample, including a local Selenium Grid

Start the grid first.

docker-compose -f docker-compose.grid.yml up

Then run the Smashtests against that grid

docker-compose -f docker-compose.smashtest.yml run --rm testrunner

Docker Run sample, including a local Selenium Grid

Start the grid first.

docker-compose -f docker-compose.grid.yml up

Then run the Smashtests against that grid

docker run -it --network seleniumgrid  -v ${PWD}:/code --rm mendhak/smashtest

Motivation

I've created this image because an official one isn't provided.
I didn't want to install the package globally as it's a bad practice.
I wanted to save time on installing the package locally on each test run by just using a container.

About

Smashtest package inside a Docker container. This repo also contains sample code.

Resources

Stars

Watchers

Forks

Packages

No packages published