Table of Contents
Basic technical principles of automation
1 Overview
ApplicationSoftware Logical Structure" >2 ApplicationSoftware Logical Structure
3 Internet Software Architecture
This article logically layers the application software to explain the software automation testing and basic principles. In the second half of the article Part of the automated testing of electronic technologies involved in the currently popular
Home Backend Development Python Tutorial Basic technical principles of python automation

Basic technical principles of python automation

Mar 12, 2017 pm 04:53 PM
python


pythonAutomated testing (2)

Basic technical principles of automation

1 Overview

Before It was mentioned in the article: The first ability to do automation is to see the essence through the phenomenon, and when implemented in actual IT work, it is to see the data through the interface.

It is not easy to master the above skills. You must have a solid foundation of computer theory in order to see the deep and essential things.


2 ApplicationSoftware Logical Structure

Database Application System Probably the most typical network application , its software architecture is as follows:

is generally divided into 4 logical layers:


  • User interface layer UI

  • Provides an interactive human-computer interface for end users


    • Business logic layer BLL

    • Abstracts the database Objects are spliced ​​into specific business logic objects and process organized


    • Data access layer DAL

    • ORM for the DB layer, allowing upper-layer applications to control the database in the form of objects


    • Data persistence layer DB

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

    In the traditional C/S architecture, applications (for example, client applications under Windows) are generally a central database Service server (DB), and then corresponds to N clients (DAL-BLL-UI).

    For junior testers, the understanding of the software may only stay at the UI layer, so what can be done during testing is: repeat it day by day Day after day, year after year, I have clicked with my mouse.


    3 Internet Software Architecture

    The basic architecture of the application software mentioned in the previous part, although it is in "C/S" It was proposed in the era, but it has continued to the present. The most common "ABC/S" mode to this day:

    • App/Server

    • Browser/Server

    • Client/Server

    Actually Essentially, the UI layer is placed on the client side, and the UI layer below is placed on the server side.

    Clients have different forms of expression under different platforms, forming the now popular so-called "ABC/S" model architecture, which has basically become the current Internet The product comes standard. The specific architecture is as follows:

    The communication protocol Http/Https is used between the server and the client, and the format of data exchange is Xml/Json format.

    Based on the above model, the methodology of software testing has undergone some changes:

    • With the cost-effective highest "based on communication encoding format "Interface Test", it means spending 20% ​​to solve 80% of the work

    • Interface testing can be fully automated, and it does not have to be forced to use the same interface as the development project Language, you can uniformly use a more efficient scripting language

    • #Interface naturally has a need for stability, so automated testing projects will not have to be tossed over and over again

    • Interface testers have become referees between many platforms

    • Interface specifications come from design documents and can be implemented Design generates tests, test drivesDevelopment standard model

    With the ability to abstract into data, many things you see can be converted into reasonable equivalents:


    • The background of the web page is red

    • Equivalent to: the color of the background of the background elementAttribute is #FF0000


    • ## The words displayed on the button are "Submit"

    • which is equivalent to: the value of the button element is

      Submit


  • It becomes easy to make comparisons at the data level

    Programming, because these are areas that computers are good at processing, and automation is naturally realized.


    4 The lower-level principle

    I talked about the method of abstracting the software project from the specific interface you see to the bottom layer into data. In fact, there are some lower-level and more absolute ones. The software data can be related to the physical world at a lower level (this is no longer easy to describe as "abstract" or "concrete").

    The content of this part is a bit far away from the topic of application software testing. It is purely for popular science.

    Looking at a computer system from a broader perspective, the experience it gives people is essentially the following processing:

    Everything about people The intuitive experience comes from the experience of analog quantities (physical quantities), and human interactive input also comes from the input of analog quantities.

    People tap the keyboard to input text into the computer system. The keyboard transmits pulse currents generated by different key positions into the computer system. The computer system converts these current signals into digital signals through chips and drivers, and then delivers the digital signals. Chip processing. In this way, the person completes the input of

    information.

    The computer system calculates, stores, transmits, etc. these data, and finally lights up the dot matrix at different positions on the LCD display to form an optical analog output, which is transmitted to the human eye. This completes the acquisition of

    information.

    The above example can be simplified as follows: mechanical physical quantities generate electrical physical quantities for input, and after processing by the computer digital system, optical physical quantities are output.

    For computer systems, both input and output are diverse:


      • Input device

      • Various sensors can be used as the main input, such as the currently booming smart hardware and the hotly-hyped

        Internet of Things.


      • ##Output device

      • In addition to optical LCD displays, there are also acoustic loudspeakers, rolling wheel mechanics, and humanoid walking robotic arm mechanics.
      These things are already very popular elements in the Internet industry now.

    Since the fields of electronic technology and communications often detect physical quantities, which are difficult to quantify with the naked eye, the test threshold will be very high. However, various testing instruments have developed quite well, and the degree of automation is quite high. On the other hand, in the upper application software layer of the IT industry, people rely too much on manual operations and naked eye observation, but ignore automation. As a result, the testing industry has always had low personnel quality and weak technical strength. This is obviously very serious. It is not advisable, at least it is very inconsistent with the current needs of the software engineering industry.


    5 Summary

    This article logically layers the application software to explain the software automation testing and basic principles. In the second half of the article Part of the automated testing of electronic technologies involved in the currently popular

    Intelligent Hardware

    has also been briefly discussed, hoping to give some inspiration to people who have never automated testing. The following series of articles will implement these theories from a technical level.

    To summarize

    , for those who want to enter this industry and have in-depth development, we have the following conclusions and suggestions:

    Writing this, let me finally "Amway"Linux, because compared to MacOS and Windows systems, Linux does not do a good job in the interface. , but it has powerful CLI interaction and supports powerful scripting, which is very helpful for realizing automation.

    (Unfinished, to be continued...)

    I will continue to write python's automation tools and programming applications in the future.



    The above is the detailed content of Basic technical principles of python automation. For more information, please follow other related articles on the PHP Chinese website!

    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

    PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

    Choosing Between PHP and Python: A Guide Choosing Between PHP and Python: A Guide Apr 18, 2025 am 12:24 AM

    PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

    Python vs. JavaScript: The Learning Curve and Ease of Use Python vs. JavaScript: The Learning Curve and Ease of Use Apr 16, 2025 am 12:12 AM

    Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

    PHP and Python: A Deep Dive into Their History PHP and Python: A Deep Dive into Their History Apr 18, 2025 am 12:25 AM

    PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

    Can vs code run in Windows 8 Can vs code run in Windows 8 Apr 15, 2025 pm 07:24 PM

    VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

    Can visual studio code be used in python Can visual studio code be used in python Apr 15, 2025 pm 08:18 PM

    VS Code can be used to write Python and provides many features that make it an ideal tool for developing Python applications. It allows users to: install Python extensions to get functions such as code completion, syntax highlighting, and debugging. Use the debugger to track code step by step, find and fix errors. Integrate Git for version control. Use code formatting tools to maintain code consistency. Use the Linting tool to spot potential problems ahead of time.

    How to run programs in terminal vscode How to run programs in terminal vscode Apr 15, 2025 pm 06:42 PM

    In VS Code, you can run the program in the terminal through the following steps: Prepare the code and open the integrated terminal to ensure that the code directory is consistent with the terminal working directory. Select the run command according to the programming language (such as Python's python your_file_name.py) to check whether it runs successfully and resolve errors. Use the debugger to improve debugging efficiency.

    Is the vscode extension malicious? Is the vscode extension malicious? Apr 15, 2025 pm 07:57 PM

    VS Code extensions pose malicious risks, such as hiding malicious code, exploiting vulnerabilities, and masturbating as legitimate extensions. Methods to identify malicious extensions include: checking publishers, reading comments, checking code, and installing with caution. Security measures also include: security awareness, good habits, regular updates and antivirus software.

    See all articles