CN114297082A - Method and device for generating program test point, storage medium and electronic equipment - Google Patents

Method and device for generating program test point, storage medium and electronic equipment Download PDF

Info

Publication number
CN114297082A
CN114297082A CN202111676882.XA CN202111676882A CN114297082A CN 114297082 A CN114297082 A CN 114297082A CN 202111676882 A CN202111676882 A CN 202111676882A CN 114297082 A CN114297082 A CN 114297082A
Authority
CN
China
Prior art keywords
interface information
information
target
service function
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
Application number
CN202111676882.XA
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111676882.XA priority Critical patent/CN114297082A/en
Publication of CN114297082A publication Critical patent/CN114297082A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a method and a device for generating program test points, a storage medium and electronic equipment, and relates to the field of financial science and technology. The method comprises the following steps: when the codes are stored, acquiring interface information corresponding to the codes, and inquiring whether the database stores the interface information or not, wherein the codes are codes corresponding to target project requirements; under the condition that the interface information is stored in the database, updating the service function information related to the interface information; under the condition that the interface information is not stored in the database, acquiring the service function information associated with the interface information, and storing the interface information and the service function information associated with the interface information; and receiving a calling request corresponding to the target interface information, and returning target service function information and target codes associated with the target interface information to generate a test point corresponding to the target interface information. Through the method and the device, the problem that the project test key points cannot be quickly and accurately acquired in the related technology is solved.

Description

Method and device for generating program test point, storage medium and electronic equipment
Technical Field
The application relates to the field of financial science and technology, in particular to a method and a device for generating program test points, a storage medium and electronic equipment.
Background
With the discovery of computer projects, more and more projects begin to manage projects according to a demand project management mode, i.e., project management and promotion are conducted mainly by user demands. However, when the project is performed in the requirement project management mode, abnormal situations can occur in the process of project propulsion caused by personnel working differences of development and testing personnel.
For example, the software requirements of a project are usually written by project development, but since developers are numerous and have no uniform writing specification, the writing modes of different development groups and different developers of the same development group are greatly different, and the test modes and test contents of the project provided by the developers are different from those used by the testers, the project testers need to communicate with the developers many times to obtain the test points and test contents of the whole project.
Aiming at the problem that the project test key points cannot be quickly and accurately obtained in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The application provides a method and a device for generating program test points, a storage medium and electronic equipment, which are used for solving the problem that project test key points cannot be quickly and accurately acquired in the related technology.
According to one aspect of the application, a method for generating a program test point is provided. The method comprises the following steps: when the codes are stored, acquiring interface information corresponding to the codes, and inquiring whether the database stores the interface information or not, wherein the codes are codes corresponding to target project requirements; under the condition that the interface information is stored in the database, updating the service function information related to the interface information; under the condition that the interface information is not stored in the database, acquiring the service function information associated with the interface information, and storing the interface information and the service function information associated with the interface information; and receiving a calling request corresponding to the target interface information, and returning target service function information and target codes associated with the target interface information to generate a test point corresponding to the target interface information.
Optionally, in the case that the interface information is already stored in the database, the updating the service function information associated with the interface information includes: judging whether the database stores the service function information related to the interface information; under the condition that the database does not store the service function information associated with the interface information, acquiring the service function information associated with the interface information and storing the service function information associated with the interface information; and under the condition that the database stores the service function information associated with the interface information, updating the service function information associated with the interface information.
Optionally, in a case that the database stores the service function information associated with the interface information, the updating the service function information associated with the interface information includes: determining whether the service function information associated with the interface information has errors; and under the condition that the service function information related to the interface information has errors, determining the wrong service function information and receiving modification information of the wrong service function information.
Optionally, the method further comprises: when the code is stored, under the condition that a packaging request for the code is received, whether interface information corresponding to the code and service function information related to the interface information are stored in a database or not is inquired; and under the condition that the interface information corresponding to the code and the service function information related to the interface information are not stored in the database, feeding back prompt information, wherein the prompt information is used for indicating that the interface information corresponding to the code and the service function information related to the interface information are not stored.
According to another aspect of the present application, another method for generating program test points is provided. The method comprises the following steps: determining target interface information corresponding to a target test requirement; target service function information and target codes related to target interface information are called from an information management system, wherein the codes, the interface information corresponding to the codes and the service function information related to the interface information are stored in the information management system; and generating a test point corresponding to the target interface information according to the target interface information, the target service function information and the target code.
Optionally, generating a test point corresponding to the target interface information according to the target interface information, the target service function information, and the target code includes: determining a test point generation template corresponding to a target test requirement; and adding the target interface information, the target service function information and the target code into a test point generation template to generate a test point corresponding to the target interface information.
According to another aspect of the present application, a program test point generation apparatus is provided. The device includes: the first acquisition unit is used for acquiring interface information corresponding to the code when the code is stored and inquiring whether the database stores the interface information or not; the updating unit is used for updating the service function information related to the interface information under the condition that the interface information is stored in the database; the second acquisition unit is used for acquiring the service function information related to the interface information under the condition that the interface information is not stored in the database, and storing the interface information and the service function information related to the interface information; and the first generating unit is used for receiving the calling request corresponding to the target interface information and returning the target service function information and the target code associated with the target interface information so as to generate the test point corresponding to the target interface information.
According to another aspect of the present application, a program test point generation apparatus is provided. The device includes: the determining unit is used for determining target interface information corresponding to the target test requirement; the system comprises a calling unit, a service management unit and a service management unit, wherein the calling unit is used for calling target service function information and target codes associated with target interface information from an information management system, and the codes, the interface information corresponding to the codes and the service function information associated with the interface information are stored in the information management system; and the second generating unit is used for generating the test point corresponding to the target interface information according to the target interface information, the target service function information and the target code.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium for storing a program, where the program, when executed, controls a device on which the computer-readable storage medium is located to execute a method for generating a program test point.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory; the memory stores computer readable instructions, and the processor is used for executing the computer readable instructions, wherein the computer readable instructions execute a program test point generation method when running.
By the application, the following method is adopted: when the codes are stored, interface information corresponding to the codes is obtained, whether the interface information is stored in a database or not is inquired, wherein the codes are codes corresponding to target project requirements, under the condition that the interface information is stored in the database, service function information related to the interface information is updated, under the condition that the interface information is not stored in the database, the service function information related to the interface information is obtained, the interface information and the service function information related to the interface information are stored, a calling request corresponding to the target interface information is received, and the target service function information related to the target interface information and the target codes are returned to generate test points corresponding to the target interface information. The interface information and the service function information corresponding to the interface information are correspondingly stored, and a plurality of test points corresponding to a plurality of interface information contained in the code are automatically generated through the interface information, the code and the service function information, so that the effect of quickly and accurately acquiring all test key points of each project is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a schematic diagram of a system for generating program test points according to an embodiment of the present application;
fig. 2 is a flowchart of a method for generating program test points according to an embodiment of the present application;
fig. 3 is a flowchart of another method for generating program test points according to an embodiment of the present application;
fig. 4 is a schematic diagram of an apparatus for generating program test points according to an embodiment of the present application;
fig. 5 is a schematic diagram of another apparatus for generating program test points according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
The method, the apparatus, the storage medium, and the electronic device for generating the program test points determined by the present disclosure may be used in the financial field, and may also be used in any field other than the financial field.
According to an embodiment of the application, a system for generating a program test point is provided.
Fig. 1 is a schematic diagram of a system for generating program test points according to an embodiment of the present application. As shown in fig. 1, the system includes:
the information management system 101 is configured to store a code, and when the code is stored, query whether interface information corresponding to the stored code exists, store the interface information and service function information associated with the interface information if the interface information is not stored, and update the service function information associated with the interface information if the interface information exists, where the code is a code corresponding to a target project requirement.
Specifically, the information management system 101 may detect a plurality of interface information in the target added code when there is a new added target code in the version library git (distributed version control system), and query whether each interface is already stored in the version library git in the history code of the version library git through the interface information, and in a case that a part of interfaces are not stored, mark the part of interfaces that are not stored as the new added interfaces, obtain, to a developer, service function information corresponding to each new added interface, and store the new added interfaces and the corresponding service function information into the version library git, where the version library git repository may be a git management file, and the version library git may be set in the information management system 101.
It should be noted that, under the condition that the remaining part of the interfaces are stored in the version library git, the stored interfaces are marked as modified interfaces, and whether each modified interface has corresponding service function information is judged, when the corresponding service function information exists, the service function information is submitted to a developer for checking, and when the service function information has an error, the stored service function information is modified in time to obtain the modified service function information corresponding to the modified interfaces.
And the test point generation system 102 is connected with the information management system 101, and is configured to receive the target interface information, call target service function information and a target code associated with the target interface information from the information management system, and generate a test point corresponding to the target interface information according to the target interface information, the target service function information, and the target code.
Specifically, after the developer checks and supplements all interface information of the code and the service function information corresponding to the interface information in the information management system 101, the tester inputs the interface information corresponding to the target test requirement into the test point generation system when receiving the target test requirement, and at this time, the test point generation system 102 obtains the code and the service function information corresponding to the interface information and generates the test point corresponding to the target test requirement according to the test content corresponding to the service function information.
The generation system of the program test point provided by the embodiment of the application is used for storing the code through the information management system 101, inquiring whether interface information corresponding to the stored code exists or not when the code is stored, storing the interface information and service function information associated with the interface information under the condition that the interface information is not stored, and updating the service function information associated with the interface information under the condition that the interface information exists, wherein the code is a code corresponding to the requirement of a target project; and the test point generation system 102 is connected with the information management system 101, and is configured to receive the target interface information, call target service function information and a target code associated with the target interface information from the information management system, and generate a test point corresponding to the target interface information according to the target interface information, the target service function information, and the target code. The problem that the project testing key points can not be rapidly and accurately acquired in the related technology is solved. The interface information and the service function information corresponding to the interface information are correspondingly stored, and a plurality of test points corresponding to a plurality of interface information contained in the code are automatically generated through the interface information, the code and the service function information, so that the effect of quickly and accurately acquiring all test key points of each project is achieved.
Optionally, in the system for generating a program test point provided in the embodiment of the present application, the information management system 101 includes: the database is used for storing the codes and storing interface information corresponding to the codes and service function information related to the interface information; the user interface is used for inquiring whether interface information corresponding to the stored code exists or not when the code is stored, and displaying a first editing interface on the user interface under the condition that the interface information is not stored, wherein the first editing interface is used for receiving newly added information, the newly added information comprises the interface information and service function information related to the interface information, and displaying a second editing interface on the user interface under the condition that the interface information exists, the second editing interface is used for receiving updated information, and the updated information comprises updated information of the service function information related to the interface information.
Specifically, the database may be a version library git, and after the developer completes setting of the interface information and the corresponding service function information, the code, the interface information corresponding to the code, and the service function information corresponding to the interface information may be correspondingly stored in the version library git.
It should be noted that after the target code is obtained, a plurality of interface information in the target code needs to be obtained, and the interface information is queried in the version library git, and for the interface information that is not queried, the interface information that is not queried will be displayed in the user interface in the information management system 101, and a developer is prompted to input the interface information and the corresponding service function information; for the inquired interface information, the user interface in the information management system 101 displays the inquired interface information and the stored service function information corresponding to the interface information, and prompts a developer to check the stored service function information and modify the wrong service function information in the user interface. According to the embodiment, the data foundation is laid for the correct generation of the subsequent test points by adding and modifying the service information in time.
According to an embodiment of the application, a method for generating a program test point is provided.
Fig. 2 is a flowchart of a method for generating a program test point according to an embodiment of the present application. As shown in fig. 2, the method includes:
step S201, when the code is stored, acquiring the interface information corresponding to the code, and inquiring whether the database stores the interface information, wherein the code is the code corresponding to the target project requirement.
Specifically, after the information management system acquires the object code, it needs to acquire a plurality of interface information in the object code, and can query the interface information in the version library git in the information management system to determine whether there is interface information corresponding to the object code in the version library git.
Step S202, under the condition that the interface information is stored in the database, the service function information related to the interface information is updated.
Specifically, under the condition that part of the interfaces in the target code are stored in the version library git, the stored interfaces are marked as modified interfaces, whether each modified interface has corresponding business function information or not is judged, the business function information is delivered to developers when the corresponding business function information exists, and the developers can correspondingly modify the business function information according to different codes to obtain the modified business function information corresponding to the modified interfaces.
Step S203, in the case that the interface information is not stored in the database, acquiring the service function information associated with the interface information, and storing the interface information and the service function information associated with the interface information.
Specifically, when part of the interfaces in the target code are not stored, the interfaces that are not stored may be marked as new interfaces, the service function information corresponding to each new interface is obtained from the developer, and the new interfaces and the corresponding service function information are stored in the version library git.
Step S204, receiving a call request corresponding to the target interface information, and returning target service function information and target codes associated with the target interface information to generate a test point corresponding to the target interface information.
Specifically, after a developer checks and supplements all interface information of a code and service function information corresponding to the interface information in an information management system, when the tester receives a target test requirement, the tester inputs the interface information corresponding to the target test requirement into a test point generation system, at this time, the test point generation system sends the interface information to be acquired to the information management system, at this time, the information management system searches according to the interface information to be acquired, and sends the searched interface information and the service function information corresponding to the interface information to the test point generation system, and the test point generation system can generate a corresponding code test point through the acquired interface information and the service function information corresponding to the interface information.
According to the method for generating the program test points, when the codes are stored, interface information corresponding to the codes is obtained, whether the interface information is stored in a database or not is inquired, wherein the codes are codes corresponding to target project requirements, under the condition that the interface information is stored in the database, service function information associated with the interface information is updated, under the condition that the interface information is not stored in the database, service function information associated with the interface information is obtained, the interface information and the service function information associated with the interface information are stored, a calling request corresponding to the target interface information is received, and the target service function information associated with the target interface information and the target codes are returned to generate the test points corresponding to the target interface information, so that the problem that the key points of the project test cannot be quickly and accurately obtained in the related technology is solved. The interface information and the service function information corresponding to the interface information are correspondingly stored, and a plurality of test points corresponding to a plurality of interface information contained in the code are automatically generated through the interface information, the code and the service function information, so that the effect of quickly and accurately acquiring all test key points of each project is achieved.
Optionally, in the method for generating a program test point provided in this embodiment of the present application, in a case that interface information is already stored in a database, updating service function information associated with the interface information includes: judging whether the database stores the service function information related to the interface information; under the condition that the database does not store the service function information associated with the interface information, acquiring the service function information associated with the interface information and storing the service function information associated with the interface information; and under the condition that the database stores the service function information associated with the interface information, updating the service function information associated with the interface information.
Specifically, after the information management system inquires the interface information in the version library git and sets the interface information as a modification interface, whether the modification interface stored in the version library git has corresponding service function information needs to be determined, when the corresponding service function information does not exist, the service function information corresponding to the modification interface is acquired from a developer, and the newly added service function information is stored in the version library git; and when corresponding service function information exists, correspondingly changing the service function information according to the specific modification condition of the target code. The embodiment enables the modification interfaces to have corresponding service function information, and prevents the phenomenon of lacking the service function information when the subsequent test points are generated.
Optionally, in the method for generating a program test point provided in this embodiment of the present application, in a case that the database stores service function information associated with the interface information, updating the service function information associated with the interface information includes: determining whether the service function information associated with the interface information has errors; and under the condition that the service function information related to the interface information has errors, determining the wrong service function information and receiving modification information of the wrong service function information.
Specifically, when the modification interface has corresponding service function information in the information management system, it is determined whether the service function information is the same as the service function information corresponding to the object code, and the modification interface is not modified under the same condition, and can be directly used. The embodiment ensures that the business function information corresponding to the modification interface is accurate, and lays a data foundation for the accurate generation of the subsequent test points.
Optionally, in the method for generating a program test point provided in the embodiment of the present application, the method further includes: when the code is stored, under the condition that a packaging request for the code is received, whether interface information corresponding to the code and service function information related to the interface information are stored in a database or not is inquired; and under the condition that the interface information corresponding to the code and the service function information related to the interface information are not stored in the database, feeding back prompt information, wherein the prompt information is used for indicating that the interface information corresponding to the code and the service function information related to the interface information are not stored.
Specifically, after business function information corresponding to all interface information in the object code is newly added and modified, version packing operation is performed on the object code, after a version packing instruction is received, the information management system performs traversal check on all interface information corresponding to the object code to judge whether each interface information has corresponding business function information, packing operation of the object code is performed under the condition that each interface information has corresponding business function information, and when it is checked that certain interface information does not have corresponding business function information, feedback information is sent out, wherein the feedback information can be content of the interface information and warning information lacking the business function information. The embodiment achieves the effect of preventing the target code information from having the interface information without corresponding business function information.
According to an embodiment of the application, another program test point generation method is provided.
Fig. 3 is a flowchart of another method for generating program test points according to an embodiment of the present application. As shown in fig. 3, the method includes:
step S301, determining target interface information corresponding to the target test requirement.
Step S302, target service function information and target codes related to the target interface information are called from the information management system, wherein the codes, the interface information corresponding to the codes and the service function information related to the interface information are stored in the information management system.
Step S303, generating a test point corresponding to the target interface information according to the target interface information, the target service function information and the target code.
Specifically, when a test point generation system receives a newly added test requirement, required interface information needs to be acquired first, and information unification between developers and testers is performed according to the interface information, so that errors in test contents are prevented. After the required interface information is obtained, the required interface information needs to be sent to the information management system, at this time, the information management system searches according to the required interface information and sends the searched interface information and the service function information corresponding to the interface information to the test point generation system, and the test point generation system can generate the test point corresponding to the target test requirement through the obtained test content corresponding to the service function information corresponding to the interface information and the interface information.
Optionally, in the method for generating a program test point provided in this embodiment of the present application, generating a test point corresponding to target interface information according to the target interface information, the target service function information, and the target code includes: determining a test point generation template corresponding to a target test requirement; and adding the target interface information, the target service function information and the target code into a test point generation template to generate a test point corresponding to the target interface information.
Specifically, the layout and format requirements of the content of the test point are determined in the test point generation template, the target interface information, the target service function information and the target code can be converted into a format specified by the template, and the converted information is added to corresponding columns in the template to obtain the test point corresponding to the target interface information. Through the embodiment, the purpose of generating the test points in a personalized manner is achieved.
According to the method for generating the program test point, the target interface information corresponding to the target test requirement is determined; target service function information and target codes related to target interface information are called from an information management system, wherein the codes, the interface information corresponding to the codes and the service function information related to the interface information are stored in the information management system; and generating a test point corresponding to the target interface information according to the target interface information, the target service function information and the target code. The problem that the project testing key points can not be rapidly and accurately acquired in the related technology is solved. The interface information and the service function information corresponding to the interface information are correspondingly stored, and a plurality of test points corresponding to a plurality of interface information contained in the code are automatically generated through the interface information, the code and the service function information, so that the effect of quickly and accurately acquiring all test key points of each project is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a device for generating program test points, and it should be noted that the device for generating program test points according to the embodiment of the present application may be used to execute the method for generating program test points according to the embodiment of the present application. The following describes a device for generating a program test point according to an embodiment of the present application.
Fig. 4 is a schematic diagram of an apparatus for generating program test points according to an embodiment of the present application. As shown in fig. 4, the apparatus includes: a first obtaining unit 41, a first updating unit 42, a second obtaining unit 42, and a first generating unit 44.
Specifically, the first obtaining unit 41 is configured to, when storing a code, obtain interface information corresponding to the code, and query whether the database stores the interface information, where the code is a code corresponding to a target project requirement.
And an updating unit 42, configured to update the service function information associated with the interface information when the interface information is already stored in the database.
A second obtaining unit 43, configured to, in a case that the interface information is not stored in the database, obtain service function information associated with the interface information, and store the interface information and the service function information associated with the interface information.
The first generating unit 44 is configured to receive a call request corresponding to the target interface information, and return target service function information and a target code associated with the target interface information to generate a test point corresponding to the target interface information.
The device for generating the program test point provided in the embodiment of the application is configured to, through the first obtaining unit 41, obtain interface information corresponding to a code when the code is stored, and query whether the database stores the interface information, where the code is a code corresponding to a target project requirement; an updating unit 42, configured to update service function information associated with the interface information when the interface information is already stored in the database; a second obtaining unit 43, configured to obtain, when the interface information is not stored in the database, service function information associated with the interface information, and store the interface information and the service function information associated with the interface information; the first generating unit 44 is configured to receive a call request corresponding to the target interface information, and return target service function information and a target code associated with the target interface information to generate a test point corresponding to the target interface information. The problem that the project testing key points can not be rapidly and accurately acquired in the related technology is solved. The interface information and the service function information corresponding to the interface information are correspondingly stored, and a plurality of test points corresponding to a plurality of interface information contained in the code are automatically generated through the interface information, the code and the service function information, so that the effect of quickly and accurately acquiring all test key points of each project is achieved.
Optionally, in the apparatus for generating a program test point provided in this embodiment of the present application, the updating unit 42 includes: the judging module is used for judging whether the database stores the service function information related to the interface information; the acquisition module is used for acquiring the service function information associated with the interface information and storing the service function information associated with the interface information under the condition that the database does not store the service function information associated with the interface information; and the updating module is used for updating the service function information related to the interface information under the condition that the service function information related to the interface information is stored in the database.
Optionally, in the apparatus for generating a program test point provided in the embodiment of the present application, the update module includes: the determining submodule is used for determining whether the business function information related to the interface information has errors; and the receiving submodule is used for determining wrong service function information under the condition that the service function information related to the interface information has errors, and receiving modification information of the wrong service function information.
Optionally, in the apparatus for generating a program test point provided in this embodiment of the present application, the apparatus further includes: the query unit is used for querying whether interface information corresponding to the code and service function information associated with the interface information are stored in a database under the condition that a packaging request aiming at the code is received when the code is stored; and the feedback unit is used for feeding back prompt information under the condition that the interface information corresponding to the code and the service function information related to the interface information are not stored in the database, wherein the prompt information is used for indicating that the interface information corresponding to the code and the service function information related to the interface information are not stored.
The embodiment of the present application further provides another device for generating program test points, and it should be noted that the another device for generating program test points of the embodiment of the present application may be used to execute another method for generating program test points provided in the embodiment of the present application. Another program test point generation apparatus provided in the embodiments of the present application is described below.
Fig. 5 is a schematic diagram of another apparatus for generating program test points according to an embodiment of the present application. As shown in fig. 5, the apparatus includes: a determining unit 51, a calling unit 52 and a second generating unit 53.
Specifically, the determining unit 51 is configured to determine target interface information corresponding to the target test requirement.
The invoking unit 52 is configured to invoke the target service function information and the target code associated with the target interface information from the information management system, where the code, the interface information corresponding to the code, and the service function information associated with the interface information are stored in the information management system.
And a second generating unit 53, configured to generate a test point corresponding to the target interface information according to the target interface information, the target service function information, and the target code.
Optionally, in the apparatus for generating a program test point provided in the embodiment of the present application, the second generating unit 53 includes: the determining module is used for determining a test point generation template corresponding to the target test requirement; and the generating module is used for adding the target interface information, the target service function information and the target code into the test point generating template to generate the test point corresponding to the target interface information.
The device for generating the program test point provided in the embodiment of the present application is configured to determine, by the determining unit 51, target interface information corresponding to a target test requirement; a calling unit 52, configured to call target service function information and a target code associated with target interface information from an information management system, where the code, interface information corresponding to the code, and service function information associated with the interface information are stored in the information management system; and a second generating unit 53, configured to generate a test point corresponding to the target interface information according to the target interface information, the target service function information, and the target code. The problem that the project testing key points can not be rapidly and accurately acquired in the related technology is solved. The interface information and the service function information corresponding to the interface information are correspondingly stored, and a plurality of test points corresponding to a plurality of interface information contained in the code are automatically generated through the interface information, the code and the service function information, so that the effect of quickly and accurately acquiring all test key points of each project is achieved.
The generating device of the program test point comprises a processor and a memory, wherein the first acquiring unit 41, the first updating unit 42, the second acquiring unit 43, the first generating unit 44, the determining unit 51, the calling unit 52, the second generating unit 53 and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem that the project test key points cannot be quickly and accurately obtained in the related technology is solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes a memory chip.
The embodiment of the invention provides a computer readable storage medium, wherein a program is stored on the computer readable storage medium, and the program realizes the generation method of the program test point when being executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the generation method of the program test point is executed when the program runs.
As shown in fig. 6, an embodiment of the present invention provides an electronic device, where the electronic device 61 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor executes the program to implement the following steps: when the codes are stored, acquiring interface information corresponding to the codes, and inquiring whether the database stores the interface information or not, wherein the codes are codes corresponding to target project requirements; under the condition that the interface information is stored in the database, updating the service function information related to the interface information; under the condition that the interface information is not stored in the database, acquiring the service function information associated with the interface information, and storing the interface information and the service function information associated with the interface information; and receiving a calling request corresponding to the target interface information, and returning target service function information and target codes associated with the target interface information to generate a test point corresponding to the target interface information. Or, determining target interface information corresponding to the target test requirement; target service function information and target codes related to target interface information are called from an information management system, wherein the codes, the interface information corresponding to the codes and the service function information related to the interface information are stored in the information management system; and generating a test point corresponding to the target interface information according to the target interface information, the target service function information and the target code. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: when the codes are stored, acquiring interface information corresponding to the codes, and inquiring whether the database stores the interface information or not, wherein the codes are codes corresponding to target project requirements; under the condition that the interface information is stored in the database, updating the service function information related to the interface information; under the condition that the interface information is not stored in the database, acquiring the service function information associated with the interface information, and storing the interface information and the service function information associated with the interface information; and receiving a calling request corresponding to the target interface information, and returning target service function information and target codes associated with the target interface information to generate a test point corresponding to the target interface information. Or, determining target interface information corresponding to the target test requirement; target service function information and target codes related to target interface information are called from an information management system, wherein the codes, the interface information corresponding to the codes and the service function information related to the interface information are stored in the information management system; and generating a test point corresponding to the target interface information according to the target interface information, the target service function information and the target code.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for generating a program test point is characterized by comprising the following steps:
when a code is stored, acquiring interface information corresponding to the code, and inquiring whether the interface information is stored in a database, wherein the code is a code corresponding to a target project requirement;
under the condition that the interface information is stored in the database, updating the service function information related to the interface information;
under the condition that the interface information is not stored in the database, acquiring the service function information associated with the interface information, and storing the interface information and the service function information associated with the interface information;
and receiving a calling request corresponding to target interface information, and returning target service function information and target codes associated with the target interface information to generate a test point corresponding to the target interface information.
2. The method according to claim 1, wherein in the case that the interface information is already stored in the database, updating the service function information associated with the interface information comprises:
judging whether the database stores the service function information associated with the interface information;
under the condition that the database does not store the service function information associated with the interface information, acquiring the service function information associated with the interface information and storing the service function information associated with the interface information;
and under the condition that the service function information associated with the interface information is stored in the database, updating the service function information associated with the interface information.
3. The method according to claim 2, wherein in a case that the service function information associated with the interface information is stored in the database, updating the service function information associated with the interface information comprises:
determining whether the service function information associated with the interface information has errors;
and determining wrong service function information under the condition that the service function information related to the interface information has errors, and receiving modification information of the wrong service function information.
4. The method of claim 1, further comprising:
when the code is stored, under the condition that a packaging request for the code is received, inquiring whether the interface information corresponding to the code and the service function information related to the interface information are stored in the database;
and feeding back prompt information under the condition that the interface information corresponding to the code and the service function information associated with the interface information are not stored in the database, wherein the prompt information is used for indicating that the interface information corresponding to the code and the service function information associated with the interface information are not stored.
5. A method for generating a program test point is characterized by comprising the following steps:
determining target interface information corresponding to a target test requirement;
calling target service function information and target codes associated with the target interface information from an information management system, wherein codes, interface information corresponding to the codes and service function information associated with the interface information are stored in the information management system;
and generating a test point corresponding to the target interface information according to the target interface information, the target service function information and the target code.
6. The method of claim 5, wherein generating the test point corresponding to the target interface information according to the target interface information, the target service function information, and the target code comprises:
determining a test point generation template corresponding to the target test requirement;
and adding the target interface information, the target service function information and the target code into the test point generation template to generate the test point corresponding to the target interface information.
7. An apparatus for generating program test points, comprising:
the first acquisition unit is used for acquiring interface information corresponding to a code when the code is stored and inquiring whether a database stores the interface information or not;
the updating unit is used for updating the service function information related to the interface information under the condition that the interface information is stored in the database;
a second obtaining unit, configured to obtain the service function information associated with the interface information and store the interface information and the service function information associated with the interface information when the interface information is not stored in the database;
and the first generating unit is used for receiving a calling request corresponding to the target interface information and returning the target service function information and the target code associated with the target interface information so as to generate the test point corresponding to the target interface information.
8. An apparatus for generating program test points, comprising:
the determining unit is used for determining target interface information corresponding to the target test requirement;
the system comprises a calling unit and a processing unit, wherein the calling unit is used for calling target service function information and target codes related to the target interface information from an information management system, and codes, interface information corresponding to the codes and service function information related to the interface information are stored in the information management system;
and the second generating unit is used for generating the test point corresponding to the target interface information according to the target interface information, the target service function information and the target code.
9. A computer-readable storage medium, wherein the computer-readable storage medium is used for storing a program, and wherein the program when executed controls a device in which the computer-readable storage medium is located to execute the method for generating program test points in any one of claims 1 to 4, or the method for generating program test points in any one of claims 5 to 6.
10. An electronic device comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for generating program test points of any of claims 1-4 or the method for generating program test points of any of claims 5-6.
CN202111676882.XA 2021-12-31 2021-12-31 Method and device for generating program test point, storage medium and electronic equipment Pending CN114297082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111676882.XA CN114297082A (en) 2021-12-31 2021-12-31 Method and device for generating program test point, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111676882.XA CN114297082A (en) 2021-12-31 2021-12-31 Method and device for generating program test point, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114297082A true CN114297082A (en) 2022-04-08

Family

ID=80975286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111676882.XA Pending CN114297082A (en) 2021-12-31 2021-12-31 Method and device for generating program test point, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114297082A (en)

Similar Documents

Publication Publication Date Title
CN107992307B (en) Function compiling method and device
CN110569035B (en) Code compiling method, device, equipment and storage medium of software development project
CN108170465B (en) Version information management method, electronic equipment and readable storage medium
CN111158741B (en) Method and device for monitoring dependency relationship change of service module on third party class library
US20170286264A1 (en) System and method for data element tracing
CN112181804A (en) Parameter checking method, equipment and storage medium
CN111104158A (en) Software packaging method and device, computer equipment and storage medium
US11537367B1 (en) Source code conversion from application program interface to policy document
US20120159515A1 (en) Sharing object representations
CN115686631B (en) Random instruction generation method and device based on knowledge base and storage medium
CN113641592A (en) Test sequence generation method and device
CN111522881B (en) Service data processing method, device, server and storage medium
CN109977317B (en) Data query method and device
CN114297082A (en) Method and device for generating program test point, storage medium and electronic equipment
CN104298589A (en) Performance test method and performance test equipment
CN115934129A (en) Software project updating method and device, computer equipment and storage medium
CN114791884A (en) Test environment construction method and device, storage medium and electronic equipment
CN112559444A (en) SQL (structured query language) file migration method and device, storage medium and equipment
CN112346761A (en) Front-end resource online method, equipment, system and storage medium
CN114579466A (en) Method, device, equipment and medium for constructing test case and code test
CN112540915A (en) Interface test method, device and system
CN112749159A (en) Form generation method and device, electronic equipment and storage medium
US11940870B2 (en) Method and device for automatically detecting potential failures in mobile applications
US20220308956A1 (en) Verifying object file canisters using built-in reverse relocation integrity checking
CN114780595B (en) Verification method, verification device and verification system

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