CN114721958A - A kind of interface automatic testing method and terminal of multi-database system - Google Patents
A kind of interface automatic testing method and terminal of multi-database system Download PDFInfo
- Publication number
- CN114721958A CN114721958A CN202210403634.6A CN202210403634A CN114721958A CN 114721958 A CN114721958 A CN 114721958A CN 202210403634 A CN202210403634 A CN 202210403634A CN 114721958 A CN114721958 A CN 114721958A
- Authority
- CN
- China
- Prior art keywords
- database
- target
- testing
- tested
- interface
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 111
- 238000000034 method Methods 0.000 claims abstract description 24
- 238000004590 computer program Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 abstract description 14
- 238000012423 maintenance Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- XSQUKJJJFZCRTK-NJFSPNSNSA-N UREA C 14 Chemical compound N[14C](N)=O XSQUKJJJFZCRTK-NJFSPNSNSA-N 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3698—Environments for analysis, debugging or testing of software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明公开一种多数据库系统的接口自动化测试方法及终端,获取数据库列表,所述数据库列表包括数据库及与所述数据库对应的配置信息;遍历所述数据库列表,将遍历到的数据库标记为目标数据库,根据所述目标数据库对应的目标配置信息连接所述目标数据库后,根据预设规则测试所述目标数据库;本发明实现数据库连接在测试过程中的自动切换,无需手动进行数据库的切换,实现接口测试的全自动化,从而提高接口测试的效率。
The invention discloses an interface automatic testing method and terminal for a multi-database system, obtaining a database list, the database list including databases and configuration information corresponding to the database; traversing the database list, and marking the traversed database as a target database, after connecting the target database according to the target configuration information corresponding to the target database, test the target database according to the preset rules; the present invention realizes the automatic switching of the database connection in the testing process, and does not need to manually switch the database. Full automation of interface testing, thereby improving the efficiency of interface testing.
Description
技术领域technical field
本发明涉及网络安全技术领域,尤其涉及一种多数据库系统的接口自动化测试方法及终端。The invention relates to the technical field of network security, in particular to an interface automatic testing method and terminal of a multi-database system.
背景技术Background technique
接口测试是测试系统组件间接口的一种测试。接口测试主要用于检测外部系统与本系统之间以及本系统内部各个子系统之间的交互点。主要功能是通过请求服务器或者其他模块对应接口,查看返回的结果是否为想要的结果。Interface testing is a type of testing that tests the interface between system components. Interface testing is mainly used to detect the interaction points between the external system and the system and between the various subsystems within the system. The main function is to check whether the returned result is the desired result by requesting the corresponding interface of the server or other modules.
各个数据库的基础语法会有些许不同,特定的函数、变量等写法更千差万别,绝大多数情况下一个系统的后台只需要支持一种数据(比如以下数据库的其中一个:SqlServer、Oracle、MySQL、DM、Kingbase等)。但是在一些系统中为了满足开发需求,需要同时支持多种数据库,以满足更多项目对数据库的需求,比如:A项目要SqlServer数据库;B项目要Oracle数据库,C项目要MySQL数据库,但这些项目都想用同一个框架开发,所以框架中的某个模块若需要测试新增、修改、删除、查询等功能,需要将所有数据库都测试一遍。若一共存在n个数据库,使测试增加了n倍的工作量。但传统的接口自动化测试无法实现将n种数据库在同一个测试任务中完成测试。The basic syntax of each database will be slightly different, and the writing methods of specific functions and variables are even more different. In most cases, the background of a system only needs to support one type of data (such as one of the following databases: SqlServer, Oracle, MySQL, DM) , Kingbase, etc.). However, in some systems, in order to meet the development needs, it is necessary to support multiple databases at the same time to meet the needs of more projects for databases. For example, project A needs SqlServer database; project B needs Oracle database, and project C needs MySQL database, but these projects need SqlServer database. They all want to use the same framework for development, so if a module in the framework needs to test functions such as adding, modifying, deleting, and querying, all databases need to be tested again. If there are a total of n databases, the workload of the test is increased by n times. However, the traditional interface automation test cannot realize the test of n kinds of databases in the same test task.
发明内容SUMMARY OF THE INVENTION
本发明所要解决的技术问题是:提供一种多数据库系统的接口自动化测试方法及终端,能够提高数据库接口测试的效率。The technical problem to be solved by the present invention is to provide an interface automatic testing method and terminal of a multi-database system, which can improve the efficiency of database interface testing.
为了解决上述技术问题,本发明采用的一种技术方案为:In order to solve the above-mentioned technical problems, a kind of technical scheme adopted in the present invention is:
一种多数据库系统的接口自动化测试方法,包括步骤:A method for automatic testing of interfaces of a multi-database system, comprising the steps of:
获取数据库列表,所述数据库列表包括数据库及与所述数据库对应的配置信息;obtaining a database list, where the database list includes a database and configuration information corresponding to the database;
遍历所述数据库列表,将遍历到的数据库标记为目标数据库,根据所述目标数据库对应的目标配置信息连接所述目标数据库后,根据预设规则测试所述目标数据库。The database list is traversed, the traversed database is marked as a target database, and after connecting to the target database according to the target configuration information corresponding to the target database, the target database is tested according to a preset rule.
为了解决上述技术问题,本发明采用的另一种技术方案为:In order to solve the above-mentioned technical problems, another technical scheme adopted by the present invention is:
一种多数据库系统的接口自动化测试终端,包括存储器、处理器及存储在存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:An interface automation test terminal of a multi-database system, comprising a memory, a processor and a computer program stored on the memory and running on the processor, the processor implements the following steps when executing the computer program:
获取数据库列表,所述数据库列表包括数据库及与所述数据库对应的配置信息;obtaining a database list, where the database list includes a database and configuration information corresponding to the database;
遍历所述数据库列表,将遍历到的数据库标记为目标数据库,根据所述目标数据库对应的目标配置信息连接所述目标数据库后,根据预设规则测试所述目标数据库。The database list is traversed, the traversed database is marked as a target database, and after connecting to the target database according to the target configuration information corresponding to the target database, the target database is tested according to a preset rule.
本发明的有益效果在于:通过数据库列表记录待测试的数据库的标识和每个待测试的数据库对应的配置信息,在进行测试的过程中,通过遍历数据库列表,通过其中的配置信息与待测试的数据库建立连接,保证不遗漏数据库的情况下实现与数据库的自动连接,无需手动进行数据库的切换,在接口测试过程中实现数据库的自动切换,实现接口测试的全自动化,从而提高接口测试的效率。The beneficial effect of the present invention is that: the identification of the database to be tested and the configuration information corresponding to each database to be tested are recorded through the database list, and in the process of testing, by traversing the database list, the configuration information and the to-be-tested database are passed through the database list. The database establishes a connection to ensure the automatic connection with the database without missing the database, without the need to manually switch the database, realize the automatic switching of the database during the interface test process, realize the full automation of the interface test, thereby improving the efficiency of the interface test.
附图说明Description of drawings
图1为本发明实施例的一种多数据库系统的接口自动化测试方法的步骤流程图;Fig. 1 is the step flow chart of the interface automatic testing method of a kind of multi-database system according to the embodiment of the present invention;
图2为本发明实施例的一种多数据库系统的接口自动化测试方法的另一步骤流程图;FIG. 2 is a flowchart of another step of an interface automatic testing method of a multi-database system according to an embodiment of the present invention;
图3为本发明实施例的一种多数据库系统的接口自动化测试终端的结构示意图;3 is a schematic structural diagram of an interface automated testing terminal of a multi-database system according to an embodiment of the present invention;
标号说明:Label description:
1、一种多数据库系统的接口自动化测试终端;2、处理器;3、存储器。1. An interface automatic test terminal of a multi-database system; 2. A processor; 3. A memory.
具体实施方式Detailed ways
为详细说明本发明的技术内容、所实现目的及效果,以下结合实施方式并配合附图予以说明。In order to describe in detail the technical content, achieved objects and effects of the present invention, the following descriptions are given with reference to the embodiments and the accompanying drawings.
请参照图1以及图2,本发明实施例提供了一种多数据库系统的接口自动化测试方法,包括步骤:Please refer to FIG. 1 and FIG. 2 , an embodiment of the present invention provides an interface automated testing method for a multi-database system, including the steps:
获取数据库列表,所述数据库列表包括数据库及与所述数据库对应的配置信息;obtaining a database list, where the database list includes a database and configuration information corresponding to the database;
遍历所述数据库列表,将遍历到的数据库标记为目标数据库,根据所述目标数据库对应的目标配置信息连接所述目标数据库后,根据预设规则测试所述目标数据库。The database list is traversed, the traversed database is marked as a target database, and after connecting to the target database according to the target configuration information corresponding to the target database, the target database is tested according to a preset rule.
从上述描述可知,本发明的有益效果在于:通过数据库列表记录待测试的数据库的标识和每个待测试的数据库对应的配置信息,在进行测试的过程中,通过遍历数据库列表,通过其中的配置信息与待测试的数据库建立连接,保证不遗漏数据库的情况下实现与数据库的自动连接,无需手动进行数据库的切换,在接口测试过程中实现数据库的自动切换,实现接口测试的全自动化,从而提高接口测试的效率。As can be seen from the above description, the beneficial effects of the present invention are: the identification of the database to be tested and the configuration information corresponding to each database to be tested are recorded through the database list, and in the process of testing, by traversing the database list, through the configuration The information establishes a connection with the database to be tested to ensure that the database is automatically connected to the database without omitting the database. There is no need to manually switch the database. The automatic switching of the database is realized during the interface test process, and the full automation of the interface test is realized, thereby improving the Efficiency of interface testing.
进一步地,所述预设规则包括预设测试数据;Further, the preset rules include preset test data;
测试每一所述目标数据库的所述预设测试数据均相同。The preset test data for testing each of the target databases are the same.
由上述描述可知,通过控制测试每一目标数据库的预设测试数据相同,能够预知测试结果,从而更好地对数据库的测试结果进行评判,并且不会遗漏某一数据库对应的测试项。As can be seen from the above description, by controlling the test to have the same preset test data of each target database, the test result can be predicted, so that the test result of the database can be better judged, and the test item corresponding to a certain database will not be omitted.
进一步地,所述根据预设规则测试所述目标数据库包括:Further, the testing of the target database according to a preset rule includes:
遍历所述目标数据库的待测试接口,将遍历到的待测试接口标记为目标待测试接口,并根据所述预设规则测试所述目标待测试接口。Traversing the interfaces to be tested of the target database, marking the traversed interfaces to be tested as target interfaces to be tested, and testing the target interfaces to be tested according to the preset rules.
由上述描述可知,在自动连接目标数据库之后,对目标数据库对应的待测试接口也根据预设规则实现自动测试,进一步减小了人员的工作量,提高了接口测试的效率。As can be seen from the above description, after the target database is automatically connected, the interface to be tested corresponding to the target database is also automatically tested according to preset rules, which further reduces the workload of personnel and improves the efficiency of interface testing.
进一步地,所述配置信息包括连接串信息。Further, the configuration information includes connection string information.
由上述描述可知,通过连接串信息能够保证在自动测试的过程中,顺利和目标数据库建立连接。As can be seen from the above description, the connection string information can ensure that the connection with the target database can be established smoothly in the process of automatic testing.
进一步地,所述遍历所述数据库列表之后还包括:Further, after traversing the database list, the method further includes:
生成并输出测试报告。Generate and output test reports.
由上述描述可知,在遍历完成数据库列表之后生成并输出测试报告,将报告结果实质化,方便测试人员进行查看和对应检查。As can be seen from the above description, after traversing the database list, a test report is generated and output, and the report result is substantiated, which is convenient for testers to view and check accordingly.
请参照图2,一种多数据库系统的接口自动化测试终端,包括存储器、处理器及存储在存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:Please refer to FIG. 2 , an interface automation test terminal of a multi-database system, including a memory, a processor, and a computer program stored in the memory and running on the processor, which is implemented when the processor executes the computer program. The following steps:
获取数据库列表,所述数据库列表包括数据库及与所述数据库对应的配置信息;obtaining a database list, where the database list includes a database and configuration information corresponding to the database;
遍历所述数据库列表,将遍历到的数据库标记为目标数据库,根据所述目标数据库对应的目标配置信息连接所述目标数据库后,根据预设规则测试所述目标数据库。The database list is traversed, the traversed database is marked as a target database, and after connecting to the target database according to the target configuration information corresponding to the target database, the target database is tested according to a preset rule.
由上述描述可知,本发明的有益效果在于:通过数据库列表记录待测试的数据库的标识和每个待测试的数据库对应的配置信息,在进行测试的过程中,通过遍历数据库列表,通过其中的配置信息与待测试的数据库建立连接,保证不遗漏数据库的情况下实现与数据库的自动连接,无需手动进行数据库的切换,实现接口测试的全自动化,从而提高接口测试的效率。As can be seen from the above description, the beneficial effects of the present invention are: the identification of the database to be tested and the configuration information corresponding to each database to be tested are recorded through the database list, and in the process of testing, by traversing the database list, through the configuration information therein The information establishes a connection with the database to be tested to ensure automatic connection with the database without missing the database, without the need to manually switch the database, and realize the full automation of the interface test, thereby improving the efficiency of the interface test.
进一步地,所述预设规则包括预设测试数据;Further, the preset rules include preset test data;
测试每一所述目标数据库的所述预设测试数据均相同。The preset test data for testing each of the target databases are the same.
由上述描述可知,通过控制测试每一目标数据库的预设测试数据相同,能够预知测试结果,从而更好地对数据库的测试结果进行评判,并且不会遗漏某一数据库对应的测试项。As can be seen from the above description, by controlling the test to have the same preset test data of each target database, the test result can be predicted, so that the test result of the database can be better judged, and the test item corresponding to a certain database will not be omitted.
进一步地,所述根据预设规则测试所述目标数据库包括:Further, the testing of the target database according to a preset rule includes:
遍历所述目标数据库的待测试接口,将遍历到的待测试接口标记为目标待测试接口,并根据所述预设规则测试所述目标待测试接口。Traversing the interfaces to be tested of the target database, marking the traversed interfaces to be tested as target interfaces to be tested, and testing the target interfaces to be tested according to the preset rules.
由上述描述可知,在自动连接目标数据库之后,对目标数据库对应的待测试接口也根据预设规则实现自动测试,进一步减小了人员的工作量,提高了接口测试的效率。As can be seen from the above description, after the target database is automatically connected, the interface to be tested corresponding to the target database is also automatically tested according to preset rules, which further reduces the workload of personnel and improves the efficiency of interface testing.
进一步地,所述配置信息包括连接串信息。Further, the configuration information includes connection string information.
由上述描述可知,通过连接串信息能够保证在自动测试的过程中,顺利和目标数据库建立连接。As can be seen from the above description, the connection string information can ensure that the connection with the target database can be established smoothly in the process of automatic testing.
进一步地,所述遍历所述数据库列表之后还包括:Further, after traversing the database list, the method further includes:
生成并输出测试报告。Generate and output test reports.
由上述描述可知,在遍历完成数据库列表之后生成并输出测试报告,将报告结果实质化,方便测试人员进行查看和对应检查。As can be seen from the above description, after traversing the database list, a test report is generated and output, and the report result is substantiated, which is convenient for testers to view and check accordingly.
本发明上述的一种多数据库系统的接口自动化测试方法,能够应用于需要连接多个数据库的系统的测试中,以下通过具体实施例说明:The above-mentioned interface automatic testing method of a multi-database system of the present invention can be applied to the test of a system that needs to be connected to a plurality of databases, and is described below by specific embodiments:
实施例一Example 1
请参照图1及图2,一种多数据库系统的接口自动化测试方法,包括:Please refer to FIG. 1 and FIG. 2 , a method for automatic testing of interfaces of a multi-database system, comprising:
S1、获取数据库列表,所述数据库列表包括数据库及与所述数据库对应的配置信息;S1. Obtain a database list, where the database list includes a database and configuration information corresponding to the database;
在一种可选的实施方式中,配置信息包括连接串信息,能够根据连接串信息与数据库建立连接;In an optional implementation manner, the configuration information includes connection string information, and a connection can be established with the database according to the connection string information;
在一种可选的实施方式中,数据库列表存放在预设数据库中,系统通过与预设数据库建立连接读取数据库列表,方便查找,更新,修改,存于数据库中能在本地直接通过数据库工具连接上直接对连接串信息进行配置,而常用的配置文件需要连接对应部署的服务器,找到配置文件才能修改;方便迁移,配置文件方式会随着自动化环境部署的位置而改变,使用数据库则不会受部署环境的改变而改变;方便管理,使用数据库存放连接串信息方便将所有项目中的连接串信息统一展示和查看,比如有十个项目的连接串信息,如果是配置文件需要分别存放在十个不同配置文件中,想同时查看得分别打开十个文件,而在数据库中只要打开某张表即可;In an optional embodiment, the database list is stored in a preset database, and the system reads the database list by establishing a connection with the preset database, which is convenient for searching, updating, and modifying. The connection string information is directly configured on the connection, and the commonly used configuration files need to be connected to the corresponding deployed server, and the configuration file can be modified only after finding the configuration file; easy migration, the configuration file method will change with the location of the automated environment deployment, but not using the database. It is changed by the change of the deployment environment; it is easy to manage, and the database is used to store the connection string information to facilitate the unified display and view of the connection string information in all projects. For example, there are ten project connection string information. If it is a configuration file, it needs to be stored in ten In different configuration files, if you want to view ten files at the same time, you only need to open a certain table in the database;
S2、遍历所述数据库列表,将遍历到的数据库标记为目标数据库,根据所述目标数据库对应的目标配置信息连接所述目标数据库后,根据预设规则测试所述目标数据库;S2, traversing the database list, marking the traversed database as a target database, and after connecting the target database according to the target configuration information corresponding to the target database, and testing the target database according to a preset rule;
在一种可选的实施方式中,通过使用pytest框架中的pytest main.py-s--count=(数据库的数量即执行循环的次数);对数据库进行测试;In an optional implementation manner, by using pytest main.py-s--count=(the number of databases is the number of execution cycles) in the pytest framework; test the database;
其中,所述根据预设规则测试所述目标数据库包括:Wherein, the testing of the target database according to the preset rule includes:
遍历所述目标数据库的待测试接口,将遍历到的待测试接口标记为目标待测试接口,并根据所述预设规则测试所述目标待测试接口;Traversing the interface to be tested of the target database, marking the traversed interface to be tested as the target interface to be tested, and testing the target interface to be tested according to the preset rule;
在一种可选的实施方式中,所述预设规则包括预设测试数据,测试每一目标数据库的预设测试数据均相同;方便比较不同数据库的测试结果与预设结果是否一致,若测试结果与预设结果不一致则当作测试失败,并且能够节约预设规则的存储空间;In an optional embodiment, the preset rules include preset test data, and the preset test data of each target database are the same; it is convenient to compare whether the test results of different databases are consistent with the preset results. If the result is inconsistent with the preset result, the test is regarded as a failure, and the storage space of the preset rules can be saved;
请参照图2,在一种可选的实施方式中,S2具体包括S21-S26:Please refer to FIG. 2, in an optional implementation manner, S2 specifically includes S21-S26:
S21、连接预设数据库,从预设数据库中读取数据库列表;S21, connect to the preset database, and read the database list from the preset database;
S22、判断是否存在当前连接的目标数据库,若是,执行S23,否则,执行S24;S22, determine whether there is a currently connected target database, if so, execute S23, otherwise, execute S24;
S23、判断所述当前连接的目标数据库是否为所述数据库列表中的末位数据库,若是,执行步骤S3,否则,获取当前连接的目标数据库对应的下一数据库,作为新的目标数据库,并执行S25;S23, determine whether the currently connected target database is the last database in the database list, if so, execute step S3, otherwise, acquire the next database corresponding to the currently connected target database as a new target database, and execute S25;
S24、若无当前连接的目标数据库,则获取所述数据库列表中的首位数据库作为目标数据库;S24, if there is no currently connected target database, then obtain the first database in the database list as the target database;
S25、根据数据库列表中的配置信息与目标数据库建立连接;重启系统,判断系统是否正常启动,若是则执行所述S26,否则保持等待状态直至系统正常启动后执行S26;自动进行数据库切换过程中的重启判断,避免数据库切换过程中出现异常;S25, establishing a connection with the target database according to the configuration information in the database list; restarting the system, judging whether the system starts normally, if so, execute the described S26, otherwise keep the waiting state until the system starts normally and execute S26; automatically perform the database switching process in the process. Restart judgment to avoid exceptions during database switching;
S26、根据预设规则测试所述目标数据库后,跳转S21;S26, after testing the target database according to the preset rule, jump to S21;
S3、生成并输出测试报告,结束测试。S3. Generate and output a test report, and end the test.
……
请参照图3,本发明的实施例二为:Please refer to Fig. 3, the second embodiment of the present invention is:
一种多数据库系统的接口自动化测试终端1,包括处理器2、存储器3及存储在存储器3上并可在所述处理器2上运行的计算机程序,所述处理器2执行所述计算机程序时实现实施例一中的各个步骤。An interface automation test terminal 1 of a multi-database system, comprising a
……
综上所述,本发明提供的一种多数据库系统的接口自动化测试方法及终端,通过保存数据库和数据库对应的配置信息如连接串信息,实现在测试过程中对系统所连接的数据库的自动切换,避免了手动切换的繁琐,降低了人工成本的同时提高了进行接口自动化测试的效率;并且对连接串的切换是自动进行,过程更加流畅;本发明实现多个数据库一起测试,比如原来4个数据库需要进行1+1+1+1次测试并生成4份独立的测试报告,本发明实现了4个数据库一次测试并只生成1份测试报告,且报告内容中会根据数据库类型进行划分并避免冗余部分的重复展示,更加简洁;将多份报告变为一份,更方便查看测试报告;将原来分散的内容,集中在一起,更方便对比各个数据库的差异;同时在对数据库进行测试的过程中,采用相同的预设测试数据,方便比较最终的测试结果,使得测试结果可预知;在系统运维的整个过程中需要对所有数据库进行多次测试,该测试方法只需要一次维护就可持续使用,降低了整体的运维成本,提高了运维效率。To sum up, the present invention provides an interface automatic testing method and terminal for a multi-database system, by saving the database and the configuration information corresponding to the database, such as connection string information, to realize the automatic switching of the database connected to the system during the test process. , avoids the tedious manual switching, reduces labor costs and improves the efficiency of automatic interface testing; and the switching of connection strings is automatically performed, and the process is smoother; the invention realizes multiple databases to be tested together, such as the original four The database needs to be tested 1+1+1+1 times and generate 4 independent test reports. The present invention realizes one test of 4 databases and generates only 1 test report, and the content of the report will be divided according to the database type to avoid The repeated display of redundant parts is more concise; multiple reports are changed into one, which is more convenient to view the test report; the original scattered content is gathered together, which is more convenient to compare the differences of each database; at the same time, the database is tested. In the process, the same preset test data is used to facilitate the comparison of the final test results and make the test results predictable; in the whole process of system operation and maintenance, all databases need to be tested multiple times, and this test method only needs one maintenance. Continuous use reduces the overall operation and maintenance cost and improves the operation and maintenance efficiency.
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等同变换,或直接或间接运用在相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are only examples of the present invention, and are not intended to limit the scope of the present invention. Any equivalent transformations made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in related technical fields, are similarly included in the within the scope of patent protection of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210403634.6A CN114721958A (en) | 2022-04-18 | 2022-04-18 | A kind of interface automatic testing method and terminal of multi-database system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210403634.6A CN114721958A (en) | 2022-04-18 | 2022-04-18 | A kind of interface automatic testing method and terminal of multi-database system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114721958A true CN114721958A (en) | 2022-07-08 |
Family
ID=82244042
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210403634.6A Pending CN114721958A (en) | 2022-04-18 | 2022-04-18 | A kind of interface automatic testing method and terminal of multi-database system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114721958A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050086257A1 (en) * | 2003-10-17 | 2005-04-21 | Measured Progress, Inc. | Item tracking, database management, and relational database system associated with multiple large scale test and assessment projects |
KR20100070713A (en) * | 2008-12-18 | 2010-06-28 | 주식회사 코아로직 | Method and system for automatically testing database system based on scenario |
US20120136602A1 (en) * | 2010-05-07 | 2012-05-31 | Salesforce.Com, Inc. | Method and system for automated performance testing in a multi-tenant environment |
CN102521354A (en) * | 2011-12-13 | 2012-06-27 | 北京天融信科技有限公司 | Auditing and testing method and auditing and testing device for data base protocol |
CN103810196A (en) * | 2012-11-09 | 2014-05-21 | 阿里巴巴集团控股有限公司 | Method for testing performance of database on basis of business model |
CN105447012A (en) * | 2014-08-15 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Write-in exclusive method and device used for database |
CN107122365A (en) * | 2016-02-25 | 2017-09-01 | 阿里巴巴集团控股有限公司 | The access method and device of heterogeneous database |
CN107608902A (en) * | 2017-10-23 | 2018-01-19 | 中国联合网络通信集团有限公司 | Routine interface method of testing and device |
CN112131126A (en) * | 2020-09-28 | 2020-12-25 | 中国银行股份有限公司 | Test environment switching method and device |
CN113704107A (en) * | 2021-08-26 | 2021-11-26 | 平安国际智慧城市科技股份有限公司 | Application testing method, device, equipment and computer readable storage medium |
-
2022
- 2022-04-18 CN CN202210403634.6A patent/CN114721958A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050086257A1 (en) * | 2003-10-17 | 2005-04-21 | Measured Progress, Inc. | Item tracking, database management, and relational database system associated with multiple large scale test and assessment projects |
KR20100070713A (en) * | 2008-12-18 | 2010-06-28 | 주식회사 코아로직 | Method and system for automatically testing database system based on scenario |
US20120136602A1 (en) * | 2010-05-07 | 2012-05-31 | Salesforce.Com, Inc. | Method and system for automated performance testing in a multi-tenant environment |
CN102521354A (en) * | 2011-12-13 | 2012-06-27 | 北京天融信科技有限公司 | Auditing and testing method and auditing and testing device for data base protocol |
CN103810196A (en) * | 2012-11-09 | 2014-05-21 | 阿里巴巴集团控股有限公司 | Method for testing performance of database on basis of business model |
CN105447012A (en) * | 2014-08-15 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Write-in exclusive method and device used for database |
CN107122365A (en) * | 2016-02-25 | 2017-09-01 | 阿里巴巴集团控股有限公司 | The access method and device of heterogeneous database |
CN107608902A (en) * | 2017-10-23 | 2018-01-19 | 中国联合网络通信集团有限公司 | Routine interface method of testing and device |
CN112131126A (en) * | 2020-09-28 | 2020-12-25 | 中国银行股份有限公司 | Test environment switching method and device |
CN113704107A (en) * | 2021-08-26 | 2021-11-26 | 平安国际智慧城市科技股份有限公司 | Application testing method, device, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12130732B2 (en) | System and method for performing automated API tests | |
US10055338B2 (en) | Completing functional testing | |
US6182245B1 (en) | Software test case client/server system and method | |
CN102323945B (en) | SQL (Structured Query Language)-based database management method and device | |
US8903762B2 (en) | Modeling data exchange in a data flow of an extract, transform, and load (ETL) process | |
US8065323B2 (en) | Offline validation of data in a database system for foreign key constraints | |
US9058430B2 (en) | Testing a software application interfacing with multiple external software applications in a simulated test environment | |
US9356966B2 (en) | System and method to provide management of test data at various lifecycle stages | |
US10445675B2 (en) | Confirming enforcement of business rules specified in a data access tier of a multi-tier application | |
US10990515B2 (en) | Automated unit testing in a mainframe environment | |
US20180165179A1 (en) | Determining incompatibilities of automated test cases with modified user interfaces | |
CN104899141B (en) | A Test Case Selection and Expansion Method for Network Application System | |
CN111026670B (en) | Test case generation method, test case generation device and storage medium | |
US7707211B2 (en) | Information management system and method | |
CN117648257A (en) | Web automatic test method and system under Linux operating system | |
CN114996127A (en) | Intelligent test method and system for solid state disk firmware module | |
CN114238085A (en) | Interface testing method and device, computer equipment and storage medium | |
CN114721958A (en) | A kind of interface automatic testing method and terminal of multi-database system | |
CN115757172A (en) | Test execution method and device, storage medium and computer equipment | |
CN113434398B (en) | A batch automated testing method and platform | |
CN111930606A (en) | Automatic generation method of data processing flow test report and related device | |
CN114398248B (en) | A framework construction method and computing device for storing and using variables | |
CN117076292A (en) | Webpage testing method and device, computer equipment and storage medium | |
CN113434398A (en) | Batch automatic testing method and platform | |
CN114490363A (en) | A test case execution method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |