Python Automation Testing (2)-Fundamentals of automation technology

Source: Internet
Author: User

Python Automation testing (2) Fundamentals of Automation Technology 1 overview

In the previous article mentioned that: the primary ability to do automation is to look at the essence through the phenomenon , the implementation of the actual it work is to look at the data through the interface .

Mastering the above is not an easy thing to do, must have a solid foundation of computer theory, in order to see the deep essence of things.

2 Application software Logic structure

The database application system is probably the most typical network application, and the software architecture for it is as follows:

It is generally logically divided into 4 layers:

    1. User interface Layer UI

      Interactive HMI for end users

    2. Business Logic Layer BLL

      The objects abstracted from the database are spliced into specific business logic objects, and the process organization is carried out.

    3. Data Access Layer DAL

      An ORM on the DB layer that allows the upper-level application to manipulate the database in an object way

    4. Data Persistence layer DB

      Store data, persist data, and share data with different clients

In a traditional C/S architecture, applications (for example, client applications under Windows) are typically a central database server ( db ) and then correspond to n clients (Dal-bll-ui ).

For Junior Testers , the software may be understood only in the UI layer, so in the test can do is: day after year, with the mouse point point.

3 Internet Software Architecture

The basic architecture of the application software mentioned in the previous section, although it was presented in the "C/S" era, has continued to the present. Until today the most common "abc/s" mode:

    • App/server
    • Browser/server
    • Client/server

In essence, the UI layer is placed on the client, and the UI is placed below the server side.

Clients have different forms under different platforms, forming the now popular so-called "abc/s" mode of architecture, which has become the standard of the current Internet products. The specific architecture is as follows:

The Http/https Communication protocol is used between the server side and the client, and the data exchange format is Xml/json format.

Based on the above pattern, some changes have taken place in the methodology of software testing:

    • With the most cost-effective "interface test based on communication coding format", it is 20% can solve 80% of the work
    • Interface testing is fully automated and eliminates the need to force and develop projects to use the same language, and to unify the use of more efficient scripting languages
    • interface Naturally has the demand of stability, so there is no repetition of automatic test project
    • Interface testers have become the referee between many platforms
    • Interface specification from design documentation, can implement design generation testing, test-driven development of the canonical mode

With the ability to abstract into data, many of the things you see can be converted in a reasonable equivalence:

    1. The Web page background is red

      Equivalent to: The color attribute of the background of the background element is #FF0000

    2. The word "Submit" is displayed on the button.

      Equivalent to: The value of the button element is Submit

    3. User to perform a recharge activity charged 20 dollars, his account on the more than 20 yuan

      Equivalent to: Call the top-up interface with 20 parameters, and then two times before and after the Call Account query interface, the difference is just the value of the recharge parameter

It's easy to do comparisons at the data level, because these are the areas where computers are adept at processing, and automation is done naturally.

4 the underlying principle

Here's a way to abstract data from the concrete interface you see in software projects to the bottom. In fact, there are some lower level, more absolutely, the data on the software can also be a little bit more at the bottom of the physical world with the association (it is not good to use "abstract" or "figurative" to describe).

This part of the content, and the application of software testing topic a bit far away, purely as a science bar.

Looking at a computer system from a broader perspective, it gives the experience of essentially doing the following:

All the intuitive experiences of people come from the experience of analog (physical), and the input of human interaction is also derived from the analog amount.

People hit the keyboard to enter text into the computer system, the keyboard will be a different key generated by the pulse current into the computer system, the computer system through the chip and drive, these current signals into a digital signal, and then delivery of digital chip processing. So the person completes the input of the information .

Computer system to the calculation of these data, storage, transmission, and so on, finally on the LCD display by lighting different positions of the lattice, to form an optical analog output, transmitted to the eyes of people, people have completed the acquisition of information .

The above example can be simplified as follows: The mechanical physical quantity produces the electrical physical quantity to carry on the input, after the computer digital system processing, the optical physical quantity carries on the output.

For computer systems, inputs and outputs are diverse:

    • Input device

      A variety of sensors can be used as the main input, such as the smart hardware now booming, as well as the hot-fried Internet of things .

    • Output Unit

      In addition to the optical LCD display, there are acoustic loudspeakers, as well as rolling wheel mechanics, as well as humanoid walking manipulator arm learning equipment.

These things are already a very popular element in the Internet industry now.

Because the electronic technology and the communication field often detects is the physical quantity, the naked eye is difficult to quantify, so the test threshold will be very high, but the various testing instruments have developed quite well, the degree of automation is quite high. In the IT industry, the upper layer of application software, people are too dependent on manual to operate, the naked eye to observe, instead of ignoring the automation, resulting in the testing industry has been personnel quality is not high, technical strength is too weak, this is obviously not desirable, at least not in line with the current software engineering industry needs of the times.

5 Summary

In this paper, the application software is logically layered, to explain the software automation testing and basic principles, in the second half of the article on the current popular intelligent hardware involved in the electronic technology automation testing is also carried out a simple discussion, hoping to give the people who have never automated testing also have a little inspiration.

The following series of articles will be grounded in these theories from the technical level.

Summing up, for those who want to enter this line and want to have in-depth development, there are several conclusions and recommendations:

    • The essence of software is not the interface but the data
    • To understand the nature of software, you must have a good computer foundation
    • People in the Internet industry can familiarize themselves with Linux and build this software-as-a- data worldview as early as possible
    • interface to do automated testing is the most cost-effective (from the viewpoint of engineers from Google)
    • In order to do the automation test, must have the software development ability and the system design ability

Write here, finally let me "Amway" Linux , because compared to MacOS and Windows system, Linux in the interface is not very good, but there is a strong CLI interaction, support powerful scripting, This is helpful for automating your implementation.

(not finished, to be continued ...) )

The follow-up will begin to write Python's automation tools and programming applications.

Author: Harmo ha mo
Author Introduction: Https://zhengwh.github.io
Technical Blog: Http://www.cnblogs.com/beer
Email: [Email protected]
Qq: 1295351490
Time: 2015-11
Copyright Notice: Welcome to learn to exchange for the purpose of the reader to reprint, but please "annotated source"
Support this article: If you are inspired by the article, you can click the button in the lower right corner of the blog to "recommend"

Python Automation Testing (2)-Fundamentals of automation technology

Related Article

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.