After series of posts about How to kill UI regression testing, maybe you got impression that I am against UI browser automation test scripts. In this post, I will put my thoughts about the value of UI automation tests.
First some context. Here are requirements for excellent UI automation tests:
- Language that enables you to write less code. Something like Ruby.
- selenium web driver implementation in that language
- framework just above selenium webdriver. For example watir-webdriver.
- Page object pattern implementation
- test framework, something like rspec. For writing awesome asserts.
- gherkin implementation. Something like cucumber. No, I have not changed my mind stated here. But we have different context here.
- continuous integration tool. Something like jenkins
- headless browser. Something like xvfb or sauce labs.
What is the value of UI automation test scripts? They represent executable documentation for your product. They help you to answer questions about complicated business scenarios. For example facebook setting who can contact me.
Your testers will need to have a skill of writing DRY tests using those requirements. So when you have new tester on board, by reading those tests script, he can quickly learn application features.
Those tests would be run on jenkins and run should be triggered manually. Tests will provide you information is some automated feature changed. It is not wise to use those results for you regression testing strategy.
Because those checks, or asserts only check what is coded. Nothing else. And UI is for human users, not for test scripts. So human should always do smart regression testing , using its brain, eyes, ears and fingers.by