Home

Awesome

Howitzer Example Rspec

Build Status CircleCI

Howitzer example project based on Rspec for demo web application http://demoapp.strongqa.com

Requirements

Getting Started

Note! This project uses Git submodules in order to reuse common code between similar projects:

howitzer_example_cucumber howitzer_example_turnip

Typically it is not required for a regular project based on Howitzer

How to try the project locally

git clone --recursive git@github.com:strongqa/howitzer_example_rspec.git
bundle install
rake -T

Run tests in Docker

Build image

docker build -t howitzer_example_rspec .

Driver which is used by default is headless chrome

Use docker run command to create and run container.

docker run -d --name rspec_container howitzer_example_rspec
docker exec -it rspec_container /bin/bash
docker exec -it <container ID> /bin/bash
SEXY_SETTINGS="driver=headless_chrome; headless_chrome_flags=$CHROME_ARGS" bundle exec rake

NOTE! If you need to launch tests under firefox headless browser, use this command:

SEXY_SETTINGS="driver=headless_firefox" bundle exec rake

Run with docker compose

docker-compose -f docker-compose.yml up -d
docker compose exec -it howitzer_example_rspec  /bin/bash

Stop container

docker-compose -f docker-compose.yml down

WARNING: after this command container will be deleted and all data lost.

docker stop <container_name/ID>

Contributing

Code quality is controlled by Rubocop

It is useful to activate rubocop pre-commit git hook for changed files.

cp scripts/pre-commit .git/hooks/pre-commit