当前位置:网站首页>Answer questions! This article explains the automated testing framework in software testing from beginning to end
Answer questions! This article explains the automated testing framework in software testing from beginning to end
2022-06-24 05:18:00 【Code start】
Answer your questions about the framework
- Preface
- What is automated testing framework
- Design principles of automated test framework
- Frame design idea
Preface
Before we design the automation framework, let's look at two problems , What is an automation framework , What principles should we pay attention to when designing , Then what to do ? This article will focus on a web Terminal UI Take the design of automatic test framework as an example
What is automated testing framework
What is a framework
In particular, it refers to a constrained supporting structure designed to solve an open problem . In this structure, it can be extended according to specific problems 、 Insert more components , So as to build a complete solution to the problem more quickly and conveniently . A framework is a reusable design of a whole or part of a system , It represents a group of abstract components and methods of interaction between component instances . In other words, the framework itself does not solve specific problems , It solves problems by extending various components or tools , And it can easily add or modify the functions of some components .
What is automated testing framework
What is automated testing framework , If we split it up , In fact, there are three aspects , automation 、 test 、 frame , What is a frame? It says , And he can perform tests , And it's automated , Therefore, the main function of each component of the framework revolves around how to automate and execute tests .
Here, the functions of the framework can be called modules , Let's take a look at the modules we need , Need a basic module , Mainly how to realize script writing , Management module , The main behavior is continuous integration , Timing execution 、case management , Statistics module , Mainly sending test reports , Statistical analysis . To sum up, the definition of automated testing framework is : Put some functions or tools used in the process of automated testing , Sub assemble into various modules , It includes the basic modules of how to write automatic scripts and hierarchical functions , Continuous integration 、 Timing task management module , Send test report 、 Statistical module for statistical analysis of test results, etc , These modules form a set of reusable skeleton
Design principles of automated test framework
- generality : It can be used in a variety of systems and platforms
- Maintainability : Can put our data 、 Use cases 、 The implementation of the framework is maintained independently , In the process of achieving perfection , Quickly define the maintenance point , Without affecting other functions of the framework
- Timing processing : Be able to execute... At a specified time
- Continuous integration : When the tested program and test code are updated, it can be executed automatically
- debugging : Debuggable line strength
- test result : Test report 、 Statistical analysis of test data
Frame design idea
The main body of the automated test framework can be divided into two parts , One is the internal framework , One is the external framework , The internal framework is our own test framework code , The external framework is to put aside the core code of our implementation , Some third-party tools used in the design of automatic test framework .
- The external framework
- Mainly refers to webdriver At the core , Supplemented by external third placement frame and tools . For continuous integration 、 Automatic deployment 、 Script execution 、 The remote invocation 、 Report optimization 、 Functional frameworks such as mail sending Guide , Some peripheral components that implement the design principles of the automation framework .
- The internal framework
- That is, the layered framework , The purpose is to better optimize and manage test cases , More convenient data processing 、 Elements 、 Script maintenance and faster creation of new scripts
Design idea of automatic test framework
- General external framework to realize logic
- maven perhaps tox- Automatic compilation , perform TestNG or junit, Integrated mail sending, etc
- TestNG or Junit、pytest, call webdriver Or the method of sending the request , Execute automated test cases , Standardize automated test scripts
- selenium Script or interface use case script
- reportNG perhaps allure Report optimization template
- main Automatically html Email notification or Jenkins Send E-mail
The internal framework
- Layer frame - That is, code structure optimization , According to the specific business and needs, it can be roughly divided into the following layers , Sometimes you don't need all the levels below , Just choose the one suitable for your business test .
- TestCase layer : Executed use case script
- Task layer : Public business sub packaging , Is not needed for other projects , Only relevant to the current project , Such as public login 、 Search and other businesses
-utils layer : Business independent methods , For example, data-driven - That is, read and write data files 、 Browser operation 、 Element positioning method, etc - page Layer or po layer : Page layer , The page layer mainly maintains all elements of a page , The operation of the page 、 Operation of elements and interaction with other pages , Business is actually an element to another element or a page to another page , This is the sum of task The layers are a little repetitive. Generally, one is enough .
- element layer : Maintenance of common elements or components , Or custom component encapsulation
- data layer : data storage
- properties layer : The configuration file 、 Global variables

If you want to learn to communicate , Join us soon :893694563, Group learning software testing , Share technology and learning materials , Grow and learn with you . It would be : Start on the yard
边栏推荐
- Why do hybrid clouds exist?
- Oceanus practice - use of the Nepal graph connector in the graph database
- PHP end() function
- What are the functions and advantages of the Internet of things cloud platform?
- Have you got the programmer's drawing tools and skills?
- [Yunyue plan] Tencent's cloud industry opening is based on the digital marketing of games such as king / eating chicken / fighting landlords and private domain marketing
- Open source and SaaS, how to choose software?
- PHP in_ Array() function
- 2021-08-27: the normal odometer will display natural numbers in turn to indicate mileage, Kyrgyzstan
- [jest] summary of the use of automated test jest
猜你喜欢

What are the disadvantages of the free IP address replacement tool?

Intensive learning and application of "glory of the king" to complete the application of 7 real worlds other than human players

Hard core observation 553 AI needs to identify almost everyone in the world with hundreds of billions of photos

Leetcode (question 1) - sum of two numbers

011_ Cascader cascade selector

How does win10 turn off f1~f12 shortcut keys?
![[leetcode daily question] push domino](/img/81/1c31e97d9a245816514bcf47c92107.jpg)
[leetcode daily question] push domino

CTF learning notes 17:iwesec file upload vulnerability-02 file name filtering bypass

Leetcode question brushing (question 3) - the longest substring without repeated characters

CTF learning notes 18:iwesec file upload vulnerability-03-content-type filtering bypass
随机推荐
PTA 1046 stroke (15 points)
Introduction to ebpf
CLB health check principle and abnormal troubleshooting
What is the third level domain name? How to choose a domain name agent
[Yunyue plan] Tencent's cloud industry opening is based on the digital marketing of games such as king / eating chicken / fighting landlords and private domain marketing
Where is the cheaper domain name? What should I pay attention to when buying a domain name?
Analyze the actual user groups and demand positioning of distributed database products from the market and demand
What is the implementation of domain name to IP address conversion? What are the benefits of switching to a website?
How to register a company domain name how to build a website with a domain name
The easyplayer player displays compileerror:webassembly Reason for instance() and its solution
Why do hybrid clouds exist?
Youtech sharing | the application of Tencent Youtu multimodal graphic content identification and positioning in content security
Detailed explanation of the process after the browser enters the domain name and web address
What is required for domain name filing and how to select an enterprise domain name
Shutter - how to copy certain elements from a map to a new map in dart/shutter?
Use of go testing framework gomock
NLP baked gluten
How to apply for company website domain name how to build a website after domain name registration
What are the functions and advantages of the Internet of things cloud platform?
Oceanus practice - use of the Nepal graph connector in the graph database