Joke Collection Website - Joke collection - Preface of realizing Web automation test at zero cost

Preface of realizing Web automation test at zero cost

I have a dream that one day my desk will no longer be messy, and there is only a big red button on the neat countertop. The most important job every day is to press the red button hard after work, then take a leisurely cup of West Lake Longjing and pick up the latest reference news to see if the Federal Reserve is printing damn "waste paper" again. While I enjoy my life, an accurate and rigorous test report will be automatically sent to the development department and copied to the leader's mailbox. The test report contains the defect list of the latest software version and indicates the acceptable defect repair time. Everything else is for "arrogant" software developers. What a beautiful day.

But dreams are always dreams. Just like 42 years after the assassination of Martin Luther King, the United States is still not a country where everyone is equal and there is no racial discrimination. If my dream comes true one day, what I need to face may not be a leisurely life, but a notice of dismissal. Because on that day, software testing will become a simple thing that everyone can complete, and the company can ask anyone to take charge of my work without paying a high salary. This is really a joke that is not funny at all. The ultimate goal of testers is to lose their jobs, but fortunately, this day is still far away.

Now, let's go back to reality from the dream world. The reality is cruel. There are thousands of QTP automated test cases in the test department where the author works, but they are only automated test cases. The dream is still far from the author. These cases always fail. There are many reasons for the failure, including the failure caused by the unstable test environment and the inexplicable error of QTP tools. Test engineers put a lot of energy into maintaining these automated test cases, but the effect is not good. The efficiency of automated testing is still low. The efficiency of automatic testing of many software systems remains around 60% all the year round. What shall we do? How shall we explain to the leaders?

I think there are two ways to improve the effectiveness of automated testing:

First, reduce the level of automated test objects, that is, use the underlying interface to automate the test. The upper interface of a software system may change frequently, but the interface between the bottom functional modules and the interface between systems will not change much unless there is software reconfiguration. This can largely avoid the impact of frequent changes in the user interface on automated testing, thus reducing the workload of maintenance.

Second, adopt more reliable automatic testing tools based on GUI. At present, QTP is undoubtedly the most widely used automated testing tool, but in actual use, the author found that its recording/playback function is very unstable, and there are often abnormal situations that the test object can't identify, and even inexplicable failures. What should we do to give up automated testing based on user interface? Obviously not, because the automatic testing of the underlying interface has its own limitations. One is that you can't test the user interface through it, and the other is that it is difficult for you to test the complete business process of the software system with it. The only feasible way is to find a more reliable and effective tool to replace it. Here I recommend Selenium and WebDriver, two open source automated testing tools. From the current practice, they are far more stable than QTP, the execution speed of test cases is faster, and the use cost will be lower.

Writing background

In recent years, automated testing has been deeply rooted in people's hearts. If someone interviews for the position of software testing engineer and knows nothing about automated testing, it is almost impossible for him to get the position. Therefore, understanding the principle of automated testing and mastering several mainstream automated testing software have become the most basic requirements for test engineers. For college graduates who are interested in the software testing industry, understanding automated testing is a good stepping stone. Two interns came to my testing department this year, and I helped them complete some automated testing tasks. After the internship, they didn't sign a contract with the company. Later, after communicating with them, I learned that other companies are willing to pay double the salary to hire them. What they value is their working experience in automated testing. Therefore, it is not difficult for readers to see that the industry attaches importance to automated testing.

"Cloud computing" is definitely the hottest IT word in 20 10, and even stocks with a little concept of "cloud" will soar. "Cloud" sounds illusory, but it is actually thin client plus grid computing. In the future, the client will no longer have a lot of computing tasks, and both computing and storage will be placed on the cloud. In my opinion, the future client should be a browser, and all the user's operations are realized through the browser. Chrome OS, the operating system just released by Google, is designed based on this concept. Software systems with B/S and C/S architectures should gradually evolve to browser/cloud mode. It seems that in the era of "cloud computing", Web automated testing is still very important and will become more and more important. Therefore, the author came up with the idea of writing a book about Web automated testing.