WO2020259516A1 - Unit testing system and unit testing method - Google Patents

Unit testing system and unit testing method Download PDF

Info

Publication number
WO2020259516A1
WO2020259516A1 PCT/CN2020/097820 CN2020097820W WO2020259516A1 WO 2020259516 A1 WO2020259516 A1 WO 2020259516A1 CN 2020097820 W CN2020097820 W CN 2020097820W WO 2020259516 A1 WO2020259516 A1 WO 2020259516A1
Authority
WO
WIPO (PCT)
Prior art keywords
scene
data
name
data corresponding
scene name
Prior art date
Application number
PCT/CN2020/097820
Other languages
French (fr)
Chinese (zh)
Inventor
韦晨曦
李懿
陈世阳
江旻
李斌
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2020259516A1 publication Critical patent/WO2020259516A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention relates to the technical field of unit testing, in particular to a unit testing system and a testing method.
  • a typical unit testing process can be divided into the following steps:
  • Data loading and single test scenario initialization This step is used to load business data from the data source and construct the required business scenario.
  • Execute business logic to be tested the actual code logic to be tested.
  • Assertion test verify whether the returned result of the business logic is correct.
  • Transaction rollback restore to the data environment before the start of this single test for use in the next single test case.
  • the existing technology single test process mainly has the following shortcomings:
  • Data sources may include Excel files, csv files, JPA objects, etc.
  • the differences between these different data sources require developers to adapt in the business code. The consequence is not only that business logic and file processing logic are mixed together, but also The code redundancy is high, and the file processing logic written by different developers may be inconsistent, which in turn reduces the standardization of the code.
  • the embodiment of the present invention provides a unit test system and a test method to solve the problem that the single test scenario in the prior art cannot be standardized and cannot be adapted to multiple data source formats.
  • an embodiment of the present invention provides a unit test system, including a listener, a scene construction layer, a data source adaptation layer, a unit test module, a business database, and a scene library;
  • the listener is used to obtain the scene name and send the scene name to the scene construction layer;
  • the scene construction layer is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name, and read the scene data corresponding to the scene name from the scene library according to the data source adapter corresponding to the scene name; corresponding to the scene name Process the scene data of the processed scene; send the scene data corresponding to the processed scene name to the business database for storage;
  • the unit test module is used to test the unit to be tested according to the scene data corresponding to the scene name stored in the business database.
  • the above scheme provides a standardized single test scenario management and application system.
  • the scenario construction layer can realize standardized management of unit test scenarios, and the data source adapters of different data source formats in the data source adaptation layer can enable the system to adapt to multiple data source formats and convert them into a unified data format.
  • the unit test module tests the unit to be tested according to the scenario data corresponding to the scenario name stored in the business database to ensure that the independent and lightweight software development kit has no intrusion into the original single test logic.
  • the scene construction layer includes a scene builder, a scene parser, and a data processing link;
  • the scene builder is used to send the scene name sent by the listener to the scene parser;
  • the scene parser is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name, and read from the scene library according to the data source adapter corresponding to the scene name Fetching the scene data corresponding to the scene name, and sending the read scene data corresponding to the scene name to the data processing link;
  • the data processing link is used to process the scene data corresponding to the scene name; and send the processed scene data corresponding to the scene name to the service database for storage.
  • the scene construction layer can make numbers according to different scene names, which makes it easy for single test developers to perform the single test process.
  • Single test developers only need to pay attention to the single test start-run-complete this step, as for the complexity
  • the scenario construction process and scenario rollback process are all automatically completed by the present invention to ensure that single test developers can focus on the correctness of the business logic without being distracted by how to create the required scenario.
  • the system provides a default parser. It also supports developers to customize the parser according to business needs. Improved the flexibility and adaptive ability of the system.
  • the listener is further configured to send a data rollback instruction to the scene construction layer after monitoring that the unit test module has completed the test of the unit under test.
  • the data processing link further includes a data cleaning node
  • the scene construction layer is further configured to perform data rollback on the scene data corresponding to the scene name in the service database through the data cleaning node in the data processing link after receiving the data rollback instruction .
  • the data processing link is composed of a data processing node and a link manager.
  • the system provides multiple default processing nodes. It also supports developers to add custom nodes. At the same time, new processing nodes can be added to realize custom processing.
  • the processing logic is flexible.
  • the data cleaning node performs data rollback on the scene data corresponding to the scene name in the service database through a reverse database operation.
  • the data processing link cleans, filters, fills, converts, and saves the scene data corresponding to the scene name.
  • the save node in the data processing link can save the constructed scene data as an sql file, or directly store the constructed scene data in a designated database.
  • an embodiment of the present invention provides a test method, including:
  • the scene name read the scene data corresponding to the scene name from the scene library, and process the scene data corresponding to the scene name;
  • the unit to be tested is tested according to the scene data corresponding to the scene name after processing.
  • the above solution provides a standardized single-test scenario management and application system. Testing the unit to be tested based on the scenario data corresponding to the processed scenario name can make the system adapt to multiple data source formats and convert them into unified data format.
  • the reading scene data corresponding to the scene name from the scene library according to the scene name includes:
  • the name of the scene that needs to be loaded is obtained through the developer's annotations, and the developer can focus on the correctness of the business logic, so that the process of how to create the required scene is unnecessary, which simplifies the development process and improves development efficiency.
  • processing the scene data corresponding to the scene name includes:
  • the scene data corresponding to the scene name is cleaned, filtered, filled, converted and saved.
  • the method further includes:
  • the data rollback of the scene data corresponding to the scene name in the service database includes:
  • Data rollback is performed on the scene data corresponding to the scene name in the service database through a reverse database operation.
  • the above scheme is different from Spring's transaction-based rollback method.
  • the cleanup node uses reverse operations to restore the database state so that the system supports non-transactional rollback operations so as not to affect the transactions in the business logic.
  • an embodiment of the present invention provides a testing device, including:
  • the processing unit reads the scene data corresponding to the scene name from the scene library according to the scene name, and processes the scene data corresponding to the scene name; according to the processed scene name corresponding to the scene name
  • the scenario data is tested for the unit to be tested.
  • processing unit is specifically configured to:
  • processing unit is specifically configured to:
  • the scene data corresponding to the scene name is cleaned, filtered, filled, converted and saved.
  • processing unit is further specifically configured to:
  • processing unit is further specifically configured to:
  • Data rollback is performed on the scene data corresponding to the scene name in the service database through a reverse database operation.
  • the saving node may directly save the scene data in a designated database, or save the scene data as an sql file and save it in the database.
  • an embodiment of the present invention provides a computer device, including:
  • Memory used to store program instructions
  • the processor is configured to call the program instructions stored in the memory, and execute the method described in the second aspect and any optional method according to the obtained program.
  • an embodiment of the present invention provides a computer-readable non-volatile storage medium, including computer-readable instructions, when the computer reads and executes the computer-readable instructions, the computer is caused to execute the above-mentioned second aspect The method and any optional method.
  • Figure 1 is a schematic diagram of a unit testing system in an embodiment of the present invention
  • Figure 2 is a schematic diagram of a unit testing system in an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a test method in an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a test method in an embodiment of the present invention.
  • Fig. 5 is a schematic diagram of a structure of a unit test device in an embodiment of the present invention.
  • the system includes a listener 100, a scene construction layer 200, a data source adaptation layer 300, a unit test module 400, a business database 500, and a scene library 600.
  • the listener 100 is used to obtain the scene name and send the scene name to the scene construction layer 200.
  • the scene construction layer 200 is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer 300 according to the scene name, and read the scene data corresponding to the scene name from the scene library 600 according to the data source adapter corresponding to the scene name.
  • the scene data corresponding to the scene name is processed, and the scene data corresponding to the processed scene name is sent to the business database for storage.
  • the unit testing module 400 is configured to test the unit to be tested according to the scenario data corresponding to the scenario name stored in the service database 500.
  • the data source adaptation layer 300 is used to provide different data source adapters for the scene construction layer 200, and these different data source adapters can adapt to different data source formats.
  • the scene library 600 is used to provide scene data corresponding to different scene names for the scene construction layer 200.
  • the scene construction layer 200 may include a scene builder, a scene parser, and a data processing link.
  • the scene builder is used to send the scene name sent by the listener to the scene parser.
  • the scene parser is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer 300 according to the scene name, and read the scene data corresponding to the scene name from the scene library 600 according to the data source adapter corresponding to the scene name, and read The scene data corresponding to the acquired scene name is sent to the data processing link.
  • the data processing link is used to process the scene data corresponding to the scene name, and send the scene data corresponding to the processed scene name to the service database 500 for storage.
  • the listener can also send a data rollback instruction to the scene construction layer 200 after the unit test module 400 has finished testing the unit under test, so that the scene construction layer 200 can respond to the business database.
  • 500 performs a rollback operation.
  • the data processing link also includes a data cleaning node. After the scene construction layer 200 receives the data rollback instruction, it can perform data rollback on the scene data corresponding to the scene name in the service database 500 through the data cleaning node in the data processing link.
  • the data processing link cleans, filters, fills, converts and saves the scene data corresponding to the scene name.
  • a unit test system provided by an embodiment of the present invention may have a structure as shown in FIG. 2, where the listener 100 shown in FIG. 1 may be located at the single test monitoring layer, and the scene library shown in FIG. 600 can be located at the scene library layer.
  • the single test monitoring layer contains a listener, which is responsible for monitoring the execution and termination of the single test case of the business developer.
  • the implementation of the listener is based on the listening interface of the Spring framework, supports the native listening service of the Spring framework, and also supports the developer's custom listening service to achieve personalized functions.
  • the listener will entrust the scene construction layer to construct the scene data needed to run the single test; after detecting the completion of the single test execution, the listener will again entrust the scene construction layer to roll back the scene data to The state before the start of the single test.
  • the scene construction layer is responsible for accepting the delegate of the listener to construct the scene required by the developer or roll back the scene data. After the scene builder receives the commission to construct the scene from the listener, it sends the scene name to the scene parser, and the scene parser determines from which data source to obtain the data needed to construct the scene and entrusts the corresponding data source adapter to read the data .
  • the framework provides a default parser, and also supports developers to customize the parser according to business needs.
  • the data processing link consists of a series of data processing nodes and a link manager, responsible for performing necessary processing on the acquired scene data, including data cleaning, filtering, filling, conversion, and saving.
  • the framework provides multiple default processing nodes, and also supports developers to add custom nodes. Among them, after the single test is completed, the cleaning node is responsible for restoring the database to the state before the single test started. Unlike the transaction-based rollback method of the Spring framework, the cleanup node uses a "reverse operation" method to restore the database state. There are two saving strategies for saving nodes. One is to save the constructed scene data as sql files. This strategy is suitable for importing the data into the test environment in the cluster after the local development environment; the other is to directly construct The scene is saved in the specified database, and the framework uses the JFinal framework to realize database interaction. At the same time, the framework provides support for a variety of databases, including H2 memory database, mysql (relational database management system) and so on.
  • the data source adaptation layer is responsible for adapting various data source formats, and provides a consistent data format for the scene construction layer.
  • Excel Adapter Adapter
  • Bean Adapter is suitable for handling scenes when the scene library is maintained in the developer's source code
  • CSV Adapter is suitable for handling when the scene library is maintained as csv Format file scene. If developers have special needs, such as processing data sources in xml or json format, the framework also allows developers to add customized data source adapters.
  • the role of the scene library layer is to impose a strong constraint on the business developer's scene library, requiring the business developer to maintain the single test scene data in a unified place to achieve the purpose of standardized management.
  • the framework maintains single test scenarios in excel files by default.
  • the advantage is that excel has better visualization and editability, and non-technical developers can also maintain it.
  • FIG. 3 exemplarily shows the flow of a test method provided by an embodiment of the present invention. This process can be executed by the aforementioned unit test system.
  • the process specifically includes:
  • Step 301 Obtain the scene name.
  • the name of the scene that needs to be loaded is obtained through the comments of the developer; and the obtained scene name is sent to the scene builder.
  • the scene builder constructs different scenes for different scene names. For example, taking the loan core system as an example, suppose the business developer wants to test whether the data in the personal center is correct when the borrower has an overdue loan. The scene name obtained at this time is "single-user bill overdue", and the scene builder selects different data source adapters according to this name to construct a suitable scene, thereby improving the adaptability of the system.
  • Step 302 According to the scene name, read the scene data corresponding to the scene name from the scene library, and process the scene data corresponding to the scene name.
  • the data processing link cleans, filters, fills, converts, and saves the scene data corresponding to the scene name.
  • the data processing link is divided into multiple processing nodes, and the scene data is cleaned, filtered, filled, converted, saved, and so on.
  • the listener is based on the spring monitoring interface, supports spring's native monitoring service, and also supports the monitoring service set by the developer.
  • the scene parser can be the default and also supports developer settings.
  • the data processing link includes a string of data processing nodes and a link manager.
  • the data processing node can be the default or it can be added by the developer.
  • the scene parser maintains the excel based on the scene data detected, so the scene meta information is passed to the excel data source adapter, and the excel data source adapter is responsible for loading the "overdue" from the excel file
  • the next step is to forward the scene data to the data processing link. After the data is filled by the link, the scene data is converted into SQL statements and inserted into the business database. This completes the scene construction process.
  • Step 303 Test the unit to be tested according to the scene data corresponding to the scene name after processing, and roll back the database after the execution of the single test is completed.
  • the listener is further configured to send a data rollback instruction to the scene construction layer after monitoring that the unit test module has completed the test of the unit under test;
  • the scene construction layer After receiving the data rollback instruction, the scene construction layer performs data rollback on the scene data corresponding to the scene name in the business database through the data cleaning node in the data processing link.
  • the data cleaning node performs data rollback on the scene data corresponding to the scene name in the business database through a reverse database operation.
  • the save node can directly save the scene data to the specified database, or save the scene data as an sql file and save it in the database.
  • the database can use JFinal to achieve interaction; the database includes H2 memory database, mysql, etc.
  • the single test execution monitor of the present invention detects the start of the single test, and first extracts the scene name from the comment of the single test method. For example, in this example, the scene name is "single user bill overdue ", after the listener passes the scene name to the scene builder, the scene builder recognizes the name and informs the default scene parser to resolve the scene name according to the default configuration.
  • the scene parser root detects that the scene data is maintained in the data source excel, so the scene meta information is passed to the excel data source adapter, and the excel data source adapter is responsible for loading the "overdue" scene data from the excel file.
  • the scene data is forwarded to the data processing link. After the link fills in the data as necessary, the scene data is converted into SQL statements and inserted into the business database. This completes the scene construction process.
  • the listener After the single test runs, when the listener detects that the single test method exits, it will issue an instruction to notify the scene builder to roll back the data.
  • the scene builder entrusts the task to the data cleaning node in the data processing link, and the cleaning node completes the database recovery by executing a reverse SQL operation.
  • the single test developer needs to pay attention to the single test start-run-complete this step.
  • the complex scene construction process and the scene rollback process it is guaranteed by the present invention to complete automatically Single test developers can focus on the correctness of the business logic, without being distracted by how to create the required scenarios and how to roll back the single test site.
  • FIG. 5 exemplarily shows that an embodiment of the present invention provides a testing device, which can execute the foregoing testing process.
  • the device may include:
  • the obtaining unit 501 obtains the scene name
  • the processing unit 502 is configured to read the scene data corresponding to the scene name from the scene library according to the scene name, and process the scene data corresponding to the scene name; according to the processed scene The scene data corresponding to the name is tested for the unit to be tested.
  • processing unit 502 is specifically configured to:
  • processing unit 502 is specifically configured to:
  • the scene data corresponding to the scene name is cleaned, filtered, filled, converted and saved.
  • processing unit 502 is further specifically configured to:
  • processing unit 502 is further specifically configured to:
  • Data rollback is performed on the scene data corresponding to the scene name in the service database through a reverse database operation.
  • the database can use JFinal to realize interaction;
  • the database includes H2 memory database, mysql, etc.
  • the saving node may directly save the scene data in a designated database, or save the scene data as an sql file and save it in the database.
  • an embodiment of the present invention provides a computer device, including:
  • Memory used to store program instructions
  • the processor is configured to call the program instructions stored in the memory and execute the above-mentioned test method according to the obtained program.
  • the embodiments of the present invention provide a computer-readable non-volatile storage medium, including computer-readable instructions, and when the computer reads and executes the computer-readable instructions, the computer executes the above-mentioned test method.
  • the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • the present invention is described with reference to flowcharts and/or block diagrams of the method, equipment (system), and computer program product according to the present invention.
  • each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions.
  • These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment can be generated It is a device that realizes the functions specified in one process or multiple blocks in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a unit testing system and a unit testing method. The system comprises a monitor, a scenario construction layer, a data source adaptation layer, a unit testing module, a service database and a scenario library, wherein the scenario construction layer can realize standardized management of a unit testing scenario, and a data source adapter of different data source formats in the data source adaptation layer can enable a system to adapt to multiple data source formats and convert same into a unified data format. Therefore, the problem in the prior art that a single testing scenario cannot be standardized and cannot adapt to multiple data source formats is solved. The unit testing module tests a unit to be tested according to scenario data corresponding to a scenario name stored in the service database, thereby ensuring that an independent and lightweight software development kit will not intrude on original single testing logic.

Description

一种单元测试系统及测试方法Unit testing system and testing method
相关申请的交叉引用Cross references to related applications
本申请要求在2019年06月28日提交中国专利局、申请号为201910580506.7、申请名称为“一种单元测试系统及测试方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on June 28, 2019, the application number is 201910580506.7, and the application name is "a unit test system and test method", the entire content of which is incorporated into this application by reference in.
技术领域Technical field
本发明涉及单元测试技术领域,尤其涉及一种单元测试系统及测试方法。The invention relates to the technical field of unit testing, in particular to a unit testing system and a testing method.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(如大数据、分布式、区块链(Blockchain)、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,单元测试技术也不例外,但由于金融、支付行业的安全性、实时性要求,也对技术提出的更高的要求。With the development of computer technology, more and more technologies (such as big data, distributed, Blockchain, artificial intelligence, etc.) are applied in the financial field. The traditional financial industry is gradually changing to Fintech. Unit testing technology is no exception, but due to the security and real-time requirements of the financial and payment industries, it also places higher requirements on technology.
目前一个典型的单元测试过程可以分为以下步骤:A typical unit testing process can be divided into the following steps:
数据加载、单测场景初始化:该步骤用于从数据源加载业务数据,构造需要的业务场景。Data loading and single test scenario initialization: This step is used to load business data from the data source and construct the required business scenario.
执行待测业务逻辑:实际要被测试的代码逻辑。Execute business logic to be tested: the actual code logic to be tested.
断言测试:验证业务逻辑的返回结果是否正确。Assertion test: verify whether the returned result of the business logic is correct.
事务回滚:恢复到本次单测开始前的数据环境,供下一个单测案例使用。Transaction rollback: restore to the data environment before the start of this single test for use in the next single test case.
现有技术单测过程主要存在以下不足:The existing technology single test process mainly has the following shortcomings:
1、对数据加载的支持不足。数据的来源可能包括Excel文件,csv文件,JPA对象等,这些不同数据源间的差异都需要开发者在业务代码中做适配,造成的后果不仅是业务逻辑与文件处理逻辑混杂在一块,并且会代码冗余度高,不同开发者所编写的文件处理逻辑可能不一致,进而又降低代码的规范性。1. Insufficient support for data loading. Data sources may include Excel files, csv files, JPA objects, etc. The differences between these different data sources require developers to adapt in the business code. The consequence is not only that business logic and file processing logic are mixed together, but also The code redundancy is high, and the file processing logic written by different developers may be inconsistent, which in turn reduces the standardization of the code.
2、单测场景的管理。单测过程缺少对单测场景的规范化管理,单测场景 的规范化取决于开发者的自觉性。2. Management of single test scenarios. The single test process lacks standardized management of single test scenarios, and the standardization of single test scenarios depends on the developer's consciousness.
发明内容Summary of the invention
本发明实施例提供一种单元测试系统及测试方法,用以解决现有技术中单测场景无法规范化、无法适配多种数据源格式的问题。The embodiment of the present invention provides a unit test system and a test method to solve the problem that the single test scenario in the prior art cannot be standardized and cannot be adapted to multiple data source formats.
第一方面,本发明实施例提供一种单元测试系统,包括监听器、场景构造层、数据源适配层、单元测试模块、业务数据库以及场景库;In the first aspect, an embodiment of the present invention provides a unit test system, including a listener, a scene construction layer, a data source adaptation layer, a unit test module, a business database, and a scene library;
监听器用于获取场景名称,并将所述场景名称发送至场景构造层;The listener is used to obtain the scene name and send the scene name to the scene construction layer;
场景构造层用于根据场景名称从数据源适配层中确定场景名称对应的数据源适配器,并根据场景名称对应的数据源适配器从场景库中读取场景名称对应的场景数据;对场景名称对应的场景数据进行加工处理;将加工处理后的场景名称对应的场景数据发送给业务数据库进行存储;The scene construction layer is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name, and read the scene data corresponding to the scene name from the scene library according to the data source adapter corresponding to the scene name; corresponding to the scene name Process the scene data of the processed scene; send the scene data corresponding to the processed scene name to the business database for storage;
单元测试模块用于根据业务数据库中存储的场景名称对应的场景数据,对待测单元进行测试。The unit test module is used to test the unit to be tested according to the scene data corresponding to the scene name stored in the business database.
上述方案,提供了一个规范化的单测场景管理及应用系统。场景构造层可以实现对单元测试场景的规范化管理,数据源适配层中的不同数据源格式的数据源适配器可以使得系统能够适配多种数据源格式,并将其转化成统一的数据格式。从而解决现有技术中单测场景无法规范化、无法适配多种数据源格式的问题。单元测试模块根据业务数据库中存储的场景名称对应的场景数据对待测单元进行测试保证了独立、轻量的软件开发工具包对原单测逻辑无侵入。The above scheme provides a standardized single test scenario management and application system. The scenario construction layer can realize standardized management of unit test scenarios, and the data source adapters of different data source formats in the data source adaptation layer can enable the system to adapt to multiple data source formats and convert them into a unified data format. This solves the problem that the single test scenario in the prior art cannot be standardized and cannot adapt to multiple data source formats. The unit test module tests the unit to be tested according to the scenario data corresponding to the scenario name stored in the business database to ensure that the independent and lightweight software development kit has no intrusion into the original single test logic.
可选的,所述场景构造层包括场景构造器、场景解析器和数据加工链路;Optionally, the scene construction layer includes a scene builder, a scene parser, and a data processing link;
所述场景构造器用于将所述监听器发送的所述场景名称发送给所述场景解析器;The scene builder is used to send the scene name sent by the listener to the scene parser;
所述场景解析器用于根据所述场景名称,从所述数据源适配层中确定所述场景名称对应的数据源适配器,并根据所述场景名称对应的数据源适配器从所述场景库中读取所述场景名称对应的场景数据,将读取到的所述场景名 称对应的场景数据发送给所述数据加工链路;The scene parser is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name, and read from the scene library according to the data source adapter corresponding to the scene name Fetching the scene data corresponding to the scene name, and sending the read scene data corresponding to the scene name to the data processing link;
所述数据加工链路用于对所述场景名称对应的场景数据进行加工处理;并将加工处理后的所述场景名称对应的场景数据发送给所述业务数据库进行存储。The data processing link is used to process the scene data corresponding to the scene name; and send the processed scene data corresponding to the scene name to the service database for storage.
上述方案,场景构造层可根据不同的场景名称进行造数使得单测开发者在进行单测过程时操作简便,单测开发者需要关注的仅仅是单测启动-运行-完成这个步骤,至于复杂的场景构造过程和场景回滚过程全部由本发明自动完成以此保证单测开发者可以聚焦于业务逻辑的正确性,无需分心于如何创建所需的场景其中系统提供了一个默认的解析器,同时也支持开发者根据业务需要自定义解析器。提高了系统的灵活性和自适应能力。In the above scheme, the scene construction layer can make numbers according to different scene names, which makes it easy for single test developers to perform the single test process. Single test developers only need to pay attention to the single test start-run-complete this step, as for the complexity The scenario construction process and scenario rollback process are all automatically completed by the present invention to ensure that single test developers can focus on the correctness of the business logic without being distracted by how to create the required scenario. The system provides a default parser. It also supports developers to customize the parser according to business needs. Improved the flexibility and adaptive ability of the system.
可选的,所述监听器还用于在监听到所述单元测试模块对所述待测单元测试完成后,向所述场景构造层发送数据回滚指令。Optionally, the listener is further configured to send a data rollback instruction to the scene construction layer after monitoring that the unit test module has completed the test of the unit under test.
上述方案,在单测完成后回滚数据库使得系统支持非事务型的回滚操作,从而不影响业务逻辑中的事务。In the above scheme, rolling back the database after the single test is completed enables the system to support non-transactional rollback operations, thereby not affecting the transactions in the business logic.
可选的,所述数据加工链路还包括数据清理节点;Optionally, the data processing link further includes a data cleaning node;
所述场景构造层还用于在接收到所述数据回滚指令后,通过所述数据加工链路中的数据清理节点对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。The scene construction layer is further configured to perform data rollback on the scene data corresponding to the scene name in the service database through the data cleaning node in the data processing link after receiving the data rollback instruction .
上述方案,数据加工链路由数据加工节点和链路管理器组成,系统提供了多个默认的加工节点,也支持开发者添加自定义的节点,同时可以增加新的加工节点,实现自定义的加工逻辑,具有灵活性。In the above scheme, the data processing link is composed of a data processing node and a link manager. The system provides multiple default processing nodes. It also supports developers to add custom nodes. At the same time, new processing nodes can be added to realize custom processing. The processing logic is flexible.
可选的,所述数据清理节点通过逆向数据库操作对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。Optionally, the data cleaning node performs data rollback on the scene data corresponding to the scene name in the service database through a reverse database operation.
上述方案,由于不使用spring的事务注解实现类似的事务功能,清理节点采用逆向操作的方式来恢复数据库状态,使得系统支持非事务型的回滚操作,从而不影响业务逻辑中的事务。The above solution does not use spring transaction annotations to achieve similar transaction functions, and the cleanup node uses reverse operations to restore the database state, so that the system supports non-transactional rollback operations, which does not affect the transactions in the business logic.
可选的,所述数据加工链路对所述场景名称对应的场景数据进行清理、 过滤、填充、转换和保存。Optionally, the data processing link cleans, filters, fills, converts, and saves the scene data corresponding to the scene name.
需要说明的是,数据加工链路中的保存节点可以将构造的场景数据保存为sql文件,也可直接将构造的场景数据保存到指定的数据库中。It should be noted that the save node in the data processing link can save the constructed scene data as an sql file, or directly store the constructed scene data in a designated database.
第二方面,本发明实施例提供一种测试方法,包括:In the second aspect, an embodiment of the present invention provides a test method, including:
获取场景名称;Get the scene name;
根据所述场景名称,从场景库中读取所述场景名称对应的场景数据,对所述场景名称对应的场景数据进行加工处理;According to the scene name, read the scene data corresponding to the scene name from the scene library, and process the scene data corresponding to the scene name;
根据加工处理后的所述场景名称对应的场景数据对待测单元进行测试。The unit to be tested is tested according to the scene data corresponding to the scene name after processing.
上述方案,提供了一个规范化的单测场景管理及应用系统,根据加工处理后的场景名称对应的场景数据对待测单元进行测试能够使得系统适配多种数据源格式并将其转化成统一的数据格式。The above solution provides a standardized single-test scenario management and application system. Testing the unit to be tested based on the scenario data corresponding to the processed scenario name can make the system adapt to multiple data source formats and convert them into unified data format.
可选的,所述根据所述场景名称,从所述场景库中读取所述场景名称对应的场景数据,包括:Optionally, the reading scene data corresponding to the scene name from the scene library according to the scene name includes:
根据所述场景名称从数据源适配层中确定所述场景名称对应的数据源适配器;Determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name;
根据所述场景名称对应的数据源适配器从所述场景库中读取所述场景名称对应的场景数据。Read the scene data corresponding to the scene name from the scene library according to the data source adapter corresponding to the scene name.
上述方案,通过开发者的注解获取需要加载的场景名称,开发者可以聚焦于业务逻辑的正确性,从而不必考虑如何创建所需场景的过程,简化了开发过程提高了开发效率。In the above solution, the name of the scene that needs to be loaded is obtained through the developer's annotations, and the developer can focus on the correctness of the business logic, so that the process of how to create the required scene is unnecessary, which simplifies the development process and improves development efficiency.
可选的,所述对所述场景名称对应的场景数据进行加工处理,包括:Optionally, the processing the scene data corresponding to the scene name includes:
对所述场景名称对应的场景数据进行清理、过滤、填充、转换和保存。The scene data corresponding to the scene name is cleaned, filtered, filled, converted and saved.
上述方案,针对不同的场景名称选择不同的场景解析器,将不同格式的数据通过数据源适配器统一成同一格式,使得系统可以扩展新的数据源格式并具有很高的灵活性。系统可以自适应的配合多种场景,从而开发者无需花费更多的精力在如何创建所需场景的过程中。In the above solution, different scene parsers are selected for different scene names, and data in different formats are unified into the same format through the data source adapter, so that the system can expand new data source formats and has high flexibility. The system can adapt to a variety of scenarios, so that developers do not need to spend more energy in the process of how to create the desired scenario.
可选的,在所述根据加工处理后的所述场景名称对应的场景数据对待测 单元进行测试之后,还包括:Optionally, after the process of testing the unit to be tested according to the scene data corresponding to the scene name after processing, the method further includes:
在确定对所述待测单元测试完成时,对业务数据库中的所述场景名称对应的场景数据进行数据回滚。When it is determined that the test of the unit to be tested is completed, data rollback is performed on the scene data corresponding to the scene name in the service database.
上述方案,在单测完成后回滚数据库使得系统支持非事务型的回滚操作,从而不影响业务逻辑中的事务。In the above scheme, rolling back the database after the single test is completed enables the system to support non-transactional rollback operations, thereby not affecting the transactions in the business logic.
可选的所述对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚,包括:Optionally, the data rollback of the scene data corresponding to the scene name in the service database includes:
通过逆向数据库操作对业务数据库中的所述场景名称对应的场景数据进行数据回滚。Data rollback is performed on the scene data corresponding to the scene name in the service database through a reverse database operation.
上述方案,不同于Spring基于事务的回滚方式,清理节点采用执行逆向操作的方式来恢复数据库状态使得系统支持非事务型回滚操作从而不影响业务逻辑中的事务。The above scheme is different from Spring's transaction-based rollback method. The cleanup node uses reverse operations to restore the database state so that the system supports non-transactional rollback operations so as not to affect the transactions in the business logic.
第三方面,本发明实施例提供一种测试装置,包括:In a third aspect, an embodiment of the present invention provides a testing device, including:
获取单元,获取场景名称;Get the unit, get the scene name;
处理单元,根据所述场景名称,从所述场景库中读取所述场景名称对应的场景数据,对所述场景名称对应的场景数据进行加工处理;根据加工处理后的所述场景名称对应的场景数据对待测单元进行测试。The processing unit reads the scene data corresponding to the scene name from the scene library according to the scene name, and processes the scene data corresponding to the scene name; according to the processed scene name corresponding to the scene name The scenario data is tested for the unit to be tested.
可选的,所述处理单元具体用于:Optionally, the processing unit is specifically configured to:
根据所述场景名称从所述数据源适配层中确定所述场景名称对应的数据源适配器;Determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name;
根据所述场景名称对应的数据源适配器从所述场景库中读取所述场景名称对应的场景数据。Read the scene data corresponding to the scene name from the scene library according to the data source adapter corresponding to the scene name.
可选的,所述处理单元具体用于:Optionally, the processing unit is specifically configured to:
对所述场景名称对应的场景数据进行清理、过滤、填充、转换和保存。The scene data corresponding to the scene name is cleaned, filtered, filled, converted and saved.
可选的,所述处理单元还具体用于:Optionally, the processing unit is further specifically configured to:
在确定对所述待测单元测试完成时,对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。When it is determined that the test of the unit to be tested is completed, data rollback is performed on the scene data corresponding to the scene name in the service database.
可选的,所述处理单元还具体用于:Optionally, the processing unit is further specifically configured to:
通过逆向数据库操作对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。Data rollback is performed on the scene data corresponding to the scene name in the service database through a reverse database operation.
所述保存节点可直接将所述场景数据保存到指定的数据库中,也可将所述场景数据保存为sql文件并将其保存到数据库中。The saving node may directly save the scene data in a designated database, or save the scene data as an sql file and save it in the database.
第四方面,本发明实施例提供一种计算机设备,包括:In a fourth aspect, an embodiment of the present invention provides a computer device, including:
存储器,用于存储程序指令;Memory, used to store program instructions;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述第二方面所述的方法及任一可选方法。The processor is configured to call the program instructions stored in the memory, and execute the method described in the second aspect and any optional method according to the obtained program.
第五方面,本发明实施例提供一种计算机可读非易失性存储介质,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行上述第二方面所述的方法及任一可选方法。In a fifth aspect, an embodiment of the present invention provides a computer-readable non-volatile storage medium, including computer-readable instructions, when the computer reads and executes the computer-readable instructions, the computer is caused to execute the above-mentioned second aspect The method and any optional method.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings may be obtained from these drawings without creative labor.
图1为本发明实施例中一种单元测试系统的示意图;Figure 1 is a schematic diagram of a unit testing system in an embodiment of the present invention;
图2为本发明实施例中一种单元测试系统的示意图;Figure 2 is a schematic diagram of a unit testing system in an embodiment of the present invention;
图3为本发明实施例中一种测试方法的流程示意图;FIG. 3 is a schematic flowchart of a test method in an embodiment of the present invention;
图4为本发明实施例中一种测试方法的流程示意图;FIG. 4 is a schematic flowchart of a test method in an embodiment of the present invention;
图5为本发明实施例中一种单元测试的装置的结构示意图。Fig. 5 is a schematic diagram of a structure of a unit test device in an embodiment of the present invention.
具体实施方式Detailed ways
为了更好的理解上述技术方案,下面将结合说明书附图及具体的实施方式对上述技术方案进行详细的说明,应当理解本发明实施例以及实施例中的 具体特征是对本发明技术方案的详细的说明,而不是对本发明技术方案的限定,在不冲突的情况下,本发明实施例以及实施例中的技术特征可以相互结合。In order to better understand the above technical solutions, the above technical solutions will be described in detail below in conjunction with the drawings and specific implementations of the specification. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed in the technical solutions of the present invention. Note, rather than limiting the technical solution of the present invention, the embodiments of the present invention and the technical features in the embodiments can be combined with each other if there is no conflict.
图1为本发明实施例提供的一种单元测试系统的示意图,该系统包括监听器100、场景构造层200、数据源适配层300、单元测试模块400、业务数据库500以及场景库600。1 is a schematic diagram of a unit test system provided by an embodiment of the present invention. The system includes a listener 100, a scene construction layer 200, a data source adaptation layer 300, a unit test module 400, a business database 500, and a scene library 600.
监听器100用于获取场景名称,并将场景名称发送至场景构造层200。The listener 100 is used to obtain the scene name and send the scene name to the scene construction layer 200.
场景构造层200用于根据场景名称从数据源适配层300中确定场景名称对应的数据源适配器,并根据场景名称对应的数据源适配器从场景库600中读取场景名称对应的场景数据,对场景名称对应的场景数据进行加工处理,将加工处理后的场景名称对应的场景数据发送给业务数据库进行存储。The scene construction layer 200 is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer 300 according to the scene name, and read the scene data corresponding to the scene name from the scene library 600 according to the data source adapter corresponding to the scene name. The scene data corresponding to the scene name is processed, and the scene data corresponding to the processed scene name is sent to the business database for storage.
单元测试模块400用于根据业务数据库500中存储的场景名称对应的场景数据,对待测单元进行测试。The unit testing module 400 is configured to test the unit to be tested according to the scenario data corresponding to the scenario name stored in the service database 500.
数据源适配层300用于为场景构造层200提供不同的数据源适配器,这些不同的数据源适配器可以适配不同数据源格式。The data source adaptation layer 300 is used to provide different data source adapters for the scene construction layer 200, and these different data source adapters can adapt to different data source formats.
场景库600用于为场景构造层200提供不同场景名称对应的场景数据。The scene library 600 is used to provide scene data corresponding to different scene names for the scene construction layer 200.
具体的,场景构造层200可以包括场景构造器、场景解析器和数据加工链路。其中,场景构造器用于将监听器发送的场景名称发送给场景解析器。场景解析器用于根据场景名称,从数据源适配层300中确定场景名称对应的数据源适配器,并根据场景名称对应的数据源适配器从场景库600中读取场景名称对应的场景数据,将读取到的场景名称对应的场景数据发送给数据加工链路。数据加工链路用于对场景名称对应的场景数据进行加工处理,并将加工处理后的场景名称对应的场景数据发送给业务数据库500进行存储。Specifically, the scene construction layer 200 may include a scene builder, a scene parser, and a data processing link. Among them, the scene builder is used to send the scene name sent by the listener to the scene parser. The scene parser is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer 300 according to the scene name, and read the scene data corresponding to the scene name from the scene library 600 according to the data source adapter corresponding to the scene name, and read The scene data corresponding to the acquired scene name is sent to the data processing link. The data processing link is used to process the scene data corresponding to the scene name, and send the scene data corresponding to the processed scene name to the service database 500 for storage.
当单元测试模块400对待测单元测试完成之后,监听器还可以在监听到单元测试模块400对待测单元测试完成后,向场景构造层200发送数据回滚指令,以使场景构造层200对业务数据库500进行回滚操作。具体的,数据加工链路还包括数据清理节点。场景构造层200在接收到数据回滚指令后, 可以通过数据加工链路中的数据清理节点对业务数据库500中的场景名称对应的场景数据进行数据回滚。After the unit test module 400 has completed the unit test under test, the listener can also send a data rollback instruction to the scene construction layer 200 after the unit test module 400 has finished testing the unit under test, so that the scene construction layer 200 can respond to the business database. 500 performs a rollback operation. Specifically, the data processing link also includes a data cleaning node. After the scene construction layer 200 receives the data rollback instruction, it can perform data rollback on the scene data corresponding to the scene name in the service database 500 through the data cleaning node in the data processing link.
进一步的,数据加工链路对所述场景名称对应的场景数据进行清理、过滤、填充、转换和保存。Further, the data processing link cleans, filters, fills, converts and saves the scene data corresponding to the scene name.
为此,本发明实施例提供的一种单元测试系统,其结构可以如图2所示,其中,图1中所示的监听器100可以位于单测监听层,图1中所示的场景库600可以位于场景库层。To this end, a unit test system provided by an embodiment of the present invention may have a structure as shown in FIG. 2, where the listener 100 shown in FIG. 1 may be located at the single test monitoring layer, and the scene library shown in FIG. 600 can be located at the scene library layer.
如图2所示,单测监听层包含一个监听器,负责监听业务开发者的单测案例的执行和终止。监听器的实现是基于Spring框架的监听接口,支持Spring框架的原生监听服务,同时也支持开发者自定义监听服务实现个性化功能。在检测到单测案例开始执行时,监听器会委托场景构造层构造运行单测所需要的场景数据;检测到单测执行完成后,监听器会再次委托场景构造层将场景数据回滚恢复到单测开始前的状态。As shown in Figure 2, the single test monitoring layer contains a listener, which is responsible for monitoring the execution and termination of the single test case of the business developer. The implementation of the listener is based on the listening interface of the Spring framework, supports the native listening service of the Spring framework, and also supports the developer's custom listening service to achieve personalized functions. When the single test case is detected to start execution, the listener will entrust the scene construction layer to construct the scene data needed to run the single test; after detecting the completion of the single test execution, the listener will again entrust the scene construction layer to roll back the scene data to The state before the start of the single test.
场景构造层负责接受监听器的委托来构造出开发者需要的场景或者回滚场景数据。场景构造器从监听器接收到构造场景的委托后,将场景名称送给场景解析器,由场景解析器判断要从哪个数据源获取构造场景所需的数据并委托相应的数据源适配器读取数据。框架提供了一个默认的解析器,同时也支持开发者根据业务需要自定义解析器。数据加工链路由一串数据加工节点和一个链路管理器组成,负责对获取到的场景数据执行必要的加工,包括数据的清理、过滤、填充、转换、保存等。同样地,框架提供了多个默认的加工节点,也支持开发者添加自定义的节点。其中,在单测完成后,清理节点负责将数据库恢复到单测开始前的状态。与Spring框架这种基于事务的回滚方式不同,清理节点采用执行“逆向操作”的方式来恢复数据库状态。保存节点有两种保存策略,一种是将构造的场景数据保存为sql文件,这种策略适用于在本地开发环境造数后,导入集群中的测试环境;另一种策略是直接将构造的场景保存到指定的数据库中,框架采用JFinal框架来实现数据库交互。同时,框架对多种数据库提供了支持,包括H2内存数据库,mysql(关系型数 据库管理系统)等。The scene construction layer is responsible for accepting the delegate of the listener to construct the scene required by the developer or roll back the scene data. After the scene builder receives the commission to construct the scene from the listener, it sends the scene name to the scene parser, and the scene parser determines from which data source to obtain the data needed to construct the scene and entrusts the corresponding data source adapter to read the data . The framework provides a default parser, and also supports developers to customize the parser according to business needs. The data processing link consists of a series of data processing nodes and a link manager, responsible for performing necessary processing on the acquired scene data, including data cleaning, filtering, filling, conversion, and saving. Similarly, the framework provides multiple default processing nodes, and also supports developers to add custom nodes. Among them, after the single test is completed, the cleaning node is responsible for restoring the database to the state before the single test started. Unlike the transaction-based rollback method of the Spring framework, the cleanup node uses a "reverse operation" method to restore the database state. There are two saving strategies for saving nodes. One is to save the constructed scene data as sql files. This strategy is suitable for importing the data into the test environment in the cluster after the local development environment; the other is to directly construct The scene is saved in the specified database, and the framework uses the JFinal framework to realize database interaction. At the same time, the framework provides support for a variety of databases, including H2 memory database, mysql (relational database management system) and so on.
数据源适配层负责适配各种不同的数据源格式,为场景构造层提供格式一致的数据格式。例如,Excel Adapter(适配器)适合处理当场景库是维护在excel中的场景,Bean Adapter适合处理当场景库维护在开发者的源代码中的场景,CSV Adapter则适合处理当场景库是维护成csv格式文件的场景。如果开发者有特别的需要,如需要处理xml或者json格式的数据源,框架同样允许开发者添加定制化的数据源适配器。The data source adaptation layer is responsible for adapting various data source formats, and provides a consistent data format for the scene construction layer. For example, Excel Adapter (Adapter) is suitable for handling scenes when the scene library is maintained in excel, Bean Adapter is suitable for handling scenes when the scene library is maintained in the developer's source code, and CSV Adapter is suitable for handling when the scene library is maintained as csv Format file scene. If developers have special needs, such as processing data sources in xml or json format, the framework also allows developers to add customized data source adapters.
场景库层的作用是对业务开发者的场景库施加一个强约束,要求业务开发者将单测场景数据维护在一个统一的地方,以达到规范化管理的目的。例如,框架默认将单测场景维护在excel文件中,优点在于excel的可视化、可编辑性比较好,非技术开发人员也有能力维护。The role of the scene library layer is to impose a strong constraint on the business developer's scene library, requiring the business developer to maintain the single test scene data in a unified place to achieve the purpose of standardized management. For example, the framework maintains single test scenarios in excel files by default. The advantage is that excel has better visualization and editability, and non-technical developers can also maintain it.
基于上述单元测试系统,图3示例性的示出了本发明实施例提供的一种测试方法的流程。该流程可以由上述单元测试系统执行。Based on the above unit test system, FIG. 3 exemplarily shows the flow of a test method provided by an embodiment of the present invention. This process can be executed by the aforementioned unit test system.
如图3所示,该流程具体包括:As shown in Figure 3, the process specifically includes:
步骤301,获取场景名称。Step 301: Obtain the scene name.
具体的,检测到单测开始执行时,通过开发者的注解获取需要加载的所述场景名称;将获取到的所述场景名称发送给所述场景构造器。Specifically, when the execution of the single test is detected, the name of the scene that needs to be loaded is obtained through the comments of the developer; and the obtained scene name is sent to the scene builder.
需要说明的是,场景构造器针对不同的场景名称构造不同的场景,比如以贷款核心系统为例,假设业务开发者想测试当借款者有一笔贷款借据逾期时个人中心的各项数据是否正确,此时获取到的场景名称为“单用户单借据逾期”,场景构造器根据此名称选择不同的数据源适配器等来构造合适的场景从而提高了系统的自适应性。It should be noted that the scene builder constructs different scenes for different scene names. For example, taking the loan core system as an example, suppose the business developer wants to test whether the data in the personal center is correct when the borrower has an overdue loan. The scene name obtained at this time is "single-user bill overdue", and the scene builder selects different data source adapters according to this name to construct a suitable scene, thereby improving the adaptability of the system.
步骤302,根据所述场景名称,从所述场景库中读取所述场景名称对应的场景数据,对所述场景名称对应的场景数据进行加工处理。Step 302: According to the scene name, read the scene data corresponding to the scene name from the scene library, and process the scene data corresponding to the scene name.
具体的,所述数据加工链路对所述场景名称对应的场景数据进行清理、过滤、填充、转换和保存。Specifically, the data processing link cleans, filters, fills, converts, and saves the scene data corresponding to the scene name.
具体的,所述数据加工链路分为多个加工节点,对所述场景数据进行清 理、过滤、填充、转换、保存等。Specifically, the data processing link is divided into multiple processing nodes, and the scene data is cleaned, filtered, filled, converted, saved, and so on.
需要说明的是,监听器基于spring的监听接口,支持spring的原生监听服务,同时也支持开发者设置的监听服务。场景解析器可以为默认,也支持开发者设置。数据加工链路包括一串数据加工节点和一个链路管理器。数据加工节点可以为默认,也可由开发者设置添加。比如同样以贷款核心系统为例,场景解析器根据检测到场景数据维护在excel中,因此将场景元信息传递给excel数据源适配器,由excel数据源适配器负责从excel文件中加载出“逾期”的场景数据,下一步则将场景数据转发给数据加工链路,由链路对数据做必要的填充之后,将场景数据转换成sql语句并插入业务数据库中。到此完成场景的构建过程。It should be noted that the listener is based on the spring monitoring interface, supports spring's native monitoring service, and also supports the monitoring service set by the developer. The scene parser can be the default and also supports developer settings. The data processing link includes a string of data processing nodes and a link manager. The data processing node can be the default or it can be added by the developer. For example, taking the loan core system as an example, the scene parser maintains the excel based on the scene data detected, so the scene meta information is passed to the excel data source adapter, and the excel data source adapter is responsible for loading the "overdue" from the excel file For the scene data, the next step is to forward the scene data to the data processing link. After the data is filled by the link, the scene data is converted into SQL statements and inserted into the business database. This completes the scene construction process.
步骤303,根据加工处理后的所述场景名称对应的场景数据对待测单元进行测试,单测执行完成后回滚数据库。Step 303: Test the unit to be tested according to the scene data corresponding to the scene name after processing, and roll back the database after the execution of the single test is completed.
具体的,监听器还用于在监听到所述单元测试模块对所述待测单元测试完成后,向所述场景构造层发送数据回滚指令;Specifically, the listener is further configured to send a data rollback instruction to the scene construction layer after monitoring that the unit test module has completed the test of the unit under test;
场景构造层在接收到数据回滚指令后,通过数据加工链路中的数据清理节点对业务数据库中的场景名称对应的场景数据进行数据回滚。After receiving the data rollback instruction, the scene construction layer performs data rollback on the scene data corresponding to the scene name in the business database through the data cleaning node in the data processing link.
具体的,数据清理节点通过逆向数据库操作对业务数据库中的场景名称对应的场景数据进行数据回滚。Specifically, the data cleaning node performs data rollback on the scene data corresponding to the scene name in the business database through a reverse database operation.
保存节点可直接将场景数据保存到指定的数据库中,也可将场景数据保存为sql文件并将其保存到数据库中。The save node can directly save the scene data to the specified database, or save the scene data as an sql file and save it in the database.
需要说明的是,数据库可采用JFinal实现交互;数据库包括H2内存数据库、mysql等。It should be noted that the database can use JFinal to achieve interaction; the database includes H2 memory database, mysql, etc.
为了更好的解释本发明实施例,下面将在具体的实施场景下描述上述测试的流程,具体如图4所示:In order to better explain the embodiments of the present invention, the above-mentioned test procedure will be described below in a specific implementation scenario, as shown in Fig. 4:
假设业务开发者想测试当借款者有一笔微粒贷借据逾期时,微粒贷个人中心的各项数据是否正确。当单测开发者启动单测时,本发明的单测执行监听器监听到单测启动,首先从单测方法的注解中取出场景名称,例如在本例 中场景名称为“单用户单借据逾期”,监听器将场景名称传递给场景构建器后,场景构建器识别该名称,并根据默认配置通知默认的场景解析器解析该场景名称。同样地,场景解析器根检测到场景数据维护在数据源excel中,因此将场景元信息传递给excel数据源适配器,由excel数据源适配器负责从excel文件中加载出“逾期”的场景数据,下一步则将场景数据转发给数据加工链路,由链路对数据做必要的填充之后,将场景数据转换成sql语句并插入业务数据库中。到此完成场景的构建过程。Suppose a business developer wants to test whether the data in the Motodai personal center is correct when a borrower has an overdue loan note for Motodai. When the single test developer starts the single test, the single test execution monitor of the present invention detects the start of the single test, and first extracts the scene name from the comment of the single test method. For example, in this example, the scene name is "single user bill overdue ", after the listener passes the scene name to the scene builder, the scene builder recognizes the name and informs the default scene parser to resolve the scene name according to the default configuration. Similarly, the scene parser root detects that the scene data is maintained in the data source excel, so the scene meta information is passed to the excel data source adapter, and the excel data source adapter is responsible for loading the "overdue" scene data from the excel file. In one step, the scene data is forwarded to the data processing link. After the link fills in the data as necessary, the scene data is converted into SQL statements and inserted into the business database. This completes the scene construction process.
单测运行完成之后,监听器检测到单测方法退出时,会发出指令通知场景构造器回滚数据。场景构造器则将该任务委托给数据加工链路中的数据清理节点,由清理节点通过执行逆向的sql操作来完成数据库恢复。After the single test runs, when the listener detects that the single test method exits, it will issue an instruction to notify the scene builder to roll back the data. The scene builder entrusts the task to the data cleaning node in the data processing link, and the cleaning node completes the database recovery by executing a reverse SQL operation.
上述方案,从单测开发者的角度看,单测开发者需要关注的仅仅是单测启动-运行-完成这个步骤,至于复杂的场景构造过程和场景回滚过程全部由本发明自动完成以此保证单测开发者可以聚焦于业务逻辑的正确性,无需分心于如何创建所需的场景及如何回滚单测现场。From the perspective of the single test developer, the single test developer needs to pay attention to the single test start-run-complete this step. As for the complex scene construction process and the scene rollback process, it is guaranteed by the present invention to complete automatically Single test developers can focus on the correctness of the business logic, without being distracted by how to create the required scenarios and how to roll back the single test site.
基于相同的技术构思,图5示例性的示出了本发明实施例提供一种测试装置,该装置可以执行上述测试流程。Based on the same technical concept, FIG. 5 exemplarily shows that an embodiment of the present invention provides a testing device, which can execute the foregoing testing process.
如图5所示,该装置可以包括:As shown in Figure 5, the device may include:
获取单元501,获取场景名称;The obtaining unit 501 obtains the scene name;
处理单元502,用于根据所述场景名称,从所述场景库中读取所述场景名称对应的场景数据,对所述场景名称对应的场景数据进行加工处理;根据加工处理后的所述场景名称对应的场景数据对待测单元进行测试。The processing unit 502 is configured to read the scene data corresponding to the scene name from the scene library according to the scene name, and process the scene data corresponding to the scene name; according to the processed scene The scene data corresponding to the name is tested for the unit to be tested.
可选的,所述处理单元502具体用于:Optionally, the processing unit 502 is specifically configured to:
根据所述场景名称从所述数据源适配层中确定所述场景名称对应的数据源适配器;Determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name;
根据所述场景名称对应的数据源适配器从所述场景库中读取所述场景名称对应的场景数据。Read the scene data corresponding to the scene name from the scene library according to the data source adapter corresponding to the scene name.
可选的,所述处理单元502具体用于:Optionally, the processing unit 502 is specifically configured to:
对所述场景名称对应的场景数据进行清理、过滤、填充、转换和保存。The scene data corresponding to the scene name is cleaned, filtered, filled, converted and saved.
可选的,所述处理单元502还具体用于:Optionally, the processing unit 502 is further specifically configured to:
在确定对所述待测单元测试完成时,对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。When it is determined that the test of the unit to be tested is completed, data rollback is performed on the scene data corresponding to the scene name in the service database.
可选的,所述处理单元502还具体用于:Optionally, the processing unit 502 is further specifically configured to:
通过逆向数据库操作对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。Data rollback is performed on the scene data corresponding to the scene name in the service database through a reverse database operation.
其中,所述数据库可采用JFinal实现交互;所述数据库包括H2内存数据库、mysql等。Wherein, the database can use JFinal to realize interaction; the database includes H2 memory database, mysql, etc.
所述保存节点可直接将所述场景数据保存到指定的数据库中,也可将所述场景数据保存为sql文件并将其保存到数据库中。The saving node may directly save the scene data in a designated database, or save the scene data as an sql file and save it in the database.
基于相同的技术构思,本发明实施例提供一种计算机设备,包括:Based on the same technical concept, an embodiment of the present invention provides a computer device, including:
存储器,用于存储程序指令;Memory, used to store program instructions;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述测试方法。The processor is configured to call the program instructions stored in the memory and execute the above-mentioned test method according to the obtained program.
基于相同的技术构思,本发明实施例提供一种计算机可读非易失性存储介质,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行上述测试方法。Based on the same technical concept, the embodiments of the present invention provide a computer-readable non-volatile storage medium, including computer-readable instructions, and when the computer reads and executes the computer-readable instructions, the computer executes the above-mentioned test method.
最后应说明的是:本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、光学存储器等)上实施的计算机程序产品的形式。本发明是参照根据本发明的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入 式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个和/或方框图一个方框或多个方框中指定的功能的装置。Finally, it should be noted that those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes. The present invention is described with reference to flowcharts and/or block diagrams of the method, equipment (system), and computer program product according to the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment can be generated It is a device that realizes the functions specified in one process or multiple blocks in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims (13)

  1. 一种单元测试系统,其特征在于,包括监听器、场景构造层、数据源适配层、单元测试模块、业务数据库以及场景库;A unit test system, which is characterized by comprising a listener, a scene construction layer, a data source adaptation layer, a unit test module, a business database, and a scene library;
    所述监听器用于获取场景名称,并将所述场景名称发送至所述场景构造层;The listener is used to obtain the scene name, and send the scene name to the scene construction layer;
    所述场景构造层用于根据所述场景名称从所述数据源适配层中确定所述场景名称对应的数据源适配器,并根据所述场景名称对应的数据源适配器从所述场景库中读取所述场景名称对应的场景数据;对所述场景名称对应的场景数据进行加工处理;将加工处理后的所述场景名称对应的场景数据发送给所述业务数据库进行存储;The scene construction layer is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name, and read from the scene library according to the data source adapter corresponding to the scene name Fetching the scene data corresponding to the scene name; processing the scene data corresponding to the scene name; sending the processed scene data corresponding to the scene name to the business database for storage;
    所述单元测试模块用于根据所述业务数据库中存储的所述场景名称对应的场景数据,对待测单元进行测试。The unit test module is configured to test the unit to be tested according to the scene data corresponding to the scene name stored in the service database.
  2. 根据权利要求1所述的系统,其特征在于,所述场景构造层包括场景构造器、场景解析器和数据加工链路;The system according to claim 1, wherein the scene construction layer includes a scene builder, a scene parser, and a data processing link;
    所述场景构造器用于将所述监听器发送的所述场景名称发送给所述场景解析器;The scene builder is used to send the scene name sent by the listener to the scene parser;
    所述场景解析器用于根据所述场景名称,从所述数据源适配层中确定所述场景名称对应的数据源适配器,并根据所述场景名称对应的数据源适配器从所述场景库中读取所述场景名称对应的场景数据,将读取到的所述场景名称对应的场景数据发送给所述数据加工链路;The scene parser is used to determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name, and read from the scene library according to the data source adapter corresponding to the scene name Fetching the scene data corresponding to the scene name, and sending the read scene data corresponding to the scene name to the data processing link;
    所述数据加工链路用于对所述场景名称对应的场景数据进行加工处理;并将加工处理后的所述场景名称对应的场景数据发送给所述业务数据库进行存储。The data processing link is used to process the scene data corresponding to the scene name; and send the processed scene data corresponding to the scene name to the service database for storage.
  3. 根据权利要求2所述的系统,其特征在于,所述监听器还用于在监听到所述单元测试模块对所述待测单元测试完成后,向所述场景构造层发送数据回滚指令。The system according to claim 2, wherein the listener is further configured to send a data rollback instruction to the scene construction layer after monitoring that the unit test module has completed the test of the unit under test.
  4. 根据权利要求2所述的系统,其特征在于,所述数据加工链路还包括数据清理节点;The system according to claim 2, wherein the data processing link further comprises a data cleaning node;
    所述场景构造层在接收到所述数据回滚指令后,通过所述数据加工链路中的数据清理节点对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。After receiving the data rollback instruction, the scene construction layer performs data rollback on the scene data corresponding to the scene name in the service database through the data cleaning node in the data processing link.
  5. 根据权利要求4所述的系统,其特征在于,所述数据清理节点通过逆向数据库操作对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。The system according to claim 4, wherein the data cleaning node performs data rollback on the scene data corresponding to the scene name in the service database through a reverse database operation.
  6. 根据权利要求1至5任一项所述的系统,其特征在于,所述数据加工链路对所述场景名称对应的场景数据进行清理、过滤、填充、转换和保存。The system according to any one of claims 1 to 5, wherein the data processing link cleans, filters, fills, converts and saves the scene data corresponding to the scene name.
  7. 一种测试方法,其特征在于,包括:A test method, characterized in that it comprises:
    获取场景名称;Get the scene name;
    根据所述场景名称,从场景库中读取所述场景名称对应的场景数据,对所述场景名称对应的场景数据进行加工处理;According to the scene name, read the scene data corresponding to the scene name from the scene library, and process the scene data corresponding to the scene name;
    根据加工处理后的所述场景名称对应的场景数据对待测单元进行测试。The unit to be tested is tested according to the scene data corresponding to the scene name after processing.
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述场景名称,从场景库中读取所述场景名称对应的场景数据,包括:The method according to claim 7, wherein the reading the scene data corresponding to the scene name from the scene library according to the scene name comprises:
    根据所述场景名称从数据源适配层中确定所述场景名称对应的数据源适配器;Determine the data source adapter corresponding to the scene name from the data source adaptation layer according to the scene name;
    根据所述场景名称对应的数据源适配器从所述场景库中读取所述场景名称对应的场景数据。Read the scene data corresponding to the scene name from the scene library according to the data source adapter corresponding to the scene name.
  9. 根据权利要求7所述的方法,其特征在于,所述对所述场景名称对应的场景数据进行加工处理,包括:The method according to claim 7, wherein the processing the scene data corresponding to the scene name comprises:
    对所述场景名称对应的场景数据进行清理、过滤、填充、转换和保存。The scene data corresponding to the scene name is cleaned, filtered, filled, converted and saved.
  10. 根据权利要求7至9任一项所述的方法,其特征在于,在所述根据加工处理后的所述场景名称对应的场景数据对待测单元进行测试之后,还包括:The method according to any one of claims 7 to 9, characterized in that, after the process of testing the unit to be tested according to the scene data corresponding to the scene name after processing, the method further comprises:
    在确定对所述待测单元测试完成时,对业务数据库中的所述场景名称对应的场景数据进行数据回滚。When it is determined that the test of the unit to be tested is completed, data rollback is performed on the scene data corresponding to the scene name in the service database.
  11. 根据权利要求10所述的方法,其特征在于,所述对业务数据库中的所述场景名称对应的场景数据进行数据回滚,包括:The method according to claim 10, wherein the data rollback of the scene data corresponding to the scene name in the service database comprises:
    通过逆向数据库操作对所述业务数据库中的所述场景名称对应的场景数据进行数据回滚。Data rollback is performed on the scene data corresponding to the scene name in the service database through a reverse database operation.
  12. 一种计算设备,其特征在于,包括:A computing device, characterized by comprising:
    存储器,用于存储程序指令;Memory, used to store program instructions;
    处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行权利要求7至11任一项所述的方法。The processor is configured to call the program instructions stored in the memory, and execute the method according to any one of claims 7 to 11 according to the obtained program.
  13. 一种计算机可读非易失性存储介质,其特征在于,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行如权利要求7至11任一项所述的方法。A computer-readable non-volatile storage medium, characterized by comprising computer-readable instructions, when the computer reads and executes the computer-readable instructions, the computer is caused to execute any one of claims 7 to 11 Methods.
PCT/CN2020/097820 2019-06-28 2020-06-23 Unit testing system and unit testing method WO2020259516A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910580506.7 2019-06-28
CN201910580506.7A CN110287120B (en) 2019-06-28 2019-06-28 Unit test system and test method

Publications (1)

Publication Number Publication Date
WO2020259516A1 true WO2020259516A1 (en) 2020-12-30

Family

ID=68019840

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/097820 WO2020259516A1 (en) 2019-06-28 2020-06-23 Unit testing system and unit testing method

Country Status (2)

Country Link
CN (1) CN110287120B (en)
WO (1) WO2020259516A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287120B (en) * 2019-06-28 2023-09-08 深圳前海微众银行股份有限公司 Unit test system and test method
CN112527856A (en) * 2020-11-16 2021-03-19 广东电网有限责任公司 Unified data source management system and method for power grid data
CN112486838A (en) * 2020-12-14 2021-03-12 广州品唯软件有限公司 Interface testing method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866944A (en) * 2012-06-12 2013-01-09 中国联合网络通信集团有限公司 Pressure testing system and method
US20170351746A1 (en) * 2016-06-06 2017-12-07 International Business Machines Corporation Test data management
CN110287120A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of unit test system and test method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7930683B2 (en) * 2006-03-31 2011-04-19 Sap Ag Test automation method for software programs
US9460408B2 (en) * 2013-12-23 2016-10-04 International Business Machines Corporation Method and apparatus for generating test scenarios for a set of business rules
CN108319547B (en) * 2017-01-17 2022-01-21 阿里巴巴集团控股有限公司 Test case generation method, device and system
CN107992427B (en) * 2017-12-26 2021-08-31 顺丰科技有限公司 Method, device and equipment for creating service test scene and storage medium thereof
CN108446223B (en) * 2018-03-06 2021-07-27 吉旗(成都)科技有限公司 Business scene automatic testing method based on dynamic compilation
CN108984712B (en) * 2018-07-06 2022-04-26 深圳前海微众银行股份有限公司 Service scene-based number making method and device and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866944A (en) * 2012-06-12 2013-01-09 中国联合网络通信集团有限公司 Pressure testing system and method
US20170351746A1 (en) * 2016-06-06 2017-12-07 International Business Machines Corporation Test data management
CN110287120A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of unit test system and test method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHI, JUNLING ET AL.: "Design and Implementation of A Business-Oriented Data Integration System", COMPUTER SYSTEMS & APPLICATIONS, vol. 19, no. 2,, 28 February 2010 (2010-02-28), ISSN: 1003--325, DOI: 20200908150752 *

Also Published As

Publication number Publication date
CN110287120B (en) 2023-09-08
CN110287120A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
WO2020259516A1 (en) Unit testing system and unit testing method
WO2020233037A1 (en) Data processing method and apparatus, and storage medium
WO2019153472A1 (en) Automated interface testing method, device, equipment, and storage medium
AU2010298291C1 (en) Processing transactions in graph-based applications
US9110712B2 (en) Method for encapsulating logical units of work using business objects
US20180024858A1 (en) Framework for authoring data loaders and data savers
CN108804322A (en) Automated testing method, device, computer equipment and storage medium
CN111399828B (en) Model-driven logic device modeling method and terminal
CN111784108B (en) Modeling method and device of main data management platform
CN110134596A (en) The generation method and terminal device of test document
CN113535141A (en) Database operation code generation method and device
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN109101229A (en) A kind of code automatic generation method of object-oriented, device and equipment
CN113138922A (en) Method for parametrically reading Excel test data based on TestNG
CN105573763A (en) Embedded system modeling method supporting RTOS
CN116594887A (en) CFD software-based automatic test method and system
CN112000738A (en) Database connection switching method, device, equipment and medium
CN116383052A (en) Automatic testing method, device and equipment for batch processing task and storage medium
CN111090638B (en) Comparison method and device for transaction functions in database migration
US20190310933A1 (en) Externalized definition and reuse of mocked transactions
CN101778110A (en) Service protocol mining method and device
CN111367894A (en) Data comparison method and device based on database migration
CN110597862A (en) Data entry method, equipment and system based on information system
CN113190463B (en) Code testing method, node and system
CN114416805B (en) Data checking method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20833115

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.04.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20833115

Country of ref document: EP

Kind code of ref document: A1