Guest User

Untitled

a guest
Feb 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1.  
  2.  
  3. Who: Aaron Blohowiak, copyright 2008 (c) FooMojo, Inc. MIT license.
  4.  
  5. Why: The Goal of Play It Once, Sam (henceforth: PIOS) is to bring programming
  6. best practices to projects that haven't followed them.
  7.  
  8. What: In achieving this goal, PIOS is presently a tool that creates Integration
  9. Tests.
  10.  
  11. Where:
  12.  
  13. How: [EDITOR's WARNING: To avoid shamelessly self-indulgent Casablanca
  14. references, skip portions in parentheses.] Start the server with PIOS enabled
  15. and perform a manual regression test ("play it once Sam, for old time's
  16. sake...") Your manual test is recorded. ("You must remember this..") Running
  17. your test suite replays the same request information against the app and checks
  18. the responses to ensure they match ("the fundamental things apply, as time goes
  19. by.")
  20.  
  21. Nitty Gritty: ("Sam, I thought I told you never to play...")
  22.  
  23. #) Create a new PIOS integration test.
  24. #) Confirm configuration in config.yml
  25. #) Prepare development DB
  26. #) Start recording
  27. *) Dumps db - pre
  28. *) runs migrations
  29. *) Installs around filter in AC:B
  30. *) Freezes Time, records request info, records responses
  31. #) Stop recording
  32. *) Dumps db - post
  33. #) Generate tests from recordings
  34. #) Give tests meaningful names
  35. #) Run tests
  36. #) Resume recording
  37. *) Loads db-post
  38. *) runs migrations
  39. *) GOTO #) Start recording
  40.  
  41. Generate a new PIOS test:
  42.  
  43. rake pios:new NAME=signup
  44.  
  45. following this, we should have:
  46. RAILS_ROOT/tests/pios/
  47. RAILS_ROOT/tests/pios/signup/
  48. RAILS_ROOT/tests/pios/signup/config.yml
  49. RAILS_ROOT/tests/pios/signup/db/
  50. RAILS_ROOT/tests/pios/signup/recordings/
Add Comment
Please, Sign In to add comment