https://github.com/strongqa/howitzer_example_cucumber
Example project based on Howitzer2.0 with --cucumber option
https://github.com/strongqa/howitzer_example_cucumber
Last synced: 3 months ago
JSON representation
Example project based on Howitzer2.0 with --cucumber option
- Host: GitHub
- URL: https://github.com/strongqa/howitzer_example_cucumber
- Owner: strongqa
- License: mit
- Created: 2015-10-29T16:38:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T13:33:54.000Z (over 3 years ago)
- Last Synced: 2025-08-20T20:55:35.111Z (10 months ago)
- Language: Ruby
- Homepage:
- Size: 234 KB
- Stars: 5
- Watchers: 18
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Howitzer Example Cucumber
=======================
[](https://app.travis-ci.com/strongqa/howitzer_example_cucumber)
[](https://circleci.com/gh/strongqa/howitzer_example_cucumber)
Howitzer example project based on Cucumber for demo web application https://demoapp.strongqa.com
## Requirements
- Ruby 3.0.2
## Getting Started
*Note!* This project uses Git submodules in order to reuse common code between similar projects:
[howitzer_example_rspec](https://github.com/strongqa/howitzer_example_rspec)
[howitzer_example_turnip](https://github.com/strongqa/howitzer_example_turnip)
Typically it is not required for a regular project based on [Howitzer](https://github.com/strongqa/howitzer)
### How to try the project locally
- Clone project
```
git clone --recursive git@github.com:strongqa/howitzer_example_cucumber.git
```
- Install dependencies
```
bundle install
```
- Get list of available commands
```
rake -T
```
## Run tests in Docker
### Build image
```
docker build -t howitzer_example_cucumber .
```
Use **docker run** command to create and run container.
- In order to run container by default:
```
docker run -d --name cucumber_container howitzer_example_cucumber
```
- Connect to created container using this command:
```
docker exec -it cucumber_container /bin/bash
docker exec -it /bin/bash
```
- Run tests with the next commands using container's terminal:
```
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
- Initialize build, and up the container in detached mode:
```
docker-compose -f docker-compose.yml up -d
```
- Connect to created container using this command:
```
docker compose exec -it howitzer_example_cucumber /bin/bash
```
### Stop container
- Perform the next command to stop running container using docker-compose command:
```
docker-compose -f docker-compose.yml down
```
WARNING: ***after this command container will be deleted and all data lost.***
- If you need to save container use the next command to stop container:
```
docker stop
```
## Contributing
Code quality is controlled by [Rubocop](https://github.com/bbatsov/rubocop)
It is useful to activate rubocop pre-commit git hook for changed files.
```
cp scripts/pre-commit .git/hooks/pre-commit
```