Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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/
Add Comment
Please, Sign In to add comment