Created
December 24, 2008 05:03
-
-
Save aaronblohowiak/39588 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Who: Aaron Blohowiak, copyright 2008 (c) FooMojo, Inc. MIT license. | |
Why: The Goal of Play It Once, Sam (henceforth: PIOS) is to bring programming | |
best practices to projects that haven't followed them. | |
What: In achieving this goal, PIOS is presently a tool that creates Integration | |
Tests. | |
Where: | |
How: [EDITOR's WARNING: To avoid shamelessly self-indulgent Casablanca | |
references, skip portions in parentheses.] Start the server with PIOS enabled | |
and perform a manual regression test ("play it once Sam, for old time's | |
sake...") Your manual test is recorded. ("You must remember this..") Running | |
your test suite replays the same request information against the app and checks | |
the responses to ensure they match ("the fundamental things apply, as time goes | |
by.") | |
Nitty Gritty: ("Sam, I thought I told you never to play...") | |
#) Create a new PIOS integration test. | |
#) Confirm configuration in config.yml | |
#) Prepare development DB | |
#) Start recording | |
*) Dumps db - pre | |
*) runs migrations | |
*) Installs around filter in AC:B | |
*) Freezes Time, records request info, records responses | |
#) Stop recording | |
*) Dumps db - post | |
#) Generate tests from recordings | |
#) Give tests meaningful names | |
#) Run tests | |
#) Resume recording | |
*) Loads db-post | |
*) runs migrations | |
*) GOTO #) Start recording | |
Generate a new PIOS test: | |
rake pios:new NAME=signup | |
following this, we should have: | |
RAILS_ROOT/tests/pios/ | |
RAILS_ROOT/tests/pios/signup/ | |
RAILS_ROOT/tests/pios/signup/config.yml | |
RAILS_ROOT/tests/pios/signup/db/ | |
RAILS_ROOT/tests/pios/signup/recordings/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment