GitXplorerGitXplorer
s

TDD-Reminder

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
206d6b05155fbf45fcd91996ebc8dab6d385a6a1

Release of v0.0.2

ssimon-johansson committed 10 years ago
Unverified
3babff87b19082811a74a704b26e2e4c014cf1df

Changed text for red phase

ssimon-johansson committed 10 years ago
Unverified
c100b7f307cb3d544a73f56ede86abcb0a917169

Add feedback section to README

ssimon-johansson committed 10 years ago
Unverified
2d70bc09a3c49c40fff0c8a685b47ec8a4728eaa

Additions to the README

ssimon-johansson committed 10 years ago
Unverified
d42da25c4dd0c725f1d0cb75a1705d06986bf976

Replace promo images used in README

ssimon-johansson committed 10 years ago
Unverified
7cf1370de520d9048f9022b0249cfd296b21091b

Release of v0.0.1

ssimon-johansson committed 10 years ago

README

The README file for this repository.

TDD Reminder

TDD Reminder icon

OS X status bar application to help you stick to the test-driven development cycle red-green-refactor

Built with <3 and NW.js.

About

TDD Reminder shows up as a coloured dot in your status bar, reminding you of what phase in the red-green-refactor cycle you are currently in.

Tray icon

Unsure of what you should be doing? Just have a peak at the status bar.

Dot What you should be doing
Create a unit tests that fails
Write production code that makes your test pass
Clean up the mess you just made

Workflow

  1. Preform the activities of the current phase (i.e write a test that fails, make that test pass or clean up your code). When you are done…
  2. Click on the dot, this will open the TDD Reminder window.
  3. Click somewhere inside the coloured box, this will move you to the next phase and change the color of the dot. Repeat step one.


Demo of phase transitions

Why?

Sticking to the laws of TDD isn’t always trivial for a number of different reasons. With lacking motivation and discipline it´s easy to start skipping or prolonging phases, maybe in the hopes of progressing faster. Without a reminder from time to time one might take the laws for granted and become too lenient, blurring the lines between the different phases.

TDD Reminder might help you in one of the following ways:

  • Visualising the transitions between the phases makes the bouderies between them sharp and clear.
  • It becomes really hard to stray off the beaten track when you are constantly reminded of what you should be doing.
  • By clicking on the dot and taking the decision to move to the next phase, you are making a mini promise to yourself that you (hopefully) will be reluctant to break.

Installing

  1. Latest version (v0.0.1) are available for download here.
  2. Download the osx32 or osx64 version depending on your system.
  3. Unzip and place the .app file it in your Applications folder.

When attempting to start TDD Reminder for the first time a warning saying “TDD Reminder can’t be opened because it is from an unidentified developer" will appear. To override this you will need to go to System Preferences... > Security and Privacy and then click "Open Anyway". After that you should be good to go!

REST interface

TDD Reminder spins up a server in the background on http://localhost:22789 which accepts POST requests. By sending a JSON object with the key of state and the value of either red, green or refactor you are able to change the current phase.

Using curl

# This would change the app state to "refactor", making the dot blue
$ curl -H "Content-Type: application/json" -X POST -d '{"state":"refactor"}' http://localhost:22789/

Using node.js with the request module

// This would change the app state to "green"
var request = require('request');
request.post('http://localhost:22789', {form: { state:'green' }});

You could for example set up your test runner to change the phase to "green" if you have a failing test (which would mean that you should write production code to make that test pass). Or change the phase to "refactor" if all your tests are passing.

Changing the server port

Specify a custom port by setting the environment variable TDD_REMINDER_PORT. Putting the following line in your .bashrc, .zshrc or equivalent shell config file will start the server on port 3456:

export TDD_REMINDER_PORT="3456"

Feedback

Please send me a mail or raise an issue here on GitHub if you have any feedback, suggestions or comments. I would love to hear about your experience with the app. Did it help you? If so, why or why not? Pull requests are also very much appreciated.

License

MIT