Simple Capture & Replay (C&R) Test
  1. Show source folder in file explorer before C&R test execution (note: SimpleCRTest.cpp file)
  2. Change to IDE and start test execution
  3. The CAPTURE macro (see centre of code window) pops up the capture dialog
  4. Capturing is started by clicking on "Start" in the capture dialog (Note: it can be stopped and restarted, and comments can be easily added to the recording)
  5. In the text field on the top the word "hallo" is entered (Note: each key stroke is generating an event -> consecutive events are collected, see below)
  6. The tree item selection is changed
  7. The combo box item is changed
  8. Now the capturing is finished by clicking on "Exit" in the capture dialog
  9. Since C&R is bootstrapping the GUI test case, finishing the capturing also will show the CppUnit test execution result (Note: this also means that one can place the CAPTURE macro anywhere within an existing test case and re-capture modular little pieces later -> improves maintainability)
  10. Change to file explorer: the bootstrapping has written the test case directly into backup file (SimpleCRTest.cpp.cr1) by replacing the CAPTURE macro with the recorded events
  11. Rename test case files to make the bootstrapped test case the new test case
  12. Change back to IDE and confirm the reloading of the changed test case file (SimpleCRTest.cpp)
  13. Scroll down bootstrapped test case to show typical test case generation output
  14. Try to rebuild test suite -> errors -> fix pragmatic code generation of capture phase: removing duplicate container lookups and variable declarations, adding include directories (Note: of course, adding assertions would be also a vital part of this phase)
  15. Now the test suite rebuild is successful
  16. Start of bootstrapped test suite execution (replay captured test case like a normal hand written test case) -> all intially recorded events are replayed
  17. Test suite completes successfully, awesome :-)