Movatterモバイル変換


[0]ホーム

URL:


CN114048082B - Configuration method, device, computer equipment and storage medium for interface testing - Google Patents

Configuration method, device, computer equipment and storage medium for interface testing
Download PDF

Info

Publication number
CN114048082B
CN114048082BCN202111539801.1ACN202111539801ACN114048082BCN 114048082 BCN114048082 BCN 114048082BCN 202111539801 ACN202111539801 ACN 202111539801ACN 114048082 BCN114048082 BCN 114048082B
Authority
CN
China
Prior art keywords
test
interface
information
task
acquiring
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.)
Active
Application number
CN202111539801.1A
Other languages
Chinese (zh)
Other versions
CN114048082A (en
Inventor
陈哲涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
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 Ping An Life Insurance Company of China LtdfiledCriticalPing An Life Insurance Company of China Ltd
Priority to CN202111539801.1ApriorityCriticalpatent/CN114048082B/en
Publication of CN114048082ApublicationCriticalpatent/CN114048082A/en
Application grantedgrantedCritical
Publication of CN114048082BpublicationCriticalpatent/CN114048082B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请涉及测试领域,揭示了一种接口测试的配置方法、装置、计算机设备及存储介质,其中方法包括:获取开发工程的生产日志信息;基于预配置的语法特征识别所述生产日志信息,获取所述生产日志信息中的接口信息;从测试工具中获取所述开发工程预配置的测试任务执行后得到的测试结果信息;根据自然语言算法识别所述测试结果信息,获取所述测试任务包含的测试接口及测试接口对应的执行数据;将所述测试接口与所述接口信息进行一致性匹配,并将一致性满足要求的测试接口对应的执行数据确定为所述接口信息的测试数据;根据所述接口信息的测试数据确定所述测试任务的接口覆盖信息。本申请能够提高测试任务中接口覆盖分析的准确率。

The present application relates to the field of testing, and discloses a configuration method, device, computer equipment and storage medium for interface testing, wherein the method includes: obtaining production log information of a development project; identifying the production log information based on pre-configured grammatical features, and obtaining interface information in the production log information; obtaining test result information obtained after executing a test task pre-configured for the development project from a test tool; identifying the test result information according to a natural language algorithm, and obtaining the test interface contained in the test task and the execution data corresponding to the test interface; matching the test interface with the interface information for consistency, and determining the execution data corresponding to the test interface that meets the consistency requirements as the test data of the interface information; and determining the interface coverage information of the test task based on the test data of the interface information. The present application can improve the accuracy of interface coverage analysis in test tasks.

Description

Configuration method and device for interface test, computer equipment and storage medium
Technical Field
The present application relates to the field of testing, and in particular, to a method and apparatus for configuring an interface test, a computer device, and a storage medium.
Background
The development project needs to be tested before being released on line, and after the development project is tested, the development project needs to be fully covered with all functions of the development project, and the current test mode is to test the functions of the development project by designing test cases, specifically to test interfaces in the development project, and the conditions of untimely updating and supplementing the automatic test cases of the interfaces exist, so that the coverage of the test cases lacks data analysis, and the problems of incomplete and low accuracy exist in the current interface test.
Disclosure of Invention
The application mainly aims to provide a configuration method, a device, computer equipment and a storage medium for interface test, which aim to solve the problems of incomplete and low accuracy of the existing interface test.
In order to achieve the above object, the present application provides a configuration method for interface test, including:
acquiring production log information of development projects;
identifying the production log information based on preconfigured grammar characteristics, and acquiring interface information in the production log information;
Obtaining test result information obtained after the development project preconfigured test task is executed from a test tool;
Identifying the test result information according to a natural language algorithm, and acquiring a test interface contained in the test task and execution data corresponding to the test interface;
performing consistency matching on the test interface and the interface information, and determining execution data corresponding to the test interface with consistency meeting the requirement as test data of the interface information;
And determining the interface coverage information of the test task according to the test data of the interface information.
Further, the identifying the production log information based on the preconfigured grammar features, and obtaining interface information in the production log information includes:
The type of the interface information is obtained from a preconfigured interface library, wherein the type comprises a service interface type and a non-service interface type;
matching corresponding grammar characteristics from a grammar library according to the type as preconfigured grammar characteristics;
And identifying the production log information based on the preconfigured grammar characteristics, and acquiring service interface information and non-service interface information in the production log information.
Further, the identifying the test result information according to a natural language algorithm, and obtaining the test interface and the execution data corresponding to the test interface included in the test task, includes:
Identifying the test result information according to a natural language algorithm, and acquiring entity information matched with a preset keyword in the test result information, wherein the entity information characterizes a test interface of the test task;
determining the content range of the corresponding test interface according to the entity information;
and identifying content information in the content range according to a natural language algorithm, and acquiring execution data corresponding to the test interface.
Further, the identifying the content information in the content range according to the natural language algorithm, and obtaining the execution data corresponding to the test interface includes:
Acquiring priori knowledge data of the entity information;
configuring the prior knowledge data with the natural language algorithm to obtain a natural language algorithm with prior knowledge;
And identifying content information in the content range according to the natural language algorithm of the priori knowledge, and acquiring execution data corresponding to the test interface.
Further, the obtaining, from a testing tool, test result information obtained after the testing task preconfigured in the development project is executed includes:
acquiring a first version number of the development project according to the production log information;
determining a second version number of the test task according to the first version number;
and acquiring test result information obtained after the test task of the second version number is executed from the test tool.
Further, after determining the interface coverage information of the test task according to the test data of the interface information, the method further includes:
acquiring interface information to be tested which does not meet the coverage requirement according to the interface coverage information;
Acquiring execution logic of the interface to be tested corresponding to the interface information to be tested from the development project;
and generating a retest task of the interface to be tested according to the execution logic and preset parameter information.
Further, the generating the retest task of the interface to be tested according to the execution logic and the preset parameter information includes:
Acquiring a first parameter of the execution logic;
acquiring a matched second parameter and a second parameter value of the second parameter from the preset parameter information according to the first parameter;
configuring a parameter value of the first parameter in the execution logic as the second parameter value;
And generating a retest task of the interface to be tested according to the execution logic and the second parameter value.
The application also provides a configuration device for interface test, comprising:
The log acquisition module is used for acquiring production log information of development projects;
The interface identification module is used for identifying the production log information based on preconfigured grammar characteristics and acquiring interface information in the production log information;
The test result module is used for acquiring test result information obtained after the test task preconfigured in the development project is executed from a test tool;
The result analysis module is used for identifying the test result information according to a natural language algorithm and acquiring a test interface contained in the test task and execution data corresponding to the test interface;
the interface matching module is used for carrying out consistency matching on the test interface and the interface information, and determining execution data corresponding to the test interface with consistency meeting the requirement as test data of the interface information;
and the test statistics module is used for determining the interface coverage information of the test task according to the test data of the interface information.
The application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the interface test configuration method of any one of the above when executing the computer program.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the configuration method of interface testing of any of the above.
The embodiment of the application provides an analysis method for interface coverage of an interface test task, which comprises the steps of firstly obtaining production log information of development engineering, identifying the log information based on preconfigured grammar characteristics, and obtaining interface information in the log information, wherein the interface information comprises definition, name and associated operation data of interfaces, so that interfaces used in the development engineering in a production environment and access data of all the interfaces are obtained; the method comprises the steps of performing interface test on a development engineering configuration test task, obtaining test result information obtained after the development engineering configuration test task is executed from a test tool in order to verify whether the test task comprehensively and accurately covers all interfaces of the development engineering, identifying the test result information according to natural language, obtaining a test interface contained in the test task and execution data corresponding to the test interface, performing consistency matching on the test interface and the interface information, determining the execution data corresponding to the test interface meeting the requirements as the test data of the interface information, and determining interface coverage information of the test task according to the test data of the interface information, so that comprehensive, effective and real analysis is performed on the test task based on production log information generated by a production environment, the accuracy of interface coverage analysis in the test task is improved, the efficiency of checking the interface test coverage rate is improved, and the maintenance and updating of the test task are facilitated.
Drawings
FIG. 1 is a flow chart of an exemplary method for configuring an interface test according to the present application;
FIG. 2 is a schematic structural diagram of an embodiment of an interface test configuration device according to the present application;
FIG. 3 is a block diagram schematically illustrating the structure of a computer device according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, an embodiment of the present application provides a configuration method of an interface test, including steps S10-S60, where the detailed description of each step of the configuration method of the interface test is as follows, the configuration method of the interface test may be completed by a system service with a corresponding function built in, the system service may be defined as an interface coverage service, and the system service may be run on a terminal device or in a cloud server, so that the configuration method of the interface test may also be understood as being completed by the terminal device or the cloud server running the system service.
S10, acquiring production log information of development engineering.
The method and the device are applied to a detection scene of interface test of development engineering, when the development engineering is on line before and after the development engineering is on line, operation data of various functions of the development engineering are required to be tested, before the development engineering is on line, a test task is configured for the development engineering, the test task is an interface automation test task and comprises a corresponding interface test case, in order to verify whether the test task comprehensively and accurately covers various functions of the development engineering, production log information of the development engineering is obtained, namely, the operation data generated by the operation of the various functions of the development engineering is obtained, and the operation data are defined as production log information through integration into a log, so that the production log information of the development engineering is obtained. The production log information is generated after the development project is on line, namely, the development project operates in a production environment, and the production environment of the development project is a gray scale production environment.
S20, identifying the production log information based on the preconfigured grammar characteristics, and acquiring interface information in the production log information.
In this embodiment, after obtaining production log information of a development project, because writing characteristics of contents of different parts in log information generated by running different functions of the development project are different, preconfigured grammar characteristics are obtained in the invention, the preconfigured grammar characteristics are grammar characteristics of interface information, then the production log information is identified based on the preconfigured grammar characteristics, and the interface information in the production log information is obtained, namely, the contents meeting the grammar characteristics are extracted from the production log information, and the contents meeting the grammar characteristics are defined as interface information, and the interface information comprises definitions, names and associated running data of interfaces, so that interfaces used in the development project in a production environment and access data of all interfaces are obtained.
S30, acquiring test result information obtained after the test task preconfigured in the development project is executed from a test tool.
In this embodiment, before the development project is on line, a test task needs to be configured to perform an interface test, where the test task includes test cases of different interfaces, in order to verify whether the test task comprehensively and accurately covers each interface of the development project, obtain an execution result of the test task in the test tool, that is, obtain test result information obtained after the test task preconfigured in the development project is executed from the test tool, in one embodiment, the test tool is a jmeter test tool, and by modifying a result output path in a configuration file of the jmeter test tool, test result information obtained when the test task is executed by the jmeter test tool is obtained, where the test result information includes an operation result of each interface used when the test task is executed, and includes information such as whether the interface is used by uri, whether the interface is executed successfully, and time consumption of the interface execution, and data such as a success rate of the interface execution of the test task, time consumption of each interface, and the number of interfaces can be calculated according to the test result information.
S40, identifying the test result information according to a natural language algorithm, and acquiring a test interface contained in the test task and execution data corresponding to the test interface.
In this embodiment, after test result information obtained after the execution of the test task preconfigured in the development project is obtained from the test tool, the test result information is identified according to the natural language, where the test result information includes test cases for each test interface and operation results of each test interface, and since the test task is configured before development, in this embodiment, the test result information generated by the test task is configured in a preset format, namely, each item of content information of the test result is in a preset template, so that the test result information is identified according to a natural language algorithm, and the content of each part in the test result information is identified based on the preset template, and the test interfaces and the execution data corresponding to the test interfaces contained in the test result information are obtained, so that the test tasks contain tests on the test interfaces and the execution data on the test interfaces.
S50, carrying out consistency matching on the test interface and the interface information, and determining execution data corresponding to the test interface with consistency meeting the requirement as test data of the interface information.
In this embodiment, after obtaining the test interface and the execution data corresponding to the test interface included in the test task, the test interface and the interface information are subjected to consistency matching, that is, the test interface identical to the identification information in the interface information is screened from the test result information, specifically, in one implementation manner, when the identification information of the test interface is identical to the identification information in the interface information, the identification information is subjected to consistency matching one by one, firstly, the test interface and the interface information are subjected to consistency matching based on the interface name, and if the name parameter of the test interface is identical to the name parameter in the interface information, the consistency matching of the execution function is performed, and if the execution function of the test interface is identical to the execution function in the interface information, the call parameter and the call database in the execution function are subjected to consistency matching, and when the identification information of the test interface is identical to the identification information in the interface information, the consistency matching of the test interface and the interface information is determined, the corresponding test interface meets the consistency requirement, that is the corresponding test interface, that is, the corresponding test data is the calibration data is obtained, and the corresponding test interface is the test data.
S60, determining interface coverage information of the test task according to the test data of the interface information.
In this embodiment, after determining execution data corresponding to a test interface meeting a requirement as test data of the interface information, interface coverage information of the test task is determined according to the test data of the interface information, specifically, by using the test data of the interface information, specifically, based on which interfaces in the test data statistics interface information have test data and which interfaces do not have test data, that is, the proportion of interfaces having test data is obtained by statistics, and the data amount of test data of each different interface in the interface information is also counted, then the coverage degree of the interface test in the test task is determined according to the proportion of interfaces having test data and the data amount of test data of interfaces having test data, so as to obtain the interface coverage information of the test task, thereby comprehensively, effectively and truly analyzing the test task based on production log information generated by a production environment, and improving the accuracy of interface coverage analysis in the test task.
The embodiment provides an interface coverage analysis method of an interface test task, which comprises the steps of firstly obtaining production log information of a development project, identifying the log information based on preconfigured grammar characteristics, obtaining interface information in the log information, wherein the interface information comprises definition, names and associated operation data of interfaces, so as to obtain interfaces used in the development project in a production environment, and access data of all interfaces, configuring the test task for interface test in the development project, obtaining test result information obtained after the test task preconfigured in the development project is executed from the test tool, identifying the test result information according to natural language, obtaining test interfaces contained in the test task and execution data corresponding to the test interfaces, carrying out consistency matching on the test interfaces and the interface information, determining the execution data corresponding to the test interfaces meeting requirements as the test data of the interface information, and determining the interface coverage information of the test task according to the test data of the interface information, so as to verify whether the test task comprehensively and accurately covers all interfaces of the development project, obtaining test result information obtained after the test task preconfigured in the test tool is executed, obtaining test interface and the execution data corresponding to the test interface contained in the test task, carrying out the test result information, carrying out the test coverage analysis on the test task, and updating the test environment, and updating the test efficiency and the test task effectively.
In one embodiment, the identifying the production log information based on the preconfigured grammar features, and obtaining interface information in the production log information includes:
The type of the interface information is obtained from a preconfigured interface library, wherein the type comprises a service interface type and a non-service interface type;
matching corresponding grammar characteristics from a grammar library according to the type as preconfigured grammar characteristics;
And identifying the production log information based on the preconfigured grammar characteristics, and acquiring service interface information and non-service interface information in the production log information.
In this embodiment, in the process of identifying the log information based on the preconfigured grammar features and obtaining the interface information in the log information, the types of the interface information are obtained from a preconfigured interface library, wherein the types include a service interface type and a non-service interface type, the embodiment can detect an interface of a specified type in development engineering, for example, a service interface, at this time, according to the type, the corresponding grammar features are matched from the grammar library as the preconfigured grammar features, the different types of interface information have different grammar writing features, and according to the different grammar features, the content of the corresponding type of interface information can be accurately identified, namely, the production log information is identified based on the preconfigured grammar features, and the service interface information and the non-service interface information in the production log information are obtained.
In one embodiment, the identifying the test result information according to a natural language algorithm, and obtaining a test interface included in the test task and execution data corresponding to the test interface include:
Identifying the test result information according to a natural language algorithm, and acquiring entity information matched with a preset keyword in the test result information, wherein the entity information characterizes a test interface of the test task;
determining the content range of the corresponding test interface according to the entity information;
and identifying content information in the content range according to a natural language algorithm, and acquiring execution data corresponding to the test interface.
In this embodiment, in the process of identifying the test result information according to a natural language algorithm, identifying the test interface included in the test task and the execution data corresponding to the test interface, identifying entity information included in the test result information, specifically, identifying words matched with preset keywords in the test result information by means of keyword matching, determining the matched words as corresponding entity information, wherein the entity information characterizes the test interface of the test task, determining the content range of the test interface corresponding to the entity information, generally, the content information of each test interface is in the same content range, determining the content range of the previous test interface by identifying the obtained two entity information, determining the content range of each test interface based on the manner, identifying the content information in the content range according to the natural language algorithm, and obtaining the execution data corresponding to the test interface, thereby obtaining the test interface included in the test task and the execution data corresponding to the test interface, quickly identifying the execution data corresponding to different test interfaces, and improving the analysis efficiency of the test task.
In one embodiment, the identifying the content information in the content range according to a natural language algorithm, and obtaining the execution data corresponding to the test interface includes:
Acquiring priori knowledge data of the entity information;
configuring the prior knowledge data with the natural language algorithm to obtain a natural language algorithm with prior knowledge;
And identifying content information in the content range according to the natural language algorithm of the priori knowledge, and acquiring execution data corresponding to the test interface.
In this embodiment, in the process of identifying content information in the content range according to a natural language algorithm, obtaining execution data corresponding to the test interface, in order to accurately identify execution data in test interfaces of different parts, obtain priori knowledge data of the entity information, where the entity information characterizes the test interface, specifically, the priori knowledge data is obtained by collecting word library statistics corresponding to the entity information, in one implementation manner, text data corresponding to the entity information is collected, the text data is split, sentences and vocabularies contained in the text data are obtained, semantic identification is performed on the sentences and vocabularies, then occurrence probabilities of the sentences and vocabularies are counted, and target sentences and target vocabularies with occurrence probabilities meeting preset values are used as priori knowledge data under the entity information. And configuring the prior knowledge data by the natural language algorithm to obtain the natural language algorithm with prior knowledge, identifying the content information in the content range according to the natural language algorithm with prior knowledge, acquiring the execution data corresponding to the test interface, and rapidly and accurately identifying the content information in the content range by configuring the natural language algorithm with prior knowledge corresponding to proper nouns to acquire the execution data corresponding to the test interface, thereby rapidly identifying the execution data corresponding to different test interfaces and improving the analysis efficiency of the test task.
In one embodiment, the obtaining, from a test tool, test result information obtained after the execution of the test task preconfigured in the development project includes:
acquiring a first version number of the development project according to the production log information;
determining a second version number of the test task according to the first version number;
and acquiring test result information obtained after the test task of the second version number is executed from the test tool.
In this embodiment, the test tool includes test tasks for executing development projects in different time periods, in order to accurately analyze the interface coverage of the test tasks, it is required to ensure that the test tasks are consistent with the version of the development projects, specifically, before test result information obtained after the execution of the test tasks preconfigured by the development projects is obtained from the test tool, a first version number of the development projects is obtained according to the production log information, the development projects generate a mark containing a version number in the production log information, the mark is identified, the version number of the development projects is determined, and is defined as the first version number, meanwhile, a second version number of the test tasks is determined according to the first version number, the version number of the development projects and the version number of the test tasks have a mutual mapping relation, and in one embodiment, the version number of the development projects and the version number of the test tasks are identical, and the version number of the version number is different, for example, the version number of the development projects is k.1.1.1.1.1, the version number of the test tasks mapped by the production log information is c.1.1, the version number of the development projects is mapped by the version number of the test tasks is obtained according to the first version number of the test tasks, and the version number of the test tasks is accurately obtained by the test results after the first version number is detected by the test tasks, and the version number of the test tasks is accurately mapped by the test tasks is obtained.
In one embodiment, after determining the interface coverage information of the test task according to the test data of the interface information, the method further includes:
acquiring interface information to be tested which does not meet the coverage requirement according to the interface coverage information;
Acquiring execution logic of the interface to be tested corresponding to the interface information to be tested from the development project;
and generating a retest task of the interface to be tested according to the execution logic and preset parameter information.
In this embodiment, after the interface coverage information of the test task is determined according to the test data of the interface information, based on the test data, statistics is performed on which interfaces in the interface information have test data, which interfaces do not have test data, that is, which interfaces are tested, which interfaces are not tested, and also statistics is performed on the data amount of the test data that each different interface in the interface information has, so that the interface information to be tested that does not meet the coverage requirement is obtained according to the interface coverage information, in one embodiment, an interface with the data amount of the test data smaller than the preset value is defined as the interface information to be tested that does not meet the coverage requirement, the method comprises the steps of obtaining interface information which is not tested and interface information of which the data amount of test data is smaller than a preset value, then obtaining execution logic of an interface to be tested corresponding to the interface information to be tested from the development project, namely, matching logic codes associated with the interface to be tested confidence from the development project through analyzing the development project, defining the logic codes as the execution logic of the interface to be tested corresponding to the interface information to be tested, and then generating retest tasks of the interface to be tested according to the execution logic and preset parameter information, so that the whole coverage of the interface to be tested by the test tasks is completed, and the comprehensiveness of the test is improved.
In one embodiment, the generating the retest task of the interface to be tested according to the execution logic and the preset parameter information includes:
Acquiring a first parameter of the execution logic;
acquiring a matched second parameter and a second parameter value of the second parameter from the preset parameter information according to the first parameter;
configuring a parameter value of the first parameter in the execution logic as the second parameter value;
And generating a retest task of the interface to be tested according to the execution logic and the second parameter value.
In this embodiment, in the process of generating the retest task of the interface to be tested according to the execution logic and the preset parameter information, first a first parameter of the execution logic is acquired, where the first parameter is a parameter included in the execution logic, for example, the execution logic includes parameters a, B and C, then a matched second parameter is acquired from the preset parameter information according to the first parameter, and a second parameter value of the second parameter is acquired, specifically, information of the same semantics as the first parameter in the preset parameter information is screened out through semantic recognition, as a second parameter, for example, the second parameter matched with the first parameter a is X1, the second parameter matched with the first parameter B is X2, then a data value included in the second parameter is acquired, and the second parameter value is configured as a parameter value of the first parameter, that is, the parameter value of the first parameter in the execution logic is configured as the second parameter value, and then the second parameter value is generated according to the execution logic and the second parameter value, and the second parameter value is the second parameter value, and the retest task is the interface to be tested is comprehensively, and thus the task to be tested is comprehensively tested, and the task to be tested is completed.
Referring to fig. 2, the present application further provides a configuration device for interface test, including:
A log obtaining module 10, configured to obtain production log information of a development project;
An interface identification module 20, configured to identify the production log information based on a preconfigured grammar feature, and obtain interface information in the production log information;
The test result module 30 is configured to obtain test result information obtained after the test task preconfigured in the development project is executed from a test tool;
the result analysis module 40 is configured to identify the test result information according to a natural language algorithm, and obtain a test interface included in the test task and execution data corresponding to the test interface;
The interface matching module 50 is configured to match the test interface with the interface information in a consistent manner, and determine execution data corresponding to the test interface with consistency meeting the requirement as test data of the interface information;
and the test statistics module 60 is configured to determine interface coverage information of the test task according to the test data of the interface information.
As described above, it will be understood that each component of the configuration apparatus for interface test set forth in the present application may implement the functions of any one of the configuration methods for interface test set forth above.
In one embodiment, the identifying the production log information based on the preconfigured grammar features, and obtaining interface information in the production log information includes:
The type of the interface information is obtained from a preconfigured interface library, wherein the type comprises a service interface type and a non-service interface type;
matching corresponding grammar characteristics from a grammar library according to the type as preconfigured grammar characteristics;
And identifying the production log information based on the preconfigured grammar characteristics, and acquiring service interface information and non-service interface information in the production log information.
In one embodiment, the identifying the test result information according to a natural language algorithm, and obtaining a test interface included in the test task and execution data corresponding to the test interface include:
Identifying the test result information according to a natural language algorithm, and acquiring entity information matched with a preset keyword in the test result information, wherein the entity information characterizes a test interface of the test task;
determining the content range of the corresponding test interface according to the entity information;
and identifying content information in the content range according to a natural language algorithm, and acquiring execution data corresponding to the test interface.
In one embodiment, the identifying the content information in the content range according to a natural language algorithm, and obtaining the execution data corresponding to the test interface includes:
Acquiring priori knowledge data of the entity information;
configuring the prior knowledge data with the natural language algorithm to obtain a natural language algorithm with prior knowledge;
And identifying content information in the content range according to the natural language algorithm of the priori knowledge, and acquiring execution data corresponding to the test interface.
In one embodiment, the obtaining, from a test tool, test result information obtained after the execution of the test task preconfigured in the development project includes:
acquiring a first version number of the development project according to the production log information;
determining a second version number of the test task according to the first version number;
and acquiring test result information obtained after the test task of the second version number is executed from the test tool.
In one embodiment, after determining the interface coverage information of the test task according to the test data of the interface information, the method further includes:
acquiring interface information to be tested which does not meet the coverage requirement according to the interface coverage information;
Acquiring execution logic of the interface to be tested corresponding to the interface information to be tested from the development project;
and generating a retest task of the interface to be tested according to the execution logic and preset parameter information.
In one embodiment, the generating the retest task of the interface to be tested according to the execution logic and the preset parameter information includes:
Acquiring a first parameter of the execution logic;
acquiring a matched second parameter and a second parameter value of the second parameter from the preset parameter information according to the first parameter;
configuring a parameter value of the first parameter in the execution logic as the second parameter value;
And generating a retest task of the interface to be tested according to the execution logic and the second parameter value.
Referring to fig. 3, in an embodiment of the present application, there is further provided a computer device, which may be a mobile terminal, and an internal structure thereof may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a display device and an input device connected by a system bus. The network interface of the computer device is used for communicating with an external terminal through network connection. The input means of the computer device is for receiving input from a user. The computer is designed to provide computing and control capabilities. The memory of the computer device includes a storage medium. The storage medium stores an operating system, computer programs, and a database. The database of the computer device is used for storing data. The computer program, when executed by a processor, implements a method of configuration of an interface test.
The configuration method for executing the interface test by the processor comprises the steps of obtaining production log information of development engineering, identifying the production log information based on preconfigured grammar characteristics, obtaining interface information in the production log information, obtaining test result information obtained after the execution of a test task preconfigured by the development engineering from a test tool, identifying the test result information according to a natural language algorithm, obtaining a test interface contained in the test task and execution data corresponding to the test interface, carrying out consistency matching on the test interface and the interface information, determining the execution data corresponding to the test interface meeting the requirements as the test data of the interface information, and determining interface coverage information of the test task according to the test data of the interface information.
The computer equipment provides an interface coverage analysis method of an interface test task, which comprises the steps of firstly obtaining production log information of a development project, identifying the log information based on pre-configured grammar characteristics, obtaining interface information in the log information, wherein the interface information comprises interface definition, names and associated operation data, so as to obtain the interface used in the development project and access data of all interfaces in a production environment, carrying out interface test by the development project configuration test task, obtaining test result information obtained after the test task pre-configured by the development project is executed from the test tool, identifying the test result information according to natural language, obtaining test interfaces contained by the test task and execution data corresponding to the test interfaces, carrying out consistency matching on the test interfaces and the interface information, then determining the execution data corresponding to the test interfaces meeting the requirements as the test data of the interface information, determining the interface coverage information of the test task according to the test data of the interface information, so as to verify whether the test task comprehensively and accurately covers all interfaces of the development project, obtaining test result information obtained after the test task pre-configured by the test task is executed, obtaining the test interface and the execution data corresponding to the test interface contained by the test task, carrying out consistency matching, and carrying out test data corresponding to the test interface, and carrying out test coverage analysis on the test task according to the test environment, thereby improving the test efficiency, and the test efficiency.
An embodiment of the present application further provides a computer-readable storage medium having stored thereon a computer program which, when executed by the processor, implements a configuration method of an interface test, including the steps of obtaining production log information of a development project; the method comprises the steps of identifying production log information based on preconfigured grammar characteristics, obtaining interface information in the production log information, obtaining test result information obtained after a test task preconfigured by development engineering is executed from a test tool, identifying the test result information according to a natural language algorithm, obtaining a test interface contained by the test task and execution data corresponding to the test interface, carrying out consistency matching on the test interface and the interface information, determining the execution data corresponding to the test interface meeting the consistency requirement as the test data of the interface information, and determining interface coverage information of the test task according to the test data of the interface information.
The method comprises the steps of firstly obtaining production log information of a development project, identifying the log information based on preconfigured grammar characteristics, obtaining interface information in the log information, wherein the interface information comprises interface definition, names and associated operation data, so as to obtain interfaces used in the development project and access data of all interfaces in a production environment, configuring the test task by the development project to perform interface test, obtaining test result information obtained after the test task preconfigured by the development project is executed from the test tool, identifying the test result information according to natural language, obtaining test interfaces contained by the test task and execution data corresponding to the test interfaces, performing consistency matching on the test interfaces and the interface information, determining the execution data corresponding to the test interfaces meeting requirements as the test data of the interface information, determining the interface coverage information of the test task according to the test data of the interface information, thereby improving the production environment coverage rate, improving the test efficiency, updating the test environment, updating the test efficiency, and improving the test efficiency, and maintaining the test environment.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above.
Any reference to memory, storage, database, or other medium provided by the present application and used in embodiments may include non-volatile and/or volatile memory.
The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, apparatus, article, or method that comprises the element.
The foregoing is merely a preferred embodiment of the present application and is not intended to limit the scope of the application.
All equivalent structures or equivalent flow changes made by the specification and the attached drawings of the application or directly or indirectly applied to other related technical fields are included in the protection scope of the application.

Claims (6)

CN202111539801.1A2021-12-152021-12-15 Configuration method, device, computer equipment and storage medium for interface testingActiveCN114048082B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111539801.1ACN114048082B (en)2021-12-152021-12-15 Configuration method, device, computer equipment and storage medium for interface testing

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111539801.1ACN114048082B (en)2021-12-152021-12-15 Configuration method, device, computer equipment and storage medium for interface testing

Publications (2)

Publication NumberPublication Date
CN114048082A CN114048082A (en)2022-02-15
CN114048082Btrue CN114048082B (en)2025-06-17

Family

ID=80213040

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111539801.1AActiveCN114048082B (en)2021-12-152021-12-15 Configuration method, device, computer equipment and storage medium for interface testing

Country Status (1)

CountryLink
CN (1)CN114048082B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114816986A (en)*2022-03-102022-07-29深圳市飞泉云数据服务有限公司Interface test method, device, terminal equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109471796A (en)*2018-10-162019-03-15平安证券股份有限公司 Interface testing method, device, computer equipment and storage medium
CN110647471A (en)*2019-09-262020-01-03招商局金融科技有限公司Interface test case generation method, electronic device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113434400A (en)*2021-06-242021-09-24未鲲(上海)科技服务有限公司Test case execution method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109471796A (en)*2018-10-162019-03-15平安证券股份有限公司 Interface testing method, device, computer equipment and storage medium
CN110647471A (en)*2019-09-262020-01-03招商局金融科技有限公司Interface test case generation method, electronic device and storage medium

Also Published As

Publication numberPublication date
CN114048082A (en)2022-02-15

Similar Documents

PublicationPublication DateTitle
CN109710508B (en)Test method, test device, test apparatus, and computer-readable storage medium
CN109783785B (en)Method and device for generating experiment detection report and computer equipment
CN112560372B (en)Chip prototype verification method, device, equipment and medium
CN113656404A (en)Data verification method and device, computer equipment and storage medium
CN112527815A (en)Script migration method and device for database, computer equipment and storage medium
CN112988595A (en)Dynamic synchronization test method, device, equipment and storage medium
CN110908895A (en) Page automated testing method, device, computer equipment and storage medium
CN114003692A (en)Contract text information processing method and device, computer equipment and storage medium
CN113282513B (en)Interface test case generation method and device, computer equipment and storage medium
CN113434395B (en)Automatic generation method, device, equipment and medium for test cases
CN111563051A (en)Crawler-based data verification method and device, computer equipment and storage medium
CN112612706A (en)Automated testing method, computer device and storage medium
CN113126955A (en)Random data generation method and device, intelligent terminal and storage medium
CN108399125B (en)Automatic testing method and device, computer equipment and storage medium
CN111767213B (en)Database check point testing method and device, electronic equipment and storage medium
WO2025123744A1 (en)Log sensitive information detection method and system, electronic device, and storage medium
CN114048082B (en) Configuration method, device, computer equipment and storage medium for interface testing
CN113609023A (en)Precise test method, device, equipment and storage medium
CN113051146B (en)Monkey-based testing method, apparatus, device and storage medium
CN112685309A (en)Unit testing method, unit testing device, storage medium and computer equipment
CN116820996A (en)Automatic generation method and device for integrated test cases based on artificial intelligence
CN114528215B (en) Interactive page testing method and element template generation method and device
CN113987511A (en) Method, device, computer equipment and storage medium for detecting SQL injection vulnerability
CN115859065A (en)Model evaluation method, device, equipment and storage medium
CN113326202A (en)UI automation test code generation method, device, equipment and medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp