Do you really know how to build frames? The automated testing framework is finely organized, and it is enough to read this article for the framework...


foreword

Whether it is in the practice of automated testing or in daily communication, one word is often heard: framework. In the process of learning automated testing before, I have always known the word "framework" without knowing why.

Python automated testing: https://www.bilibili.com/video/BV16G411x76E/

What is a framework?

Frame (framework) is a frame - refers to its constraints, but also a shelf - refers to its support. It is a basic conceptual structure used to solve or deal with complex problems.

In software engineering, a framework is a reusable design of the whole or part of the system, expressed as a set of abstract components and methods of interaction between component instances;

The above is a bit abstract, the following is some of my understanding:

Definition: To solve some specific problems, the boundaries are constrained, and the entire problem solution is supported, which is composed of some problem-solving components.
Specific questions: what question? - Automated Testing
Constraint Boundaries: Why Constrain? ——Clarify the scope and purpose
of the test Solution: What solution is used to solve the problem? - programming language + tools + other
Components that make up a tool: what components? - Use Cases, Scripts, Data, Logs, Reports, Notifications
Tools: What are the features? —— Flexibility, scalability, high cohesion and low coupling

automated test

1. Why do we need automated testing?
①. Low regression efficiency of black box testing
②. Contingency and uncertainty of manual testing
③ Insufficient coverage of regression
④ Quality of delivered products cannot be guaranteed, all depends on evaluation
⑤ The more complex the system, the more problems
⑥ Time to go online Butterfly effect caused by long time and high component failure rate (fast iteration, more overtime)

2. What problems can automated testing solve?
①, improve the response rate after problems occur
②, reduce the cost of regression
③, increase the coverage of regression
④, improve the efficiency of regression
⑤, improve the stability of regression

3. What are the shortcomings of automated testing?
①. Cannot reduce cost input, but to speed up the feedback of test results and improve test quality
②. Automation is suitable for regression and smoke, not for finding bugs
③. The recording and playback function is useless, and visualization is not a good practice
④. Not all functions of all systems are suitable for automated testing

automated testing framework

The components that make up the framework should at least have the following functions:

Log: log recording and management functions, set different log levels for different situations, convenient for locating problems;
Report: test report generation and management and instant notification, quick response to test results;
Source: configuration files, static resource management, follow The principle of high cohesion and low coupling;
Common: the management of public functions, methods and general operations, following the principle of high cohesion and low coupling;
TestCase: test case management function, one function point corresponds to one or more cases, and the coverage rate is improved as much as possible ;
TestData: test data management function, separate data and scripts, reduce maintenance costs, and improve portability;
TestSuite: test component management function, assemble and build different test frameworks for different scenarios and different needs, and follow the flexibility and scalability of the framework ;
Statistics: Test result statistics management function, statistics, analysis, comparison and feedback of each test execution result, data-driven, providing reference for software optimization and process improvement; Continuous: Continuous integration environment, namely CI
environment, including test file submission , scanning and compiling, executing tests, generating reports and timely notifications, and other functions, continuous integration is the core of automated testing!

Common automated testing frameworks

The following are mainly python language:

Interface automated testing: Python+requests+pytest+yaml+alluer+Jenkins;
web automated testing: Python+selenium4+pytest+POM+allure+Jenkins;
app automated testing: Python+appium+POM+pytest+allure+Jenkins;

Programming language: write test scripts, log records and output;
unit test framework: provide a series of configurations such as test script running and exception verification;
continuous integration tools: Jenkins, a classic continuous integration tool;

There are too many automated testing tools, and the above only lists the framework tools with high utilization rate. The specific framework selection needs to be determined according to the characteristics of the specific project and the technical characteristics of the team and team.

The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled

1. From entry to mastery of Python programming

Please add a picture description

2. Interface automation project actual combat

Please add a picture description

3. Actual Combat of Web Automation Project

Please add a picture description

4. Actual Combat of App Automation Project

Please add a picture description

5. Resume of first-tier manufacturers

Please add a picture description

6. Test and develop DevOps system

Please add a picture description

7. Commonly used automated testing tools

Please add a picture description

Eight, JMeter performance test

Please add a picture description

9. Summary (little surprise at the end)

Time waits for no one, time flies. Cherish the time and seize every opportunity. No matter how rough the road ahead is, as long as you have a dream in your heart, you will be able to forge ahead and finally achieve your own success and happiness.

Life is short, don't waste time on meaningless things. Cherish every minute and every second, keep learning and growing, and be a fulfilling and valuable human being. Believe in yourself and go forward.

There is no such thing as hopelessness, only depression. Don't give up on yourself, even if the road ahead is bumpy, you must move forward firmly. Let setbacks be the catalyst for your growth, create a brilliant life with sweat and hard work, and march forward bravely towards your dreams.

Guess you like

Origin blog.csdn.net/m0_70102063/article/details/130489452