Preface (nonsense)

The development history of the Graphical Interface Operating System — a Review of the Development history of the Computer Interface; The Design Principle of the MV*(MVVM MVP MVC) Model — Packaging and Decoupling

In April 1973, Xerox PARC developed the first personal computer to use the Alto operating system, which was the first graphical interface operating system to combine all the elements of a computer. Xerox PARC also developed a programming language and environment called Smalltalk, which had its own GUI environment (including pop-up menus, Windows, and ICONS).

In “Steve Jobs,” Jobs saw an experimental GUI being developed at Xerox, went back and started working on it, and stole a bunch of people from Xerox. Then Microsoft had to mimic what Apple had revealed. What followed was a remarkable history of GUIs.

From CS architecture to BS architecture. The Internet is developing in full wave, I recommend to look at the browser history, Chrome dominance and domestic browser war, I 13 years from Java pit H5, but the front-end UI test, in addition to the front-end engineer Mocha Karma Jasmine door, is to give the test staff a little bit of feeling. How does the front-end UI automate tests?

What is an automated test

Automated testing: the process of converting human-driven tests to machine execution, with emphasis on the concept of continuous integration;

The types of tests listed on selenium’s website are:

Types of testing

My impression is: Unit Testing, Integration Testing, E2E Testing.

  • 2. Acceptance testing Test whether the product is fully functional. This is usually a product check.

  • Functional testing: Tests whether functionality is available.

  • Regression testing: Regression testing, in which old code or new functionality is modified and retested to ensure that the change does not introduce new bugs or cause errors in other code

  • Performance testing: Test whether the program is stable and reliable

  • Load testing: To test the data throughput of software without limiting the running resources, to find design errors or to verify the load capacity of the system. The goal of a load test is to determine and ensure that the system is functioning properly even when the maximum expected workload is exceeded. In addition, load tests also evaluate performance characteristics. For example, response time, transaction processing rate, and other time-related aspects. Load testing is one way to test for performance bottlenecks by constantly debugging concurrency. For example, 80 concurrent, this is called 80 user load test. Going through a process of 80 — >180 concurrency is called a performance test. That is, performance testing is done through different load tests.

  • Stress testing is the testing of continuous Stress on a system by identifying bottlenecks or performance points that a system cannot receive in order to obtain the maximum level of service that the system can provide. A stress test is a performance test under high pressure.

Difference between load testing and stress testing: Stress testing, which is performed under high load conditions, is not to obtain performance indicators, but to understand whether the system is stable. In this case, the server indicator is generally less than 90%. Stress tests are more likely to detect memory leaks over long periods of time than performance tests. Load testing is the method, performance testing is the process.

Automated test layering

Unit automation testing (data processing layer) :

Unit Testing: The inspection and verification of the smallest testable unit in software.

The meaning of the unit: the unit is the minimum function module under test. Unit testing is the lowest level of testing activities to be carried out in the process of software development. Independent units of software will be tested in isolation from other parts of the program. For example, in C language, a unit refers to a function, in Java, a unit refers to a class, and in graphical software, it can refer to a window or a menu.

Unit automation testing generally requires the help of unit testing framework, such as Java Junit, TestNG, Python unittest, the common means is code Review, etc.

Front-end unit testing framework:

  • Jasmine: Has built-in assert and mock capabilities

  • Mocha: The framework does not come with assertions and mocks, but needs to be combined with other tools like Chai. Developed by TJ

  • Jest: A Facebook testing framework developed on top of the Jasmine testing framework. It integrates Mocha, Chai, JSDOM,sinon, and more.

Front-end assertion library

The assertion library provides many semantic ways to make a variety of judgments about values.

  • Chai: A popular assertion library that supports both TDD (Assert) and BDD (Expect and should) styles

  • Should.js: Also written by TJ

Front-end integrated management tool

  • Karma: Responsible for automated execution of test scripts, batch processing of scripts, statistical tests. It’s written by the Google Angular team. It’s very powerful and has many plug-ins. You can connect to a real browser to run test cases. Be able to use some test coverage statistics tools to count the coverage; Or you can join continuous integration and automatically run test cases after you commit your code.

Interface automation testing (business logic layer) :

Interface test: Interface test is to test the interfaces between systems or components. It mainly refers to the exchange, transfer, control and management process of parity data, as well as the mutual logical dependence. Which interface protocols are divided into HTTP, WebService, Dubbo, Thrift, Socket type, such as test type mainly divided into functional testing, performance testing, stability testing, security testing, etc.

It mainly checks and verifies the call return between modules and the data exchange between different systems and services. Common interface testing tools include Postman, JMeter, loadRunner, etc.

Here I strongly recommend Rap, an open source free interface automation, MOCK data automated generation, automated testing, enterprise Web interface management tool (ali Mom MUX team produced). RAP helps WEB engineers manage interface documents more efficiently through GUI tools, and automatically generates Mock data by analyzing the interface structure to verify the correctness of real interfaces, making interface documents a strong dependency in the development process. With structured API data, you can avoid more duplication of effort.

Amway’s own article: “A Guide to Designing A Front-end Separation API”

The benefits of interface automation testing are large: because it is easy to implement, low maintenance cost, and has a higher input-output ratio, it is the first choice for every company to carry out automated testing.

UI automation test (GUI interface layer) :

UI layer is the entry point for users to use the product. All functions are provided to users through this layer, and most testing work is concentrated in this layer. Common testing tools include UFT, Robot Framework, Selenium, Appium, etc.

What kind of projects are suitable for automated testing

Cost performance: According to the test pyramid model and input/output ratio, the lower the rate of return, the higher;

Google’s share of automation layering investments:

  • Unit: 70%;

  • Medium test (Service) : 20%;

  • Big test (UI) : 10%;

Automation challenges: The biggest challenge is change, because change can cause test cases to fail, so you need to constantly debug automation scripts. How to control the cost and reduce the cost is a challenge to the capabilities of automation tools and people.

Like a project that gets paid for doing things quickly, automated testing is bullshit.

Why should functional tests be automated?

  • Functional testing has a large number of regression testing, large data volume testing.

  • Automated tests are more efficient and rigorous.

Conditions for functional automation tests:

  • Demand is relatively stable

  • Smoke test passed

  • Long test cycle

This tool is a commonly used automated test tool on the PC

  • Selenium: Open source toolset for regression functional testing or system use case specification, and browser compatibility. Supports mainstream languages such as JavaScript, Java, and C

  • Monkey: Install the built-in UI test tool, which is used to stress test the application on the device to see how long it takes for the application to fail. Monkey command

  • Loadrunner: Commercial performance testing tool, charged, powerful, suitable for complex scenarios performance testing. Write test cases in Java

  • QTP (= “UFT) : commercial paid software, support web, desktop automated testing. It is mainly used for regression testing and testing new versions of the same software, supporting VBScript

  • WinRunner

  • QARun

  • Robot

The next part introduces Selenium: Web Automated Testing (2): The advantages of Choosing Selenium? Compared with PhantomJS/QTP/Monkey

Peer related articles recommended:

Front end test automation blog.csdn.net/webyouxuan/…

The front of a big factory automation (5) – based on Karma, Mocha and unit tests and interface test blog.51cto.com/13869008/21 Chai…

Reprint the home station article “web test automation (1) : talk about the history of the UI and UI, functional test automation”, please indicate the source: www.zhoulujun.cn/html/Operat…