120 likes | 348 Views
Automated UI Testing. Thien -An Mac QA consultant / Ghostbugster tmac@thoughtworks.com. “Test automation is the use of special software (separate from the software being tested) to control the execution of tests and the comparison of actual outcomes with predicted outcomes .”
E N D
Automated UI Testing Thien-An Mac QA consultant / Ghostbugster tmac@thoughtworks.com
“Test automation is the use of special software (separate from the software being tested) to control the execution of tests and the comparison of actual outcomes with predicted outcomes.” http://en.wikipedia.org/wiki/Test_automation Xunit QTP iMacros Selenium WebDriver Jasmine What is automated testing?
Source: http://martinfowler.com/bliki/TestPyramid.html Test pyramid
Saves us a lot of time Repeatable Less error prone Reliable Why should we do it?
GUI Testing Allow users to interactively record user actions and replay them back any number of times Pros: Easy to pick up Create test scenarios quickly Cons: Not maintainable Have to wait for the code to be completed Code-driven Testing Write code to script the actions Pros: Maintainable Organized code Cons: Can become very difficult to maintain Knowledge of basic programming is necessary How does UI testing work?
Selenium WebDriver accepts commands (via a Client API) and sends them to a browser. This is implemented through a browser-specific browser driver, which sends commands to a browser, and retrieves results. A quick demo… Source: http://docs.seleniumhq.org/docs/03_webdriver.jsp
- DO automate as much as you can and prioritize the common “happy paths” - DOclean up your test data - DON’T treat automated tests as 3rd world code - DON’T have non-deterministic tests (aka “flaky” tests) - DON’T make your tests depend on each other The Dos and Don’ts