Fork me on GitHub
Collaborate On Specifications

Acceptance Testing.
For Everyone.

Gitnesse makes it easy to work together on specifications.

About

Gitnesse enables a project to store Cucumber feature stories in a git-based wiki, test them against the code, and then update the wiki with the latest test results.

Because the features are in a wiki, non-programmers can see them more easily, and edit them using the wiki.

Gitnesse provides an awesome bi-directional testing flow between developers and non-developers on a team.

Conceptually influenced by Fitnesse. Thanks, Uncle Bob!.

Screenshots Click to see larger

Feature in GitHub Wiki, with results annotated.
Pulling features from GitHub to local project.

Installation

You can add Gitnesse to your project's Gemfile:

gem 'gitnesse'

Or install it manually (recommended):

gem install gitnesse

Now add a gitnesse.rb file to your project. This will be used to configure Gitnesse's behaviour.

An example config file:

Gitnesse::Config.config do |c|
  c.repository_url  = "https://github.com/hybridgroup/gitnesse-demo.wiki.git"
  c.annotate_results = true
  c.identifier = "Development Laptop"
end

Tasks

Gitnesse comes with a few commands:

gitnesse pull
gitnesse push
gitnesse run
gitnesse info
gitnesse help

All of these commands are also available as Rake tasks, if you've added Gitnesse to your Gemfile:

rake gitnesse:pull
rake gitnesse:push
rake gitnesse:run
rake gitnesse:info

If you're using Gitnesse with a Rails app, these rake tasks will be hooked up automatically. If you're not using Rails, but still want the rake tasks, add this line to your Rakefile:

require 'gitnesse/tasks'

pull

gitnesse pull pulls features from the remote git wiki, and updates/replaces the relevant local features. It also creates new local features if they don't already exist.

push

gitnesse push pushes local features to the remote git wiki, updating/replacing/creating as necessary. It also adds index pages, so for example if your features folder looked like this:

features
  ├── purchasing
  │   ├── purchasing.feature
  └── subscribing
      ├── subscriping_logged_in.feature
      ├── subscribing_logged_out.feature
      └── subscribing_fail.feature

Gitnesse would create these wiki pages:

features.md
features > purchasing.md
features > purchasing > purchasing.feature.md
features > subscribing.md
features > subscribing > subscriping_logged_in.feature.md
features > subscribing > subscribing_logged_out.feature.md
features > subscribing > subscribing_fail.feature.md

run

gitnesse run pulls remote wiki features to local, similarly to gitnesse pull, but then it runs Cucumber on the updated feature. If the annotate_results settings is enabled, it will push annotated Cucumber results for each feature scenario to the remote wiki.

info

gitnesse info prints the current Gitnesse configuration info. Useful for debugging purposes and sanity checking.

cleanup

gitnesse cleanup cleans up the folders Gitnesse creates in ~/.gitnesse to store local copies of remote wikis. It prompts for confirmation before deleting anything.