One of my friend asked a question about Automation recently :"is UI test automation actually providing anything useful?"
I Want to share some of thoughts and bias from my own experience and perspective:
The UI automation is a kind of faith. Once you believe it, you need to advocate a lot at first(need dedicate resource and patient from management team), then you get your pay back after a period of time gradually.We should not exaggerate its effect/scope(So do expectation management to the managers are really important and critical). But it really helps in following situations i can think of:1. Prevent the UI regression bugs (Yes, Prevent Regression not Find bugs, due to you need to write workable automation code based on the workable scenario, so once the automation test failed, then you have got a regression bug)2. Reduce the execution time, so as the human resources.(You can run test anywhere, anytime without anyone, and then collect test result and analyze it afterwards) Also it can be scaled easily if you have tons of tests to be run. So the execution time is critical to the projects.3. It is reliable and consistence(Not like Human, Computer always tell the truth :) )4. QA can help with that.It is black box testing, so no need to know the detail implementation of "complex" technique stuff. (seems most of QA person would like to learn and write UI automation tests from my observation)5.Easy to track the history data for Automation test.Automation test result can be kept easily, in which history data can reveal something about quality and people, who always break the build, who always write the bad code and who always write the bad test code, etc.6. Help to do the application health check for QA. Health check is time consuming and always repeatable but not avoidable in some situation, so it is really helpful to do automation in this situation.7.... many more can get from the web i am sure,so i will not mention that to waste of your time, lolFor Practical Way of doing Web UI Automation test, I have done some research about that in my previous days in 2010 although i am not an automation guy... So hope my thoughts can give you some clues to this tough question :)
It is deserved to take a look at the WebDriver project which has been merged to Selenium 2.0 project: http://code.google.com/p/selenium/
In this project, apart from the multiple drivers implementation and clean APIs, the most Important and Essential idea of how to do the Web Automation is introducing the Page Objects Pattern:http://code.google.com/p/selenium/wiki/ PageObjects, which implement the Automation test as a OOD/OOP way. It is much easier to maintain the code and tests than traditional way (which is a record/playback, and step by step describe way to write the automation code).
Anyway, The manual test can be never replaced by Automation test, however, Web UI Automation is also great complement to improve your quality and deserve to put great effort to invest the future. Everything is from the initial purpose, so if Web Automation's strong points can be matched with the project real needs, so just do it with patient and no doubt. If they just want to produce instant results and cut down the bug number on production badly(as i said, Auto test is just preventing bugs not help to find new bugs), then it might loose them confidence i am afraid...
No comments:
Post a Comment