Automated testing platform capable of being developed for second time

By designing an automated test platform based on Python, the limitations of test objects and difficulties in secondary development in the existing technology are solved, high flexibility and wide applicability are achieved, and the platform's capabilities and stability are improved.

CN119415392AInactive Publication Date: 2025-02-11MIKAS (ZHEJIANG) TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411503487.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing automation test platform has limited test objects, relied on third-party tools, poor versatility, poor portability and difficulty in secondary development, and cannot be used for multiple types of product testing.

Method used

Designed a secondary development automated test platform, using Python language to write the test system architecture, including the CORE layer, management layer, open API interface layer and user layer, providing rich online editors in the form of API interfaces and plug-ins, supporting Run parallel and exception handling.

Benefits of technology

It realizes use in any testing industry or field, provides high flexibility and freedom to secondary development capabilities, reduces learning costs, and improves the platform's capability ceiling, security and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415392A_ABST
    Figure CN119415392A_ABST
Patent Text Reader

Abstract

The invention relates to the field of automatic testing, in particular to an automatic testing platform capable of achieving secondary development, and solves the problems that in the prior art, testing objects are limited, and secondary development is difficult. According to the invention, a Python language is adopted to write a test system architecture, and the test system architecture comprises a core CORE layer, a management layer, an interface layer of an open API and an outermost user layer developed by a user; the test system architecture is a model irrelevant to the test service. The method can be used in any test industry or field by adopting a business-independent automatic platform design; only several simple API interface constraints are provided, and the maximum secondary development flexibility is given to the user himself / herself to freely exert; according to the method, online editing and debugging management are integrated, and a user can complete the whole process from development to debugging to online without installing or using any other third-party development debugging tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated testing, and in particular to an automated testing platform capable of secondary development. Background Art

[0002] Automated testing is a method of performing testing tasks by using software tools and scripts. Compared with manual testing, it can improve the efficiency, repeatability and coverage of testing. Automated testing generally covers the following key features: Testing tools and frameworks: Such as Selenium, Appium, Junit, TestNG, etc. These tools provide rich functions and APIs to support automated testing of different types of applications, such as WEB, mobile API, etc. Programming languages ​​and scripts: Automated testing usually uses scripting programming languages ​​to write test scripts, such as Python, Java, Perl, Tcl, etc.; test scripts include the steps, expected results and assertions of test cases, and execute tests and obtain results by calling the API of the test tool, which is also the key to supporting secondary development of automated testing. Test environment and management: Automated testing needs to be carried out in a suitable test environment, which may involve virtualization technology, containerization technology such as Docker, cloud computing platform, etc., to facilitate the deployment and management of the test environment, and support the execution of parallel testing and large-scale testing. Version control and collaboration tools: Automated testing teams usually use version control tools such as Git to manage the versions of test scripts and related resources to ensure that team members can collaborate to develop and maintain test suites. Continuous learning and improvement: Testing teams need to continuously evaluate and optimize testing strategies, select appropriate tools and techniques to cope with ever-changing software development requirements and testing challenges.

[0003] There are many existing automated testing solutions, but most of them are for testing pure software projects, and most of them do not support secondary development. Some systems that support secondary development have relatively niche programming languages ​​for their open secondary development interfaces, which are not highly open and have complex and difficult-to-use API interfaces. Here are some of the more commonly used automated testing solutions: The Web application automation testing solution adopts the currently popular Selenium WebDriver automation testing tool + the modern front-end testing tool Cypress automation testing solution. It mainly focuses on end-to-end testing and user experience testing of Web applications, providing fast and stable test execution. Need to match the test model , no need and no possibility for customized testing solutions.

[0004] The automated API testing solution uses the popular API testing tool Postman + REST Assured open source Java library.

[0005] The Web + Perl automated testing solution is an early production line test management solution that is still widely used. It is generally used in the factory testing of equipment products. The general principle is to use the web to implement the test management platform and use Perl to write test cases.

[0006] Insufficient points of existing technical solutions: Limited test objects: Most tests are for pure software projects such as Web front-ends, which are very limited. Powerful automated execution tools cannot actually be applied to other types of product testing, especially functional and performance testing of physical products. Dependence on third-party tools: Most automated testing platforms rely on third-party automated testing tools to operate. You need to be very proficient in using third-party automated testing tools, which are highly professional and have a high learning cost. Poor versatility: Automated testing platforms that allow users to customize test cases are generally customized by manufacturers and are basically product-oriented. Even if they support secondary development, they are limited to the API interface of a certain product or a certain category of products and cannot be universal. Poor portability: Some platforms are implemented using programming languages ​​with poor portability, such as C or C++; Difficulty in secondary development: Most automated testing platforms do not open secondary development interfaces, so users cannot develop customized test cases. The programming scripts used in the open secondary development interfaces are relatively niche and have been repackaged, which does not support free writing and has low flexibility.

[0007] There is an urgent need for a new type of automated detection platform that can solve the above problems. Summary of the invention

[0008] The present invention provides an automatic test platform capable of secondary development, which solves the problems of limited test objects and difficult secondary development in the prior art.

[0009] The technical solution of the present invention is implemented as follows: an automated testing platform that can be redeveloped uses Python language to write a test system architecture, the test system architecture includes the core CORE layer, the management layer, the open API interface layer and the outermost user layer for user development; the test system architecture is a model that is independent of the test business.

[0010] Furthermore, the CORE layer includes a test process management module, a test log management module, a test defect management module, a test case management module, a security management module, a link management module and a permission management module.

[0011] Furthermore, the management layer includes a debugging manager and an operation manager; the debugging manager is a Python interpreter that is convenient for users to debug; the operation manager includes an operation environment preparation module, a use case list creation module, a operation thread creation module, a use case script import module, a test case execution module, a test log collection module, and a test termination and recovery operation environment module; the operation thread includes a single test and a loop test; the use case list creation module is a module for registering Python function names using the REG_CASE interface provided by the platform when the user writes a test case.

[0012] Furthermore, the interface layer also includes an API interface for simulator and driver management.

[0013] Preferably, it also includes a Python code online editor provided in the form of a plug-in.

[0014] Preferably, it also includes an exception processor for real-time monitoring and capturing abnormal situations, and issuing alarm prompts and operating control for abnormal situations.

[0015] Preferably, it also includes a log processor and a result processor; the log processor is used to collect log information filled in by the user calling the log API interface, and transfer it to the test log management module of the CORE layer for storage, analysis, and export; the result processor processes the results of the user's execution, extracts key information and transfers it to the CORE layer for processing.

[0016] The invention discloses an automated testing platform capable of secondary development. By adopting an automated platform design that is independent of business, the platform can be used in any testing industry or field. The invention has only a few simple API interface constraints, and leaves the maximum flexibility of secondary development to users to freely play. Users can freely define their own drivers, simulations / emulators, and test cases according to the object to be tested, but do not need to care about any technical details of automated test operation and result processing. The invention does not use any third-party automated test management or control tools. Users only need to have basic Python programming skills and can use the platform without learning any tool or component API manual. The invention integrates online editing and debugging management. Users can complete the entire process from development to debugging to online launch without installing or using any other third-party development and debugging tools. The invention is a complete IDE. The parallel operation and exception handling of the invention not only improve the upper limit of the platform's capabilities, but also represent its security and stability, and there is no need to worry that the business will drag down the automated testing platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0018] Figure 1 : Architecture diagram of the present invention. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] The present invention discloses an automated test platform capable of secondary development, which uses Python language to write a test system architecture, which includes the core CORE layer, the management layer, the interface layer of the open API, and the outermost user layer for user development; the test system architecture is a model unrelated to the test business. The system uses the open source and open features of Python to provide a solution for automatically importing, checking, and executing Python scripts written by users, allowing users to freely customize test cases.

[0021] Furthermore, the CORE layer is the traditional core testing business, including a test process management module, a test log management module, a test defect management module, a test case management module, a security management module, a link management module and a permission management module.

[0022] Furthermore, the management layer includes a debugging manager and a running manager; the debugging manager is a Python interpreter that facilitates user joint debugging, and by adding some debugging means that facilitate the location of problems, such as single-step execution, adding breakpoints, etc., it is convenient for users to develop Python programs and then conduct joint debugging on the platform; the running manager includes a running environment preparation module, a use case list creation module, a running thread creation module, a use case script import module, a test case execution module, a test log collection module, and a test end recovery running environment; the Python script submitted by the user can be run with one click; the use case list creation module is a module for the Python function name registered by the user using the REG_CASE interface provided by the platform when writing test cases. The principle of operation is to record the memory address of the function name when importing the use case script, use the use case name to index the entry address of this function when running the use case, and then jump to the memory address to run, so as to achieve the purpose of executing the use case.

[0023] Generally, a test project is a test project, which can contain multiple test cases. Test cases can be written in one .py file or in multiple .py files as needed. However, there must be an entry .py file to reference other .py files. The present invention sorts test cases in the order of registration using REG_CASE. Therefore, if the user has a sequential dependency on the execution of the test cases, the user needs to handle the registration sequence by himself.

[0024] Running threads include one-time testing and loop testing; loop testing is actually to execute the test case list in a loop. In addition, this platform also supports parallel testing scenarios, that is, the same test case can be run in multiple copies at the same time, each corresponding to an independent thread. Parallel testing is mainly used in large-scale production line testing scenarios, such as testing multiple DUTs on a platform at the same time. Furthermore, the interface layer also includes API interfaces for simulator and driver management. The purpose is to allow users to develop not only test cases but also device drivers and emulator / simulator programs to meet their specific test business needs. Preferably, it also includes a Python code online editor provided in the form of a plug-in. After the user installs the platform software, the user can use this editor to create, modify or save any Python code. The reason why the present invention does not embed a third-party editor is to better be compatible and interactive with the platform software, such as automatically synchronizing user test projects, automatically synchronizing test case lists, and automatically synchronizing code changes.

[0025] Preferably, an exception handler is also included to monitor and capture abnormal situations in real time, and to issue alarms and control operations for abnormal situations. The principle is that the execution of the secondary development layer code cannot damage the system environment of the test platform; since the most common problem in secondary development is that the test case code written by the user has problems, and the test platform only provides an editing and running environment, but the case code is left to the user to write and implement, the platform has no way to guarantee the quality of the user's code, which will inevitably lead to an operation exception problem. These exceptions include but are not limited to exceptions caused by Python syntax errors, as well as word spelling errors caused by user negligence, confusing code logic, and even intentional offensive programming by users, such as deliberately adding an infinite loop to drag down the test system, writing system-aggressive code, etc.

[0026] Preferably, it also includes a log processor and a result processor; the log processor is used to collect log information filled in by the user calling the log API interface, and transfer it to the test log management module of the CORE layer for storage, analysis, and export; the result processor processes the results of the user's execution, extracts key information and transfers it to the CORE layer for processing.

[0027] The test platform of the present invention is 100% written in Python language, has strong portability, and can be easily copied to various commonly used hardware platforms for direct use, which solves the strong dependence of the test platform on the hardware platform; as long as the user adopts projects or use cases written in Python, whether it is a web application or a device product with an open Python control interface, the present invention can be flexibly compatible with the test, and the user does not need to learn any third-party tool software; the Python platform is used to execute Python scripts as the foundation of secondary development. In addition to providing a few simple API registration interfaces, there are no restrictions on Python scripts developed by users. Therefore, users only need to have basic Python programming skills to develop any driver, API, test process and other scripts you want to automatically execute on the platform of the present invention.

[0028] The present invention designs a set of universal script import, editing, checking, execution, log generation, analysis, result processing, display, export and other processing flows, which are completely decoupled from specific test objects and test contents, and can therefore be applied to various software and hardware test projects; through built-in simple syntax detectors, online editors, single-step execution debuggers and other tools, users can directly write and debug secondary development scripts on the platform, which we call online DEBUG, eliminating the intermediate process of using third-party tools to write and debug scripts.

[0029] The invention discloses an automated testing platform capable of secondary development. By adopting an automated platform design that is independent of business, the platform can be used in any testing industry or field. The invention has only a few simple API interface constraints, and leaves the maximum flexibility of secondary development to users to freely play. Users can freely define their own drivers, simulations / emulators, and test cases according to the object to be tested, but do not need to care about any technical details of automated test operation and result processing. The invention does not use any third-party automated test management or control tools. Users only need to have basic Python programming skills and can use the platform without learning any tool or component API manual. The invention integrates online editing and debugging management. Users can complete the entire process from development to debugging to online launch without installing or using any other third-party development and debugging tools. The invention is a complete IDE. The parallel operation and exception handling of the invention not only improve the upper limit of the platform's capabilities, but also represent its security and stability, and there is no need to worry that the business will drag down the automated testing platform.

[0030] Of course, without departing from the spirit and essence of the invention, technicians familiar with the field should be able to make various corresponding changes and modifications based on the invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the invention.

Claims

1. An automated test platform capable of secondary development, using Python language to write the test system architecture, characterized by: The test system architecture includes the core CORE layer, the management layer, the open API interface layer and the outermost user layer for user development; The test system architecture is a model that is independent of the test business.

2. The automated test platform capable of secondary development according to claim 1, characterized in that: The CORE layer includes a test process management module, a test log management module, a test defect management module, a test case management module, a security management module, a link management module and a permission management module.

3. The automatic test platform capable of secondary development according to claim 2, characterized in that: The management layer includes a debugging manager and a running manager; the debugging manager is a Python interpreter that is convenient for users to debug; the running manager includes a running environment preparation module, a use case list creation module, a running thread creation module, a use case script import module, a test case execution module, a test log collection module, and ends the test to restore the running environment; Running threads include one-time testing and loop testing; The module for creating a test case list is a module for registering Python function names using the REG_CASE interface provided by the platform when the user writes a test case.

4. The automatic test platform capable of secondary development according to claim 3, characterized in that: The interface layer also includes API interfaces for simulator and driver management.

5. The automatic test platform capable of secondary development according to claim 4, characterized in that: Also included is an online editor for Python code provided as a plugin.

6. The automatic test platform capable of secondary development according to claim 5, characterized in that: It also includes an exception processor for real-time monitoring and capturing of abnormal situations, and for issuing alarm prompts and operating control for abnormal situations.

7. The automatic test platform capable of secondary development according to claim 6, characterized in that: It also includes a log processor and a result processor; the log processor is used to collect log information filled in by the user calling the log API interface, and transfer it to the test log management module of the CORE layer for storage, analysis, and export; The result processor processes the result of the user's execution, extracts key information and transfers it to the CORE layer for processing.

Citation Information

Patent Citations

  • Web test platform and Web test method based on hybrid automatic test framework

    CN110321281A

  • Automatic test framework based on Bash Shell

    CN113609015A

  • Python-based lightweight automatic test system supporting full architecture

    CN116225912A

  • Structure for testing NVMe SSD (Non-Volatile Memory Express Solid State Disk) by Python script and use method

    CN117312061A

  • Automated software testing

    US20140380281A1