UI Automation, you deserve to have

Source: Internet
Author: User

Last year's Spring Festival evening party, for the "dedication", the whole family have been hard to "Xiu a Xiu", even the program are ignored to see. At that time, I thought, if you can automate that much better, keep clicking on the screen, the screen does not hurt the hands still hurt, not to mention the distraction, for fear of missing the "dedication." Play "Xiu-A-Xiu", is to check whether to get "dedication" by clicking the button repeatedly, and the UI Automation in the work, probably also and "Xiu a Xiu" almost, are through constant input, verify the output of the system is correct. However, do UI Automation, the effect is not good, the revenue must not forget, execution speed is slow. For example, open a browser, you may have to wait 3-5 seconds, if the browser to access the URL, return to the content of the Web page, it will take a longer time. If you encounter problems, you should also rule out all kinds of interference to locate. If you do interface or unit testing, not only the location of the problem range is small, the response is basically a millisecond level, even if encountered slow, almost 1 seconds can also return results. In this contrast, UI Automation is like a thankless task, so to do UI automation, presumably because of its unique perspective: from the user experience to verify the correctness of the system.
To do UI Automation, in the web direction, if there is a good framework, it is much more convenient. If the programming foundation is good, you can write your own framework or modify the existing framework, encapsulate common business logic and code, and improve testing efficiency. If you do not write the framework, you can also use open source tools, such as the robot framework, it supports both keyword-driven, data-driven, and interface testing, on the official website to do a little learning, you can initially use. If neither the framework nor the tools, then you can also look at Wu Lao "Selenium webdriver Practical Treasure", there are many small instances, such as the operation of the dropdown box, input box and so on. With these small instances, you can copy them to a document and form a code base with a directory. This way, even if you don't encapsulate the code, you can find it when you need it, and then modify the usual parameters to implement a simple automated test.

The selection of UI Automation use cases are also fastidious, generally choose more stable, important functions as a point of entry, if easy to write better. But when it comes to project revisions, the UI is often the first! The changes may be particularly large, and sometimes it is better to write them back than to maintain the automation use cases. Faced with this drastic change, the advantages of the code base is obvious, it is flexible form, can be assembled as needed at any time, greatly speeding up the writing speed. And with the accumulation of small code blocks, the experience of combining code blocks is growing, and when trying to encapsulate functions to further improve the reuse of code, some small framework design ideas will also appear. This gradual, in the practice of thinking summary, and constantly optimize learning, draw some advanced realization of ideas, slowly, UI Automation will do more and more good.
A friend said: "The manual test is too late, which have time to do automation?" That being said, it is worthwhile to take the time to do some local automation and improve the test efficiency. For example, to prepare test data, you need to do a lot of repetitive operations. It may take half a day to make hundreds of data by hand. and using automation to achieve, at the end of the code at the moment, you have been liberated! The data is pouring out and we can do it with just a few minutes or even less time! So learning UI Automation always comes in handy. If not now, you can learn slowly, do not because now do not good, halfway. At work, we can encourage each other, learn and discuss together, and even drive the entire Test team together to improve and progress together. Hope that we can use automation, for themselves to win more benefits!

--- the Glorious Road features April 9 morning Share

Flyleaves
Source: http://www.cnblogs.com/Flyleaves/
Reference Source: http://m.ximalaya.com/zhubo/44966139
This article copyright belongs to the author, the Public Glory Road and the blog Garden altogether, welcome reprint, but without the author consent must retain this paragraph statement, and in the article page obvious position gives the original text connection, otherwise reserves the right to pursue legal responsibility.

UI Automation, you deserve to have

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.