https://github.com/rhcarvalho/redgreen
Tool for showing TDD red/green state in a Coding Dojo
https://github.com/rhcarvalho/redgreen
coding-dojo go golang tdd testing testing-tools
Last synced: 9 months ago
JSON representation
Tool for showing TDD red/green state in a Coding Dojo
- Host: GitHub
- URL: https://github.com/rhcarvalho/redgreen
- Owner: rhcarvalho
- Created: 2016-02-13T21:02:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-04T10:05:25.000Z (over 9 years ago)
- Last Synced: 2025-09-17T10:58:53.084Z (9 months ago)
- Topics: coding-dojo, go, golang, tdd, testing, testing-tools
- Language: Go
- Size: 43.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# redgreen
This is a simple tool to execute tests and show a red or green background in a
terminal. It is meant to be used in TDD sessions in a Coding Dojo.

## Installation
You will need to [install](https://golang.org/doc/install) the
[Go](https://golang.org/) tools to compile `redgreen` from source.
Next, use the `go` tool to download, compile and install `redgreen`:
```console
$ go get github.com/rhcarvalho/redgreen
```
## Usage
The main purpose of `redgreen` is to show a red background color when tests fail
and green when they pass.
By default, starting `redgreen` will run `go test` in the current directory and
will rerun the test command every time a file changes, updating the background
color accordingly.
You can specify a different test command by passing positional arguments:
```console
$ redgreen go test
$ redgreen nosetests
$ redgreen rake test
```
It is recommend to run `redgreen` in a small terminal window configured as
*Always on Top*. For example, on GNOME Terminal, right-click anywhere in the
middle of the terminal screen and uncheck the box *Show Menubar*, then click on
the window title bar and choose *Always on Top*. Resize the window to a small
size and drag it to a corner where it doesn't bother the view to your code
editor.
If you are a `tmux` user you can split your terminal and see code and test
status in a single window, like the screenshot above:
```console
$ tmux new-session \; set status off \; split-window -hp 20 redgreen \; last-pane
```
You can use any other way to split your terminal window or organize your windows
to add `redgreen` to your testing flow.
To stop `redgreen` and **exit**, press the `Esc` key.