Ruby и TestComplete

1,390 views

Published on

  • Be the first to comment

Ruby и TestComplete

  1. 1. 1<br />Integrating TestComplete and Ruby<br />Presented by: MykolaKolisnyk<br />AUTOMATED-TESTING.INFO<br />
  2. 2. What was originally<br />Win UI tests<br />System tests<br />Mac UI tests<br />Ruby<br />AQA TestComplete<br />Cucumber<br />
  3. 3. Win UI tests<br />System tests<br />Mac UI tests<br />Ruby<br />Cucumber<br />How it was supposed to be<br />
  4. 4. Win UI tests<br />System tests<br />Mac UI tests<br />Ruby<br />???<br />Cucumber<br />AQA TestComplete<br />Where is TestComplete?<br />
  5. 5. Main goals<br />Provide common layer for all areas<br />Give the ability to involve non-technical people into automation<br />Provide common solution for distributed testing<br />All improvements should be done smoothly (current solution should always work)<br />06.02.11<br />
  6. 6. Win UI tests<br />System tests<br />Mac UI tests<br />Ruby<br />Cucumber<br />What was decided<br />
  7. 7. Win UI tests<br />System tests<br />Mac UI tests<br />AQA TestComplete<br />Ruby<br />Cucumber<br />What was decided<br />
  8. 8. <ul><li>Get command
  9. 9. Set run status
  10. 10. Send results</li></ul>AQA TestComplete client<br /><ul><li>Store command
  11. 11. Switch status
  12. 12. Transfer data</li></ul>Http bridge<br />Ruby client<br /><ul><li>Send command
  13. 13. Check execution status
  14. 14. Get results</li></ul>Ruby/TestComplete connection overview<br />
  15. 15. AQA TC client<br />Http Bridge<br />Ruby Client<br />Get command<br />Command<br />Send command<br />Set pending status<br />Status<br />Check status<br />Run command<br />Set «done» status<br />Send results<br />Results<br />Get Results<br />How it works: initial state<br />
  16. 16. AQA TC client<br />Http Bridge<br />Ruby Client<br />Get command<br />Command<br />Send command<br />Set pending status<br />Status<br />Check status<br />Run command<br />Set «done» status<br />Send results<br />Results<br />Get Results<br />How it works: initiate command<br />
  17. 17. AQA TC client<br />Http Bridge<br />Ruby Client<br />Get command<br />Command<br />Send command<br />Set pending status<br />Status<br />Check status<br />Run command<br />Set «done» status<br />Send results<br />Results<br />Get Results<br />How it works: process results<br />
  18. 18. TestComplete part<br />06.02.11<br />Reset status<br />Process functions<br />
  19. 19. TestComplete part<br />06.02.11<br />Wait for command<br />Execute code<br />Send results<br />Set “done” status<br />
  20. 20. Ruby part: runner<br />06.02.11<br />Verify “done” status<br />Set “pending” status<br />Send code to execute<br />Verify completion<br />Get results<br />
  21. 21. Ruby part: client code<br />06.02.11<br />Valid TC code<br />Call TC code<br />
  22. 22. Step 2: start TC client<br />AQA TestComplete client<br />Step 1: start bridge<br />Http bridge<br />Ruby client<br />Step 3: start Ruby client<br />How to start it<br />
  23. 23. Results in YAML format.<br />Example:<br />ret_val: <return value><br />errors:<br />- <error message 1><br />- <error message 2><br />AQA TestComplete client<br />Http bridge<br />Executable TestComplete code<br />Ruby client<br />Data exchange<br />
  24. 24. Data exchange<br />Get results<br />Transform into Ruby structure<br />Fail if some errors present<br />
  25. 25. Stable communication<br />Stable communication<br />AQA TestComplete client<br />Http bridge<br />Ruby client<br />Hard cases: stable areas<br />
  26. 26. Case 1: TC request failed<br />Resolution:<br />Resend several times until success<br />AQA TestComplete client<br />Http bridge<br />Ruby client<br />Hard cases<br />
  27. 27. Case 2: TC crashes<br />Resolution: Ruby client waits for some limited time to execute<br />AQA TestComplete client<br />Http bridge<br />Ruby client<br />Hard cases<br />
  28. 28. Case 3: execution is pending when Ruby client starts<br />Resolution: Ruby client sets status into «done» at the begining<br />AQA TestComplete client<br />Http bridge<br />Ruby client<br />Hard cases<br />
  29. 29. Case 4: bridge was stopped<br />Resolution: clients are stopped<br />AQA TestComplete client<br />Http bridge<br />Ruby client<br />Hard cases<br />
  30. 30. AQA TestComplete client<br />AQA TestComplete client<br />Http bridge<br />Http bridge<br />Target Machine 2<br />Target Machine 1<br />Re-initialize client with new target<br />Ruby code<br />Distributed execution<br />
  31. 31. Goals achievement<br />06.02.11<br />Win UI tests<br />System tests<br />Mac UI tests<br />It still works<br />AQA TestComplete<br />Ruby<br />Distributed architecture<br />Common Layer<br />Cucumber<br />Works for non-technical people<br />
  32. 32. Alternative<br />06.02.11<br />Original post at:<br />http://samsagiletesting.blogspot.com/2010/03/test-complete-and-ruby.html<br />
  33. 33. Why alternative doesn’t work?<br />Too tight connection to TestComplete<br />Dependency on system-dependend values (UID)<br />Distributed solution works for Windows only<br />Complex Ruby structures<br />06.02.11<br />
  34. 34. Questions?<br />
  35. 35. AUTOMATED-TESTING.INFO<br />06.02.11<br />

×