Automated testing: Why frameworks are needed

Source: Internet
Author: User

We went out to pre-sales with our boss two days ago, mainly to sell our automated testing service. The tool used hp uft. People who have done automation should know that UFT is already one of the best tools in the field of automation testing. The customer is a person with a technical background, so it is not so cool. We have prepared a bunch of slides on the advantages of automated testing. He is good enough to ask directly what are the defects of your tools. Then I started to talk to him about the shortcomings in balabara, but what I couldn't solve was that every time I had explained a problem, he had more problems. In the end, I was not able to fully explain what I had done. I had to blame myself for not being fluent in English.

One of the questions is that I have been thinking about it for a long time since I came back. At that time, he pointed to my POC (Prove of Concept) script and asked, "since record & playback can be used as a script, why do we need an automated testing framework ?" In short, why should I spend more money on your framework? What was my first response? Are you kidding me? How does one implement automated testing without a framework? Of course, my answer is very official. I explained it to him from the perspective of maintenance, reusability, and ease of use. He does not seem very satisfied.

I thought about it. Why do we need an automated testing framework? The more I think about it, the more I feel wronged, because I want to ask developers, why do you use the framework when you are working on a project? The essence of automation is not to write a program to test the program. Since development requires a framework, why not do automated testing.

Complaints are all complaints. I carefully checked some information.

What is a framework?

The Framework is a reusable design of the entire or part of the system, represented as a method for interacting between a group of abstract components and component instances. Another definition is that, A framework is an application skeleton that can be customized by application developers. The former is defined in terms of application while the latter is defined in terms of purpose. It can be said that a framework is a reusable design component, which defines the application architecture and clarifies the dependency, responsibility allocation and control processes between the entire design and collaboration components, it is represented as a group of abstract classes and methods for collaboration between their instances. It provides Context relationships for component reuse. Therefore, the large-scale reuse of component libraries also requires a framework. In fact, the framework has not yet been defined in a uniform way. I prefer the definition given by Ralph Johnson:

A framework is a reusable design, which is expressed by a group of abstract classes and the cooperative relationship between instances [Johnson 98 ]. This definition defines the framework from the perspective of the framework connotation. Of course, we can also define the framework from the perspective of the framework purpose: a framework is in a given problem field, part of the design and implementation of an application [Bosch 97 ].

Why use the framework?

It is a matter of course. As software systems have become very complex today, especially on-server software, there are too many questions about the knowledge, content, and problems involved. Using someone else's mature framework in some ways is equivalent to letting someone else do some basic work for you. You only need to concentrate on completing the business logic design of the system. In addition, the framework is generally mature and robust. It can handle many details of the system, such as transaction processing, security, and data flow control. There are also frameworks that are generally used by many people, so the structure is very good, so the scalability is also good, and it is constantly upgraded, you can directly enjoy the benefits of other people upgrading code.

Why should we build an automated testing framework?

Previously, I thought that the most important thing in automated testing is to Find an Object ). Now I understand the truth that automated tests without frameworks cannot find objects and will not be happy even if they are found. In reality, it is difficult for people without cars or houses to find the object.

The development of automated testing is usually determined by the needs of automated testing. This requirement mainly includes:

  1. Automated testing is easier to implement. It is convenient to write test scripts. A good automated testing framework allows people who do not know the technology to write automated testing scripts.
  2. Solves problems existing in the automated test script, such as exception handling and scenario recovery.
  3. Testing is easy to maintain. Automated testing projects are basically not well managed and maintained, and must be a big pitfall. I can be very responsible to say that automated testing does not take effect for a year or a half, and you cannot see the output. Therefore, management and maintenance become the most important thing. A good framework can reduce the human and material resources you have invested in management and maintenance.
  4. Reusability. One of the meanings of the framework is that it can be reused. Therefore, you can implement some common functions in the framework to simplify the script development process.
  5. Beautiful and easy-to-read test report. Taking UFT for example, the test report it generates is only based on the test script, and there is no such report based on the test set, so if you want it, it can be implemented in the test framework.

There are still many test requirements that I cannot list one by one. Most of the requirements can be customized in the test framework. Now you can answer the above question. record & playback will not be happy. You need an automated testing framework.

Please carefully consider whether automated testing is required (high cost investment and high risk)

Automated testing is a very proud task. First, the project has a long cycle, but the demand does not change frequently. Secondly, most objects in the system must be identifiable and there are no large number of third-party plug-ins. And you need to be clear that you cannot expect automated testing to help you discover new bugs. Automated testing itself is not imaginative (compared with manual testing ). Its advantage lies in repeated iterations. Its value is long-term regression testing to ensure stable version updates for tested products.

The starting point of automated testing is generally considered to have the basic conditions for introducing automated testing after a complete system test.

At present, all of my successful automated testing cases have good management and excellent testing frameworks. One of them is missing, and automated testing will inevitably become a big pitfall.

Finally, the charge is very expensive ~

 

 

Reference: Baidu Encyclopedia framework http://baike.baidu.com/view/66971.htm? Fr = aladdin

Automated testing: Why frameworks are needed

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.