CN117472734A - Test method, device, equipment and storage medium - Google Patents

Test method, device, equipment and storage medium Download PDF

Info

Publication number
CN117472734A
CN117472734A CN202311227963.0A CN202311227963A CN117472734A CN 117472734 A CN117472734 A CN 117472734A CN 202311227963 A CN202311227963 A CN 202311227963A CN 117472734 A CN117472734 A CN 117472734A
Authority
CN
China
Prior art keywords
request
test
information
response information
end module
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
CN202311227963.0A
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 CN202311227963.0A priority Critical patent/CN117472734A/en
Publication of CN117472734A publication Critical patent/CN117472734A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure provides a test method, apparatus, device, and storage medium, which may be applied to the field of computer technology, financial science and technology, or other related fields. The method comprises the following steps: responding to a test request sent by a first end module, and extracting interface configuration information from the test request; determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched; and generating a test response request suitable for performing functional test on the first end module according to the request response information.

Description

Test method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, financial technology, or other related fields, and more particularly, to a testing method, apparatus, device, medium, and program product.
Background
In a front-end and back-end separated project development process, the development time of a project is generally divided into three parts: front end development duration, back end development duration, front and back end joint test duration.
With the increasing complexity of the interactive flow between the current end and the back end of the development project, the required test duration is in a trend of increasing in the development flow of the new function of the new project, and the overall development efficiency of the project is negatively affected.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a test method, apparatus, device, storage medium, and program product.
According to a first aspect of the present disclosure, there is provided a test method comprising:
responding to a test request sent by a first end module, and extracting interface configuration information from the test request;
determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched;
and generating a test response request applicable to the function test of the first end module according to the request response information.
According to an embodiment of the present disclosure, generating a test response request suitable for performing a functional test on the first end module according to the request response information includes:
determining a target response information template related to the request response information from the initial response information template set;
based on the information conversion rule of the target response information template, carrying out information format conversion on the request response information to obtain target request response information; and
and generating the test response request according to the target request response information.
According to an embodiment of the present disclosure, the test request includes the request response information;
wherein, according to the matching result between the interface configuration information and the configuration information to be matched, determining the request response information related to the test request includes:
and determining the request response information from the test request under the condition that the matching result characterizes matching.
According to an embodiment of the present disclosure, determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched includes:
and under the condition that the matching result characterization is matched, determining request response information related to the test request from a preset initial request response information set according to the interface configuration information.
According to an embodiment of the present disclosure, the interface configuration information includes at least one of:
interface identification, test request address, test request type, test request parameters.
According to an embodiment of the present disclosure, the above test method further includes: and sending the test response request to the first end module.
According to an embodiment of the present disclosure, the above test method further includes:
determining second end request response information from a second end response request sent by a second end module, wherein the first end module and the second end module are arranged in a production environment;
comparing the request response information of the second end with the request response information to obtain a request response comparison result; and
and determining a test defect detection result related to the first end module according to the request response comparison result.
According to an embodiment of the present disclosure, the first end module includes a front end module; or the first end module may include a back end module.
A second aspect of the present disclosure provides a test apparatus comprising:
the extraction module is used for responding to the test request sent by the first end module and extracting interface configuration information from the test request;
the first determining module is used for determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched; and
and the generating module is used for generating a test response request suitable for carrying out functional test on the first end module according to the request response information.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a 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 perform the method.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the testing method, the device, the equipment, the storage medium and the program product, the interface configuration information is obtained from the front-end module, the request response information is determined by utilizing the matching result between the interface configuration information obtained from the front-end module and the configuration information to be matched, and the test response request is generated by the request response information, so that under the condition that the API interface of the back-end is not developed, the test of simulating the interactive function between the front-end module and the back-end module is realized according to the test response request, the waiting time for waiting for the development of the back-end in the project testing process is reduced, and the testing efficiency is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a test method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a test method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of another test method according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a system architecture diagram of a request response information format conversion method according to an embodiment of the present disclosure;
fig. 5 schematically illustrates a system architecture diagram of a request response information determination method according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart of yet another test method according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a system architecture diagram of a test method according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of a test apparatus according to an embodiment of the present disclosure; and
fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement a test method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical solution of the present disclosure, the related user information (including, but not limited to, user personal information, user image information, user equipment information, such as location information, etc.) and data (including, but not limited to, data for analysis, stored data, displayed data, etc.) are information and data authorized by the user or sufficiently authorized by each party, and the related data is collected, stored, used, processed, transmitted, provided, disclosed, applied, etc. and processed, all in compliance with the related laws and regulations and standards of the related country and region, necessary security measures are taken, no prejudice to the public order, and corresponding operation entries are provided for the user to select authorization or rejection.
The inventor finds that in the development flow of the new function of the new project, the development time of the front end depends not only on the time consumption of the development part of the front end, but also on the time of completion of the back end development. Therefore, the development of the front end needs to be performed after the development of the API interface aiming at the front end is completed, and the testing efficiency is low. In view of this, the present disclosure provides a testing method, which may determine request response information by obtaining interface configuration information from a front end module and using a matching result between the interface configuration information and configuration information to be matched, thereby generating a test response request, so as to implement joint testing of the front end module and the back end module under the condition that the API interface of the back end is not developed, reduce waiting time for waiting for development of the back end, and improve testing efficiency.
The embodiment of the disclosure provides a test method, a test device, test equipment and a storage medium. The method comprises the following steps: responding to a test request sent by a first end module, and extracting interface configuration information from the test request; determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched; and generating a test response request suitable for performing functional test on the first end module according to the request response information.
Fig. 1 schematically illustrates an application scenario diagram of a test method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (but not limited to), may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g. the web page, information, or data obtained or generated according to the user test requirement) to the terminal device.
It should be noted that the test method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the testing apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The test method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the test apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a test method according to an embodiment of the disclosure.
As shown in fig. 2, the test method of this embodiment includes operations S210 to S230.
In response to receiving the test request sent from the first end module, interface configuration information is extracted from the test request in operation S210.
According to the embodiment of the disclosure, the first end module may include a front end module, for example, a front end module that needs to perform joint testing with the back end in the testing process, and the testing method provided by the embodiment of the disclosure may be applied to construct a virtual back end module, so as to implement joint testing on the front end module under the condition that the back end is not developed. Or, the first end module may further include a back end module, for example, a back end module that needs to perform joint testing with the front end in the testing process, and the testing method provided by the embodiment of the disclosure may be applied to building a virtual back end module, so as to implement joint testing on the front end module under the condition that the back end is not developed.
It should be understood that the front end module and the back end module in the embodiments of the present disclosure may be simply referred to as front end and back end.
In order to facilitate explanation of the test method provided by the embodiments of the present disclosure, the following explains the first end module as the front end module.
According to an embodiment of the present disclosure, the test request may be parameter request information transmitted from the front-end module of the user, and the extracted interface configuration information may include an interface identifier, test request address information (URL of the test request), type information of the request, request parameter information, request response information, and the like by extracting interface configuration information in the parameter request information transmitted from the front-end module. In particular, in the present disclosure, table 1 is taken as an example to illustrate that table 1 is an interface configuration information schematic according to an embodiment of the present disclosure:
TABLE 1
In operation S220, request response information related to the test request is determined according to a matching result between the interface configuration information and the configuration information to be matched.
According to an embodiment of the present disclosure, the configuration information to be matched may be any one or any several of interface identification in the interface configuration information, test request address information (URL of test request), type information of request, and request parameter information. The matching result may be a result obtained after matching the configuration information to be matched based on a matching algorithm. The matching process may include, for example, for interface information 1, matching interface configuration information based on test request address information, shrinking the interface configuration information range, further matching the type of request, shrinking again, and finally matching request parameter information. The request response information is obtained according to the matching result between the interface configuration information and the configuration information to be matched. Meanwhile, an interface configuration information list can be generated according to configuration items in the interface configuration information, so that correlation hit can be carried out when subsequent interface tests are matched. Matching algorithms include, but are not limited to, BF algorithm, RK algorithm, KMP algorithm, BM algorithm and Sunday algorithm.
In particular, in the present disclosure, table 2 is taken as an example to illustrate configuration information to be matched according to an embodiment of the present disclosure.
TABLE 2
Interface identification Test request address information Type information of request Requesting parameter information
In operation S230, a test response request suitable for performing a functional test on the first end module is generated according to the request response information.
According to an embodiment of the present disclosure, the test response request may be a response request generated based on the request response information and format-converted by a conversion algorithm.
According to an embodiment of the present disclosure, interface configuration information is extracted from a test request by responding to the test request sent from a front-end module; determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched; and generating a test response request suitable for performing functional test on the front-end module according to the request response information. Because the interface configuration information is obtained from the front-end module, the request response information is determined by utilizing the matching result between the interface configuration information and the configuration information to be matched, and then the test response request is generated, the joint test of the front-end module and the back-end module can be realized under the condition that the development of the API interface of the back-end is not completed, the waiting time for waiting for the development of the back-end is reduced, and the test efficiency is improved.
Fig. 3 schematically illustrates a flow chart of generating a test response request suitable for functional testing of the first end module based on the request response information, according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, as shown in fig. 3, generating a test response request suitable for performing a functional test on the first end module according to the request response information includes operations S310 to S330.
In operation S310, a target response information template related to the request response information is determined from the initial response information template set.
According to an embodiment of the present disclosure, the initial response information template may be a corresponding information template including interface number information and request response information, and the initial response information template set includes a plurality of initial response information templates having different interface identifications. The target response information template may be a response information template that matches the current interface number information.
Because of the difference of the adapters, the hierarchy and structure of the response information templates are not necessarily universal for all simulation tests, for example, the differences of character string type and floating point type exist, and therefore, format conversion is required for the request response information.
In operation S320, information format conversion is performed on the request response information based on the information conversion rule of the target response information template, to obtain target request response information.
According to an embodiment of the disclosure, the information conversion rule may be that information format conversion is performed on the request response information by using a conversion algorithm, so as to obtain target request response information, where the target request response information after format conversion may include an interface identifier, a data template definition, an attribute name, a generation rule, an attribute value, and the like.
In particular, in the present disclosure, table 3 is illustrated as an example, and table 3 is a schematic diagram of target request response information according to an embodiment of the present disclosure:
TABLE 3 Table 3
Interface identification Data simulation definition Attribute name Generating rules Attribute value
In operation S330, a test response request is generated according to the target request response information.
According to the embodiment of the disclosure, the attribute names, the generation rules and the attribute values in the target request response information are assembled according to the test requirements, and the test response request is generated.
Fig. 4 schematically illustrates a system architecture diagram of a test response request generation method according to an embodiment of the present disclosure.
In a possible embodiment, as shown in fig. 4, by matching the associated interface identifier and request response information, interface configuration information is input as matching information, and the input information includes the interface identifier and the request response information; based on a conversion algorithm, format conversion is carried out on the request response information to obtain target request response information, wherein the content of the target request response information comprises: interface identification, data template definition, attribute names, generation rules and attribute values; and assembling the attribute name, the generation rule and the attribute value in the target request response information to generate a test response request.
According to an embodiment of the present disclosure, the test request includes request response information; wherein, according to the matching result between the interface configuration information and the configuration information to be matched, determining the request response information related to the test request comprises: in the event that the matching result characterizes a match, request response information is determined from the test request.
According to an embodiment of the present disclosure, the test request contains request response information, i.e. the request response information is determined from the front-end test request in case the interface configuration information and the configuration information to be matched match.
According to an embodiment of the present disclosure, determining request response information related to a test request according to a matching result between interface configuration information and configuration information to be matched includes: and under the condition that the matching result characterizes the matching, determining request response information related to the test request from a preset initial request response information set according to the interface configuration information.
According to the embodiment of the disclosure, when the interface configuration information is matched with the configuration information to be matched, the request response information related to the current test request can be centrally fetched from the preset initial request response information.
Fig. 5 schematically illustrates a system architecture diagram of a request response information determination method according to an embodiment of the present disclosure.
In a possible embodiment, as shown in fig. 5, the matching process of the interface configuration information and the configuration information to be matched includes: the interface configuration information is extracted, and the extracted content comprises any one or any several items of interface identification, test request address information (URL of test request), request type information, request parameter information and request response information. Based on the matching algorithm, for example, using the BF (Brute Force) algorithm, the interface matching information is extracted, and the content to be matched includes any one or any several items of interface identification, test request address information (URL of test request), request type information and request parameter information. When the interface configuration information is matched with the configuration information to be matched, request response information related to the test request can be determined. For example, for the interface 1, the interface configuration information is first matched based on the test request address information, the interface configuration information range is contracted, the type of the request is further matched, the request is contracted again, and finally the request parameter information is matched. The request response information is obtained according to the matching result between the interface configuration information and the configuration information to be matched. Meanwhile, an interface configuration information list can be generated according to configuration items in the interface configuration information, so that correlation hit can be carried out when subsequent interface tests are matched.
According to an embodiment of the present disclosure, the interface configuration information includes at least one of: interface identification, test request address, test request type, test request parameters.
According to an embodiment of the present disclosure, the test method further includes: and sending a test response request to the first end module.
According to embodiments of the present disclosure, the first end module may be any one of a front end module that needs to perform joint measurement, or a back end module that performs joint measurement. The embodiment of the disclosure describes in detail a front-end module as a first end module and a back-end module as a second end module.
Fig. 6 schematically shows a flow chart of a test method according to a further embodiment of the present disclosure.
According to an embodiment of the present disclosure, as shown in fig. 6, the test method of this embodiment further includes operations S610 to S630.
In operation S610, second-end request response information is determined from a second-end response request transmitted from a second-end module, and the first-end module and the second-end module are disposed in a production environment.
According to an embodiment of the present disclosure, the first and second end modules disposed in the production environment may be a front end module and a back end module, respectively, operating in the production environment, or the first and second end modules disposed in the production environment may be a back end module and a front end module, respectively, operating in the production environment. To illustrate the testing method provided by the embodiments of the present disclosure, the embodiments of the present disclosure may determine a first end module and a second end module disposed in a production environment as a front end module and a back end module, respectively, operating in the production environment.
According to the embodiment of the disclosure, the back-end request response information is determined according to the back-end response request sent by the back-end module in the actual production environment.
In operation S620, the second end request response information is compared with the request response information, and a request response comparison result is obtained.
In operation S630, a test defect detection result related to the front-end module is determined according to the request response comparison result.
According to an embodiment of the present disclosure, the request response information may be obtained according to the test method provided by the embodiment of the present disclosure, that is, the request corresponding information may be request response information generated by a virtual back-end module under test; the back-end request response information may be request response information generated in an actual production environment; and comparing the back-end request response information in the actual production environment with the request response information generated by the virtual back-end module in the test environment to obtain a comparison result between the request response in the test environment and the request response in the production environment, so that defects of the front-end module developed in the production environment can be timely and rapidly determined according to the request response comparison result.
According to the embodiment of the disclosure, the request response in the actual production environment is compared with the request response in the simulation test, regression verification is performed, and then defects in the simulation test of the front-end module are determined, so that relevant professional responsible personnel can correct and update, and the subsequent joint test effect is improved.
Fig. 7 schematically illustrates a system architecture diagram of a test method according to an embodiment of the present disclosure.
In one possible embodiment, as shown in fig. 7, the system architecture of the test method includes a test request receiving module 710, a request response information determining module 720, and a test response request generating module 730. The test request receiving module 710 includes a format checking unit 711 and an information extracting unit 712, the system receives the test request sent by the front end module through the test request receiving module 710, checks the format of the test request information through the format checking unit 711, and directly flows to generate a response result when the check is not passed, and extracts interface configuration information in the test request through the information extracting unit 712 when the check is passed; the request response information module 720 includes an information matching unit 721 and a list generating unit 722, and is configured to match interface configuration information by using a matching algorithm through the information matching unit 721, determine request response information related to a test request, and generate an interface configuration information list by the list generating unit 722 based on data granularity to be matched; the test response request generation module 730 includes a module determination unit 731, a format conversion unit 732, and a request generation unit 733, determines a target response information template according to the request response information through the module determination unit 731, and performs format conversion on the request response information through the format conversion unit 732 based on an information conversion rule of the target response information template to obtain the target request response information, and further generates a test response request through the request generation unit 733.
Based on the testing method, the disclosure also provides a testing device. The device will be described in detail below in connection with fig. 8.
Fig. 8 schematically shows a block diagram of a test apparatus according to an embodiment of the present disclosure.
As shown in fig. 8, the test apparatus 800 of this embodiment includes an extraction module 810, a first determination module 820, and a generation module 830.
The extracting module 810 is configured to extract interface configuration information from a test request in response to receiving the test request sent from the front-end module. In an embodiment, the extracting module 810 may be configured to perform the operation S210 described above, which is not described herein.
The first determining module 820 is configured to determine request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched. In an embodiment, the first determining module 820 may be used to perform the operation S220 described above, which is not described herein.
The generating module 830 is configured to generate, according to the request response information, a test response request suitable for performing a functional test on the front-end module. In an embodiment, the generating module 830 may be configured to perform the operation S230 described above, which is not described herein.
According to an embodiment of the present disclosure, in the test apparatus 800 of the embodiment of the present disclosure, by the extracting module 810, the first determining module 820, and the generating module 830, by responding to a test request sent from the front end module, interface configuration information is extracted from the test request; determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched; and generating a test response request suitable for performing functional test on the front-end module according to the request response information. Because the interface configuration information is obtained from the front-end module, the request response information is determined by utilizing the matching result between the interface configuration information and the configuration information to be matched, and then the test response request is generated, the joint test of the front-end module and the back-end module can be realized under the condition that the development of the API interface of the back-end is not completed, the waiting time for waiting for the development of the back-end is reduced, and the test efficiency is improved.
According to an embodiment of the present disclosure, the generation module includes a determination sub-module, a conversion sub-module, and a generation sub-module.
A determining sub-module for determining a target response information template associated with the request response information from the initial set of response information templates.
And the conversion sub-module is used for carrying out information format conversion on the request response information based on the information conversion rule of the target response information template to obtain target request response information.
And the generating sub-module is used for generating a test response request according to the target request response information.
According to an embodiment of the present disclosure, wherein the test request includes request response information; the determining module comprises a first determining submodule, wherein the first determining submodule is used for determining request response information from the test request under the condition that the matching result characterization is matched.
According to the embodiment of the disclosure, the determining module comprises a second determining submodule, and the second determining submodule is used for determining request response information related to the test request from a preset initial request response information set according to interface configuration information under the condition that the matching result characterizes matching.
According to an embodiment of the present disclosure, the interface configuration information includes at least one of: interface identification, test request address, test request type, test request parameters.
According to an embodiment of the present disclosure, the test apparatus further includes: and the sending module is used for sending a test response request to the front-end module.
According to an embodiment of the present disclosure, the test apparatus further includes: the device comprises a second determining module, a comparing module and a third determining module.
The second determining module is used for determining back-end request response information from the back-end response requests sent by the back-end module, and the front-end module and the back-end module are arranged in the production environment.
And the comparison module is used for comparing the back-end request response information with the request response information to obtain a request response comparison result.
And the third determining module is used for determining a test defect detection result related to the front-end module according to the request response comparison result.
According to an embodiment of the present disclosure, the first end module comprises a front end module; or the first end module comprises a back end module. Any of the plurality of modules of the extraction module 810, the first determination module 820, and the generation module 830 may be combined in one module to be implemented, or any of the plurality of modules may be split into a plurality of modules according to an embodiment of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the extraction module 810, the first determination module 820, and the generation module 830 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable way of integrating or packaging circuitry, or in any one of or a suitable combination of any of the three. Alternatively, at least one of the extraction module 810, the first determination module 820 and the generation module 830 may be at least partially implemented as computer program modules which, when executed, may perform the respective functions.
Fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement a test method according to an embodiment of the disclosure.
As shown in fig. 9, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. The processor 901 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 901 may also include on-board memory for caching purposes. Processor 901 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM903, various programs and data necessary for the operation of the electronic device 900 are stored. The processor 901, the ROM902, and the RAM903 are connected to each other by a bus 904. The processor 901 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM902 and/or the RAM 903. Note that the program may be stored in one or more memories other than the ROM902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 900 may also include an input/output (I/O) interface 905, the input/output (I/O) interface 905 also being connected to the bus 904. The electronic device 900 may also include one or more of the following components connected to an input/output (I/O) interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to an input/output (I/O) interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM902 and/or RAM903 and/or one or more memories other than ROM902 and RAM903 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the item recommendation method provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, via communication portion 909, and/or installed from removable medium 911. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, but this does not mean that the measures in the various embodiments cannot be used to advantage in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A method of testing, comprising:
responding to a test request sent by a first end module, and extracting interface configuration information from the test request;
determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched;
and generating a test response request applicable to the function test of the first end module according to the request response information.
2. The method of claim 1, wherein generating a test response request suitable for functional testing of the first end module based on the request response information comprises:
determining a target response information template related to the request response information from an initial response information template set;
based on the information conversion rule of the target response information template, carrying out information format conversion on the request response information to obtain target request response information; and
and generating the test response request according to the target request response information.
3. The method of claim 1, wherein the test request includes the request response information;
wherein determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched comprises:
and determining the request response information from the test request under the condition that the matching result characterizes matching.
4. The method of claim 1, wherein determining request response information associated with the test request based on a result of the matching between the interface configuration information and configuration information to be matched comprises:
and under the condition that the matching result characterization is matched, determining request response information related to the test request from a preset initial request response information set according to the interface configuration information.
5. The method of any of claims 1, 3 or 4, wherein the interface configuration information comprises at least one of:
interface identification, test request address, test request type, test request parameters.
6. The method of claim 1, further comprising:
and sending the test response request to the first end module.
7. The method of claim 1, further comprising:
determining second-end request response information from a second-end response request sent by a second-end module, wherein the first-end module and the second-end module are arranged in a production environment;
comparing the request response information of the second end with the request response information to obtain a request response comparison result; and
and determining a test defect detection result related to the first end module according to the request response comparison result.
8. The method of claim 1, wherein the first end module comprises a front end module; or the first end module comprises a back end module.
9. A test apparatus comprising:
the extraction module is used for responding to the test request sent by the first end module and extracting interface configuration information from the test request;
the first determining module is used for determining request response information related to the test request according to a matching result between the interface configuration information and the configuration information to be matched; and
and the generating module is used for generating a test response request suitable for carrying out functional test on the first end module according to the request response information.
10. An electronic device, comprising:
one or more processors;
storage means 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 perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
CN202311227963.0A 2023-09-21 2023-09-21 Test method, device, equipment and storage medium Pending CN117472734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311227963.0A CN117472734A (en) 2023-09-21 2023-09-21 Test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311227963.0A CN117472734A (en) 2023-09-21 2023-09-21 Test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117472734A true CN117472734A (en) 2024-01-30

Family

ID=89626536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311227963.0A Pending CN117472734A (en) 2023-09-21 2023-09-21 Test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117472734A (en)

Similar Documents

Publication Publication Date Title
CN109522483B (en) Method and device for pushing information
CN109359194B (en) Method and apparatus for predicting information categories
CN107291774B (en) Error sample identification method and device
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN115061874A (en) Log information verification method, device, equipment and medium
CN113535577B (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN114238993A (en) Risk detection method, apparatus, device and medium
CN113507419A (en) Training method of flow distribution model, and flow distribution method and device
KR102151322B1 (en) Information push method and device
CN116662302A (en) Data processing method, device, electronic equipment and storage medium
CN116483888A (en) Program evaluation method and device, electronic equipment and computer readable storage medium
CN115203178A (en) Data quality inspection method and device, electronic equipment and storage medium
CN117472734A (en) Test method, device, equipment and storage medium
CN115292440A (en) Remote guidance method, apparatus, device and medium
CN114443663A (en) Data table processing method, device, equipment and medium
CN113052509A (en) Model evaluation method, model evaluation apparatus, electronic device, and storage medium
CN113221845A (en) Advertisement auditing method, device, equipment and storage medium
CN116955620A (en) Text recognition method, device, electronic equipment and storage medium
CN116776022A (en) Request response method, device, equipment and storage medium
CN113505147A (en) Data processing method and device, electronic equipment and readable storage medium
CN117271360A (en) Front-end and back-end joint debugging method, device, equipment, medium and program product
CN116107851A (en) Simulation test method, device, equipment and storage medium
CN116414600A (en) Data automatic checking method, device, equipment and storage medium
CN116894004A (en) Information display method and device, electronic equipment and computer readable storage medium
CN117493206A (en) Test data generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination