You’ll know it at a glance! I summarize the automated testing framework like this, everyone can learn it well!

Whether in automated testing practice or daily communication, one word is often heard: framework. In the process of learning automated testing before, I always knew the word "framework" but didn't know why.

I have read a lot of automation-related information recently, and coupled with some of my own practices, I have some understanding of the "framework". This article will talk about some things about the automation framework.

01What is a framework

A framework is a frame - referring to its restrictive nature, and a shelf - referring to its supporting nature. 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 entire or part of a system, represented by a set of abstract components and methods of interaction between component instances;

Another definition holds that a framework is an application skeleton that can be customized by application developers. The former is defined from the application perspective while the latter is defined from the purpose perspective.

-- Baidu Encyclopedia

The above concept is relatively abstract, so let’s explain it from another perspective:

  • The framework itself is generally not complete enough to solve a specific problem;
  • Frameworks are inherently designed to scale;
  • The framework can provide many auxiliary, supportive and easy-to-use tools for subsequent expanded components. In other words, the framework is equipped with some libraries or tools that help solve certain types of problems.

Constraint: A software framework that solves a specific problem will first define the boundary of the problem, and then constrain the relevant software components within this boundary to maintain the cohesion of the framework in solving the problem.

Supportability: The framework itself does not solve any problems, but it gives a combination foundation for the relevant components that solve the problem. The scientificity and ease of use of this foundation directly affect the scientificity and convenience of further development on top of it. 

-- Know almost

Definition:
A tool that constrains boundaries to solve certain specific problems, supports the entire problem solution, and is equipped with some problem-solving components.
Specific question: What question? ——Automated testing
Constraint boundaries: Why constraints? ——Clear the scope and purpose
of the test Solution: What solution should be used to solve the problem? ——Programming language + tool + other
components that make up the tool: which components? ——Use cases, scripts, data, logs, reports, notifications
Tools: What are the characteristics? ——Flexibility, scalability, high cohesion and low coupling

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:110685036

02Automated testing

1. Why perform automated testing?

  • Black box testing has low regression efficiency
  • The contingency and uncertainty of manual testing
  • Insufficient coverage of regression
  • The quality of the delivered products cannot be guaranteed and depends entirely on evaluation.
  • The more complex the system, the more problems there are
  • The butterfly effect caused by long online time and high component failure rate (fast iteration, more overtime)

2. What problems can automated testing solve?

  • Improve response rate after a problem occurs
  • Reduce return costs
  • Improve regression coverage
  • Improve regression efficiency
  • Improve regression stability

3. What are the shortcomings of automated testing?

  • It is impossible to reduce cost investment, but to speed up test result feedback and improve test quality.
  • Automation is for regressions and smoke, not bug discovery
  • The recording and playback function is useless, and visualization is not a good idea.
  • Not all systems and all functions are suitable for automated testing

03Automated testing framework

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

  • Log: Logging and management functions, different log levels are set for different situations to facilitate problem location;
  • Report: Test report generation and management, instant notification, and quick response to test results;
  • Source: Management of configuration files and static resources, following the principle of high cohesion and low coupling;
  • Common: Management of public functions, methods and common operations, following the principle of high cohesion and low coupling;
  • TestCase: Test case management function, one function point corresponds to one or more cases, improving coverage as much as possible;
  • TestData: Test data management function, separation of data and scripts, reducing maintenance costs and improving portability;
  • TestSuite: Test component management function, assemble and build different test frameworks for different scenarios and different needs, following the flexibility and scalability of the framework;
  • Statistics: Test result statistics management function, statistics, analysis, comparison and feedback of each test result, data-driven, providing reference for software optimization and process improvement;
  • Continuous: Continuous integration environment, that is, CI environment, includes functions such as test file submission, scanning and compilation, test execution, report generation and timely notification. Continuous integration is the core of automated testing!

04Common automated testing frameworks

1. Interface automation framework:

① java+testNG/Junit+Maven/Ant/Gradle+Jenkins+MySQL+testlink/redmine
② python+unittest/pytest+Git+Jenkins+MySQL+testlink/redmine
③ python+rebot framework+unittest/pytest+Git+Jenkins+MySQL+testlink/redmine
④ jmeter+Maven/Ant+Jenkins+MySQL+testlink/redmine

2. UI automation testing framework

① java+selenium/appium+testNG/Junit+Maven/Ant/Gradle+Jenkins+MySQL+testlink/redmine
② python+selenium/appium+unittest/pytest+Git+Jenkins+MySQL+testlink/redmine
③ python+rebot framework+unittest/pytest+Git+Jenkins+MySQL+testlink/redmine

What did you discover using some of the common frameworks above?

They all have common characteristics: programming language + unit testing framework + scanning and compilation tools + continuous integration tools + database + project management tools.

  • Programming languages: writing test scripts, logging and output;
  • Unit testing framework: Provides a series of configurations such as test script running, exception verification, etc.;
  • Scanning and compilation tools: Test files are scanned and compiled, and generally the effect is better when used in conjunction with continuous integration tools;
  • Continuous integration tool: Jenkins, the classic continuous integration tool;
  • Database: test data management;
  • Project management tools: statistical management of test results;

PS: There are too many automated testing tools. The above only lists some open source tools that are highly used and that I personally know well. The specific framework selection needs to be decided based on the characteristics of the specific project and the technical characteristics of the team and individuals!

I know a lot about some open source tools, and the specific framework selection needs to be decided based on the characteristics of the specific project and the technical characteristics of the team and individuals!

Finally, I would like to thank everyone who read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.
 

Insert image description here

Guess you like

Origin blog.csdn.net/myh919/article/details/133307350