Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasch/testengineer
Gem to help incorporating Foreman into integration tests
https://github.com/dasch/testengineer
Last synced: 24 days ago
JSON representation
Gem to help incorporating Foreman into integration tests
- Host: GitHub
- URL: https://github.com/dasch/testengineer
- Owner: dasch
- License: mit
- Created: 2012-09-13T11:16:34.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-09-24T08:29:48.000Z (about 12 years ago)
- Last Synced: 2023-04-11T15:32:56.681Z (over 1 year ago)
- Language: Ruby
- Homepage: http://hackers.mylookout.com
- Size: 99.6 KB
- Stars: 0
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TestEngineer
[![Build Status](https://buildhive.cloudbees.com/job/lookout/job/testengineer/badge/icon)](https://buildhive.cloudbees.com/job/lookout/job/testengineer/)
TestEngineer is a simple gem which adds some code around
[foreman](https://github.com/ddollar/foreman) for integration testing.Currently it allows you to bring up an entire stack, based on what is defined
in the Foreman `Procfile`, for the duration of a test case.TestEngineer also allows you to arbitrarily shut off processes by name during
the runtime of a test case.## With Cucumber
There is an `Around` hook that you can include with
`require 'testengineer/cucumber'`. This will wrap any Scenario tagged with the
`@testengineer` tag.Imagine a `Procfile` such as:
web: ruby -r thin app.rb
db: ./script/run-mongodb
cache: memcachedA sample Cucumber feature might look like:
@testengineer
Feature: Log in to My Site
In order to facilitate meaningful relationships between users
As a web visitor
I should be able to log into my account on My SiteScenario: Log in
Given an account named "octocat"
When I log in to My Site
Then I should be delighted with my fabulous profileScenario: Log in when the site is degraded
Given an account named "octocat"
And the database is offline
When I log in to My Site
Then I should see a nice friendly fail whale.For each scenario, TestEngineer will bring the entire stack (web, db, cache) up
and down. In the second scenario, I would have defined the step for `And the
database is offline` as:Given /^the database is offline$/ do
TestEngineer.stop_process('db')
end