CN117271331A - Method for testing functional module of application program product, related device and medium - Google Patents

Method for testing functional module of application program product, related device and medium Download PDF

Info

Publication number
CN117271331A
CN117271331A CN202311217502.5A CN202311217502A CN117271331A CN 117271331 A CN117271331 A CN 117271331A CN 202311217502 A CN202311217502 A CN 202311217502A CN 117271331 A CN117271331 A CN 117271331A
Authority
CN
China
Prior art keywords
target
byte number
parameter
functional module
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
CN202311217502.5A
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.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311217502.5A priority Critical patent/CN117271331A/en
Publication of CN117271331A publication Critical patent/CN117271331A/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 application discloses a method for testing a functional module of an application program product, a related device and a medium, and can be applied to the financial field or other fields. All interactive function modules involved in the process of realizing the functions of the target function module to be tested can be obtained; the target functional module and every two functional modules in the interactive functional modules are provided with target interactive interfaces for transmitting parameters; for any functional module, if the parameters received through the target interaction interface can be stored in the target database corresponding to the functional module, the test is passed, otherwise, the test fails. The maximum byte number of the parameter stored in the target database is higher than the maximum byte number of the parameter received by the target interaction interface, so that the target database can store the parameter, otherwise, the maximum byte number corresponding to the target interaction interface and the maximum byte number corresponding to the target database corresponding to the functional module can be compared, and the testing process is realized. Thereby realizing the testing process of the functional module.

Description

Method for testing functional module of application program product, related device and medium
Technical Field
The present invention relates to the field of testing, and more particularly, to a method, an apparatus and a medium for testing a functional module of an application product.
Background
The application product includes a plurality of functional modules, each of which requires testing prior to being promoted to a wide variety of users.
Based on this, a method for testing a functional module is urgently needed.
Disclosure of Invention
In view of the foregoing, the present application provides a method, an apparatus and a medium for testing a functional module of an application program product.
In order to achieve the above purpose, the present application provides the following technical solutions:
according to a first aspect of embodiments of the present disclosure, there is provided a method for testing a functional module of an application program product, including:
determining a target functional module to be tested;
searching a target calling sequence corresponding to the target functional module from the corresponding relation between the preset functional module and the calling sequence, wherein the target calling sequence refers to the interaction sequence of a plurality of interaction functional modules involved in realizing the functions of the target functional module;
searching a target functional module and target interaction interfaces corresponding to every two functional modules in a plurality of interaction functional modules from the preset corresponding relation between every two functional modules and the interaction interfaces, wherein the interaction interfaces corresponding to every two functional modules are channels for transmitting parameters of every two functional modules;
Searching a target transmission parameter corresponding to the target interaction interface from a preset corresponding relation between the interaction interface and the transmission parameter, wherein the target transmission parameter comprises a parameter type and a first maximum byte number corresponding to the parameter type, and the parameter transmitted by the target interaction interface belongs to the parameter type and the byte number is smaller than or equal to the first maximum byte number;
searching a target database corresponding to each of the target function module and the plurality of interactive function modules from the corresponding relation between the preset function module and the database, wherein the target database is used for storing parameters received through the target interactive interface;
searching a target storage parameter corresponding to the target database from a corresponding relation between a preset database and the storage parameter, wherein the target storage parameter comprises a second maximum byte number corresponding to a parameter type which can be stored by the target database;
the following test operations are executed for any one of the target function modules and the interactive function modules:
acquiring a common parameter type which is common between a target transmission parameter of the target interaction interface corresponding to the functional module and a target storage parameter of the target database;
Comparing the first maximum byte number of the common parameter type in the target transmission parameter with the second maximum byte number of the common parameter type in the target storage parameter to obtain a comparison result;
if the comparison result represents that the first maximum byte number is larger than the second maximum byte number, determining that the test is not passed;
and if the comparison result represents that the first maximum byte number is smaller than or equal to the second maximum byte number, determining that the test passes.
According to a second aspect of the embodiments of the present disclosure, there is provided a test apparatus for a functional module of an application program product, including:
the first determining module is used for determining a target functional module to be tested;
the first searching module is used for searching a target calling sequence corresponding to the target functional module from the corresponding relation between the preset functional module and the calling sequence, wherein the target calling sequence refers to the interaction sequence of a plurality of interaction functional modules involved in realizing the functions of the target functional module;
the second searching module is used for searching the target functional module and the target interaction interfaces corresponding to the two-by-two functional modules in the plurality of interaction functional modules from the preset corresponding relation between the two-by-two functional modules and the interaction interfaces, and the interaction interfaces corresponding to the two-by-two functional modules are channels for transmitting parameters of the two functional modules;
The third searching module is used for searching a target transmission parameter corresponding to the target interaction interface from a corresponding relation between a preset interaction interface and a transmission parameter, wherein the target transmission parameter comprises a parameter type and a first maximum byte number corresponding to the parameter type, and the parameter transmitted by the target interaction interface belongs to the parameter type and the byte number is smaller than or equal to the first maximum byte number;
the fourth searching module is used for searching a target database corresponding to each of the target functional module and the plurality of interactive functional modules from the corresponding relation between the preset functional module and the database, and the target database is used for storing parameters received through the target interactive interface;
a fifth searching module, configured to search, from a preset correspondence between a database and a storage parameter, a target storage parameter corresponding to the target database, where the target storage parameter includes a second maximum number of bytes corresponding to a parameter type that can be stored in the target database;
the following test operations are executed for any one of the target function modules and the interactive function modules:
the first acquisition module is used for acquiring a common parameter type which is common between the target transmission parameter of the target interaction interface corresponding to the functional module and the target storage parameter of the target database;
The comparison module is used for comparing the first maximum byte number of the common parameter type in the target transmission parameter with the second maximum byte number of the common parameter type in the target storage parameter to obtain a comparison result;
the second determining module is used for determining that the test is not passed if the comparison result represents that the first maximum byte number is larger than the second maximum byte number;
and the third determining module is used for determining that the test passes if the comparison result represents that the first maximum byte number is smaller than or equal to the second maximum byte number.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement a method of testing a functional module of an application product according to the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium, which when executed by a processor of a server, enables the server to perform a method of testing a functional module of an application product according to the first aspect.
As can be seen from the above technical solutions, the present application provides a method for testing a functional module of an application program product, which can obtain all interactive functional modules involved in a process of implementing functions of a target functional module to be tested; the target functional module and every two functional modules in the interactive functional modules are provided with target interactive interfaces for transmitting parameters; for a target functional module and any one of a plurality of interactive functional modules, if parameters received through a target interactive interface can be stored in a target database corresponding to the functional module, testing is passed, otherwise, testing fails. And the second maximum byte number of the parameters stored in the target database is higher than the first maximum byte number of the parameters received by the target interaction interface, so that the target database can store the parameters received by the target interaction interface, otherwise, the parameters cannot be stored, and the comparison function module is used for comparing the first maximum byte number corresponding to the target interaction interface with the second maximum byte number corresponding to the target database, namely the test process. Thereby realizing the testing process of the functional module.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic diagram of a hardware architecture according to the present application;
FIG. 2 is a flowchart illustrating a method of testing functional modules of an application product according to an exemplary embodiment;
FIG. 3 is a block diagram of a test apparatus showing functional modules of an application product according to an exemplary embodiment;
fig. 4 is a block diagram illustrating an apparatus for a server according to an exemplary embodiment.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The embodiment of the application provides a method, a device, a server and a medium for testing a functional module of an application program product. Before introducing the technical solution provided by the embodiments of the present application, a hardware architecture related to the embodiments of the present application is described.
The hardware architecture to which the present application relates is described below.
As shown in fig. 1, a schematic diagram of a hardware architecture according to the present application includes, but is not limited to: the electronic device 01 and the server 02.
By way of example, the electronic device may be any electronic product that can interact with a user in one or more ways, such as a keyboard, a touchpad, a touch screen, a remote control, a voice interaction or handwriting device, for example, a mobile phone, a tablet computer, a palm top computer, a personal computer, a wearable device, a smart television, etc.
The server may be one server, a server cluster formed by a plurality of servers, or a cloud computing service center.
The electronic device may be, for example, a device held by a tester. Illustratively, a tester may select a target functional module to be tested via an electronic device. For example, the server may execute the method for testing the functional module of the application program product provided in the embodiment of the present application.
Those skilled in the art will appreciate that the above-described electronic devices and servers are merely examples, and that other existing or future-occurring electronic devices or servers, as applicable to the present disclosure, are intended to be within the scope of the present disclosure and are incorporated herein by reference.
The following describes a method for testing a functional module of an application program product according to an embodiment of the present application with reference to the above hardware architecture.
Fig. 2 is a flowchart illustrating a method for testing a functional module of an application product according to an exemplary embodiment, and as shown in fig. 2, the method for testing a functional module of an application product is used in a server, and includes the following steps S201 to S2074.
Step S201: and determining a target functional module to be tested.
The target functional module to be tested may be selected by the electronic device, for example. For example, the electronic device may display the identities of the plurality of functional modules so that the user selects the identity of the target functional module therefrom.
The functional modules are described below by way of example.
Such as mobile banking products include: the system comprises a transfer record inquiry module, a my financial module, a follow-up and follow-up module, a loan module and a personal pension module. The functional module may be any of the modules described above.
Step S202: searching a target calling sequence corresponding to the target functional module from the corresponding relation between the preset functional module and the calling sequence, wherein the target calling sequence refers to the interaction sequence of a plurality of interaction functional modules involved in realizing the functions of the target functional module.
For example, each function module may relate to a plurality of function modules in the process of implementing its corresponding function, and the plurality of interactive function modules related to the calling sequence corresponding to the function modules include: all the functional modules involved in achieving the functional effect from the source to the end.
The functional module involved in realizing the function of the target functional module is called an interactive functional module in the embodiment of the application.
For example, a target function module may interact with multiple interactive function modules in implementing a function. There are two situations where a target function module interacts with multiple interactive function modules.
Case one: the target function module and the interactive function modules belong to the same application program product.
For example, the application program product 10 includes a function module 11, a function module 12, and a function module 13, and assuming that the target function module is the function module 11, the function module 11 needs to interact with the function module 12 and the function module 13 in the process of implementing its own function, a plurality of interaction function modules corresponding to the function module 11 include: a functional module 12 and a functional module 13.
Illustratively, the order of invocation between the target functional module and the plurality of interactive functional modules may be: the functional module 11 interacts with the functional module 12 and the functional module 13, respectively.
Illustratively, the order of invocation between the target functional module and the plurality of interactive functional modules may be: the functional module 11 interacts with the functional module 12 and the functional module 12 interacts with the functional module 13.
And a second case: the target function module and the plurality of interactive function modules belong to different application program products.
For example, the application product 10 includes a functional module 11, a functional module 12, and a functional module 13; the application product 20 comprises a functional module 21 and a functional module 22; the application product 30 comprises a functional module 31, a functional module 32 and a functional module 33. Let the target function module be the function module 11.
For example, when the functional module 11 needs to interact with the functional module 21 and the functional module 32 in the process of implementing its own functions, the plurality of interaction functional modules corresponding to the functional module 11 include: functional modules 21 and 32. Illustratively, the order of invocation between the target functional module and the plurality of interactive functional modules may be: the functional module 11 interacts with the functional module 21 and the functional module 32 respectively; illustratively, the order of invocation between the target functional module and the plurality of interactive functional modules may be: the functional module 11 interacts with the functional module 21 and the functional module 21 interacts with the functional module 32.
For example, when the functional module 11 needs to interact with the functional module 12, the functional module 21, and the functional module 32 in the process of implementing its own functions, the plurality of interaction functional modules corresponding to the functional module 11 include: functional module 12, functional module 21, functional module 32. Illustratively, the order of invocation between the target functional module and the plurality of interactive functional modules may be: the functional module 11 interacts with the functional module 12, the functional module 21, and the functional module 32, respectively; illustratively, the order of invocation between the target functional module and the plurality of interactive functional modules may be: the functional module 11 interacts with the functional module 12 and the functional module 21 respectively, the functional module 12 interacts with the functional module 32, and the functional module 21 interacts with the functional module 32; illustratively, the order of invocation between the target functional module and the plurality of interactive functional modules may be: the functional module 11 interacts with the functional module 12, the functional module 12 interacts with the functional module 21, and the functional module 21 interacts with the functional module 32.
However, in the current testing process for the target functional module, only the functional module that directly interacts with the target functional module is considered, and it is assumed that the calling sequence between the target functional module and the plurality of interaction functional modules may be: the functional module 11 interacts with the functional module 12, and the functional module 12 interacts with the functional module 13, and the module directly interacting with the functional module 11 is the functional module 12. Since the interaction of a plurality of interactive function modules is involved in the process of realizing the functions of the target function module, if only the interactive function module directly interacting with the target function module is considered, the test may be incomplete. And the application considers all functional modules from the source to finally realizing the functional effect, thereby avoiding the problems.
Step S203: and searching the target functional module and target interaction interfaces corresponding to the two-by-two functional modules in the interaction functional modules from the preset corresponding relation between the two-by-two functional modules and the interaction interfaces, wherein the interaction interfaces corresponding to the two-by-two functional modules are channels for transmitting parameters of the two functional modules.
Assuming that the target function module is the function module 11, the plurality of interactive function modules corresponding to the target function module are the function module 12, the function module 21 and the function module 32, and the calling sequence of the target function module and the plurality of interactive function modules is as follows: the functional module 11 interacts with the functional module 12, the functional module 21, and the functional module 32, respectively; the resulting target interaction interface comprises: an interactive interface between the functional module 11 and the functional module 12, an interactive interface between the functional module 11 and the functional module 21, and an interactive interface between the functional module 11 and the functional module 32.
Step S204: searching a target transmission parameter corresponding to the target interaction interface from a preset corresponding relation between the interaction interface and the transmission parameter, wherein the target transmission parameter comprises a parameter type and a first maximum byte number corresponding to the parameter type, and the parameter transmitted by the target interaction interface belongs to the parameter type and the byte number is smaller than or equal to the first maximum byte number.
It is understood that, if the transmission parameters corresponding to the interactive interface include what type of parameters, the interactive interface may transmit the parameters of such type of parameters. Exemplary transmission parameters include: the VARCHAR parameter type and the INT parameter type, the interactive interface may transmit parameters belonging to the VARCHAR parameter type parameter and to the INT parameter type.
The first maximum byte number corresponding to each parameter type refers to the maximum byte number of the parameter type transmitted by the interactive interface; for example, if the first maximum byte number corresponding to the parameter type VARCHAR is 8, the maximum byte number of the parameter belonging to the parameter type VARCHAR transmitted by the interactive interface is 8, and the interactive interface cannot transmit the parameter belonging to the parameter type VARCHAR and having a byte number of 9.
Step S205: searching a target database corresponding to each of the target function module and the plurality of interaction function modules from the corresponding relation between the preset function module and the database, wherein the target database is used for storing parameters received through the target interaction interface.
The number of target function modules and the target databases corresponding to each of the plurality of interactive function modules may be 0, 1 or more.
It will be appreciated that the target function module and each of the plurality of interactive function modules may need to retrieve one or more parameters from the target database (which are also intended to implement the function of the target function module) and transmit them through the target interactive interface. Alternatively, the parameters received through the target interaction interface (this parameter is also for the purpose of implementing the function of the target function module) are stored to the target database.
Illustratively, storing parameters received through the target interaction interface to the target database means directly storing the parameters to the target database; or, the parameters are processed and then stored in a target database.
For example, the encoding mode of the parameters received through the target interaction interface is different from the encoding mode of the parameters stored in the database, so that the encoding mode of the received parameters can be changed to the encoding mode corresponding to the database and then stored in the database.
In an alternative implementation, the parameters need to be logged into the database before being fetched from the database or stored, so the following method is further provided in the embodiments of the present application: searching target database login information corresponding to the target database from the corresponding relation between a preset database and the database login information; the target database login information is the basis for logging in the target database.
Step S206: searching a target storage parameter corresponding to the target database from a corresponding relation between a preset database and the storage parameter, wherein the target storage parameter comprises a second maximum byte number corresponding to a parameter type which can be stored by the target database.
The storage parameters corresponding to the database are described below by way of example.
Assume that the database can store parameters belonging to integer type, floating point type, or character type; the maximum byte number of the parameter belonging to the integer type is 8, the maximum byte number of the parameter belonging to the floating point type is 9, and the maximum byte number of the parameter belonging to the character type is 10, the corresponding storage parameters of the database comprise: the second maximum byte number corresponding to the integer type is 8, the second maximum byte number corresponding to the floating point type is 9, and the second maximum byte number corresponding to the character type is 10.
The following test operation is performed for any one of the target function module and the interactive function module, and includes steps S2071 to S2074.
Step S2071: and acquiring a common parameter type which is common between the target transmission parameter of the target interaction interface corresponding to the functional module and the target storage parameter of the target database.
It can be understood that the association between the target interaction interface corresponding to the functional module and the target database is: parameters received from the target interaction interface are stored to the target database. So if the parameters received from the target interaction interface can be stored to the target database, the test is successful. If the parameters received from the target interaction interface cannot be stored in the target database, the test fails.
The following examples are illustrative.
The target transmission parameters of the target interaction interface are assumed to include: the first maximum byte number corresponding to the integer type is 6, and the first maximum byte number corresponding to the floating point type is 7. The target storage parameters corresponding to the target database comprise: the second maximum byte number corresponding to the integer type is 8, the second maximum byte number corresponding to the floating point type is 9, and the second maximum byte number corresponding to the character type is 10. The common parameter types are integer type and floating point type.
Step S2072: and comparing the first maximum byte number of the common parameter type in the target transmission parameter with the second maximum byte number of the common parameter type in the target storage parameter to obtain a comparison result.
Step S2073: and if the comparison result represents that the first maximum byte number is larger than the second maximum byte number, determining that the test is not passed.
Step S2074: and if the comparison result represents that the first maximum byte number is smaller than or equal to the second maximum byte number, determining that the test passes.
For example, if the coding mode of the common parameter type in the target transmission parameter is the same as the coding mode of the common parameter type in the target storage parameter, the first maximum number of bytes and the second maximum number of bytes may be directly compared. If the first maximum byte number is greater than the second maximum byte number, the target database can not store the parameters received by the target interaction interface at any time, so that the test is not passed; if the first maximum byte number is smaller than or equal to the second maximum byte number, the target database can store the parameters received by the target interaction interface under any condition, so that the test is passed.
The embodiment of the application provides a method for testing a functional module of an application program product, which can acquire all interactive functional modules involved in the process of realizing the functions of a target functional module to be tested; the target functional module and every two functional modules in the interactive functional modules are provided with target interactive interfaces for transmitting parameters; for a target functional module and any one of a plurality of interactive functional modules, if parameters received through a target interactive interface can be stored in a target database corresponding to the functional module, testing is passed, otherwise, testing fails. And the second maximum byte number of the parameters stored in the target database is higher than the first maximum byte number of the parameters received by the target interaction interface, so that the target database can store the parameters received by the target interaction interface, otherwise, the parameters cannot be stored, and the comparison function module is used for comparing the first maximum byte number corresponding to the target interaction interface with the second maximum byte number corresponding to the target database, namely the test process. Thereby realizing the testing process of the functional module.
Furthermore, in the embodiment of the application, all interactive function modules involved in the process of realizing the functions of the target function module are considered, and compared with the test method which only considers the modules directly interacted with the target function module at present, the method is more comprehensive and complete.
For example, if the coding mode of the common parameter type in the target transmission parameter is different from the coding mode of the common parameter type in the target storage parameter, the first maximum byte number and the second maximum byte number of the common parameter type cannot be directly compared due to the different coding modes, and therefore, the embodiment of the application provides the following method, which includes steps A1 to A2.
Step A1: and converting the parameter with the first maximum byte number from the first coding mode to the second coding mode to obtain the converted byte number corresponding to the parameter after the coding is changed.
Illustratively, the first encoding mode is an utf-8 encoding mode, and the second encoding mode is a gbk encoding mode; or, the first coding mode is a gbk coding mode, and the second coding mode is an utf-8 coding mode.
Step A2: and comparing the converted byte number with the second maximum byte number to obtain the comparison result.
Wherein the comparison result is that the converted byte number is higher than the second maximum byte number, and the first maximum byte number is represented to be larger than the second maximum byte number; and the comparison result is that the conversion byte number is smaller than or equal to the second maximum byte number, and the second maximum byte number is represented to be smaller than or equal to the second maximum byte number.
In an alternative implementation, in the process of storing the parameter in the target database, it is further required to determine which field in the target database the parameter should be stored in, and based on this, the embodiment of the present application further provides the following steps B1 to B2.
Step B1: searching a target field corresponding to the parameter type of the parameter received through the target interaction interface from the corresponding relation between the preset parameter type and the field.
Step B2: and storing the parameters received through the target interaction interface into the target field of the target database.
The method is described in detail in the embodiments disclosed in the application, and the method can be implemented by using various devices, so that the application also discloses a device, and a specific embodiment is given in the following detailed description.
FIG. 3 is a block diagram of a test apparatus showing functional modules of an application product according to an exemplary embodiment. Referring to fig. 3, the apparatus includes: a first determining module 301, a first searching module 302, a second searching module 303, a third searching module 304, a fourth searching module 305, a fifth searching module 306, a first obtaining module 307, a comparing module 308, a second determining module 309, and a third determining module 310, wherein:
A first determining module 301, configured to determine a target functional module to be tested;
the first search module 302 is configured to search, from a preset correspondence between a function module and a call sequence, a target call sequence corresponding to the target function module, where the target call sequence refers to an interaction sequence of a plurality of interaction function modules related to implementing a function of the target function module;
the second searching module 303 is configured to search, from a preset correspondence between two-by-two function modules and interaction interfaces, the target function module and a target interaction interface corresponding to two-by-two function modules in the plurality of interaction function modules, where the interaction interface corresponding to two-by-two function modules is a channel for transmitting parameters of two function modules;
the third searching module 304 is configured to search, from a preset correspondence between an interaction interface and a transmission parameter, a target transmission parameter corresponding to the target interaction interface, where the target transmission parameter includes a parameter type and a first maximum byte number corresponding to the parameter type, and the parameter transmitted by the target interaction interface belongs to the parameter type and the byte number is less than or equal to the first maximum byte number;
a fourth searching module 305, configured to search, from a preset correspondence between a function module and a database, a target database corresponding to each of the target function module and the plurality of interactive function modules, where the target database is used to store parameters received through the target interactive interface;
A fifth searching module 306, configured to search, from a preset correspondence between a database and storage parameters, a target storage parameter corresponding to the target database, where the target storage parameter includes a second maximum number of bytes corresponding to a parameter type that can be stored in the target database;
the following test operations are executed for any one of the target function modules and the interactive function modules:
a first obtaining module 307, configured to obtain a common parameter type that is common to a target transmission parameter of the target interaction interface corresponding to the functional module and a target storage parameter of the target database;
a comparing module 308, configured to compare the first maximum byte number of the common parameter type in the target transmission parameter with the second maximum byte number of the common parameter type in the target storage parameter, so as to obtain a comparison result;
a second determining module 309, configured to determine that the test fails if the comparison result indicates that the first maximum number of bytes is greater than the second maximum number of bytes;
a third determining module 310, configured to determine that the test passes if the comparison result indicates that the first maximum byte number is less than or equal to the second maximum byte number.
In an alternative implementation manner, the target transmission parameter includes a first coding mode, the target storage parameter includes a second coding mode, and the comparing module includes:
a conversion unit, configured to convert the parameter with the first maximum byte number from a first encoding mode to the second encoding mode, so as to obtain a converted byte number corresponding to the parameter after the encoding is changed;
a comparing unit, configured to compare the converted byte number with the second maximum byte number, to obtain the comparison result;
wherein the comparison result is that the converted byte number is higher than the second maximum byte number, and the first maximum byte number is represented to be larger than the second maximum byte number; and the comparison result is that the conversion byte number is smaller than or equal to the second maximum byte number, and the second maximum byte number is represented to be smaller than or equal to the second maximum byte number.
In an alternative implementation manner, the first coding mode is an utf-8 coding mode, and the second coding mode is a gbk coding mode; or alternatively, the first and second heat exchangers may be,
the first coding mode is a gbk coding mode, and the second coding mode is an utf-8 coding mode.
In an alternative implementation, the method further includes:
A sixth searching module, configured to search, from a preset correspondence between a database and database login information, target database login information corresponding to the target database; the target database login information is the basis for logging in the target database.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 4 is a block diagram illustrating an apparatus for a server according to an exemplary embodiment.
Servers include, but are not limited to: a processor 41, a memory 42, a network interface 43, an I/O controller 44, and a communication bus 45.
It should be noted that the structure of the server shown in fig. 4 is not limited to the server, and the server may include more or less components than those shown in fig. 4, or may combine some components, or may be arranged with different components, as will be understood by those skilled in the art.
The following describes the respective constituent elements of the server in detail with reference to fig. 4:
the processor 41 is a control center of the server, connects respective portions of the entire server using various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 42, and calling data stored in the memory 42, thereby performing overall monitoring of the server. Processor 41 may include one or more processing units; by way of example, processor 41 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 41.
Processor 41 may be a central processing unit (Central Processing Unit, CPU), or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
the Memory 42 may include a Memory such as a Random-Access Memory (RAM) 421 and a Read-Only Memory (ROM) 422, and may further include a mass storage device 423, such as at least 1 disk Memory, and the like. Of course, the server may also include hardware required for other services.
The memory 42 is used for storing instructions executable by the processor 41. The processor 41 has a function of executing a test method of a functional module of an application program product.
A wired or wireless network interface 43 is configured to connect the server to the network.
The processor 41, memory 42, network interface 43, and I/O controller 44 may be interconnected by a communication bus 45, which may be an ISA (Industry Standard Architecture ) bus, PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc.
In an exemplary embodiment, the server may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the test methods of the functional modules of the application program products described above.
In an exemplary embodiment, the disclosed embodiments provide a storage medium including instructions, such as a memory 42 including instructions, executable by a processor 41 of a server to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer readable storage medium is also provided, which can be directly loaded into an internal memory of a computer, such as the memory 42 described above, and contains software code, and the computer program can implement the method for testing the functional modules of the application program product after being loaded and executed by the computer.
In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into an internal memory of a computer, for example, a memory contained in the server, and contains software codes, and the computer program can implement the method for testing the functional modules of the application program product after being loaded and executed by the computer.
The method, the related device and the medium for testing the functional module of the application program product can be used in the financial field or other fields, for example, can be used in the test application scene in the financial field. Other fields are any field other than the financial field, for example, the electric field. The foregoing is merely exemplary, and the application fields of the testing method, the related device and the medium of the functional module of the application program product provided by the present invention are not limited.
The features described in the respective embodiments in the present specification may be replaced with each other or combined with each other. For device or system class embodiments, the description is relatively simple as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for testing a functional module of an application program product, comprising:
determining a target functional module to be tested;
searching a target calling sequence corresponding to the target functional module from the corresponding relation between the preset functional module and the calling sequence, wherein the target calling sequence refers to the interaction sequence of a plurality of interaction functional modules involved in realizing the functions of the target functional module;
Searching a target functional module and target interaction interfaces corresponding to every two functional modules in a plurality of interaction functional modules from the preset corresponding relation between every two functional modules and the interaction interfaces, wherein the interaction interfaces corresponding to every two functional modules are channels for transmitting parameters of every two functional modules;
searching a target transmission parameter corresponding to the target interaction interface from a preset corresponding relation between the interaction interface and the transmission parameter, wherein the target transmission parameter comprises a parameter type and a first maximum byte number corresponding to the parameter type, and the parameter transmitted by the target interaction interface belongs to the parameter type and the byte number is smaller than or equal to the first maximum byte number;
searching a target database corresponding to each of the target function module and the plurality of interactive function modules from the corresponding relation between the preset function module and the database, wherein the target database is used for storing parameters received through the target interactive interface;
searching a target storage parameter corresponding to the target database from a corresponding relation between a preset database and the storage parameter, wherein the target storage parameter comprises a second maximum byte number corresponding to a parameter type which can be stored by the target database;
The following test operations are executed for any one of the target function modules and the interactive function modules:
acquiring a common parameter type which is common between a target transmission parameter of the target interaction interface corresponding to the functional module and a target storage parameter of the target database;
comparing the first maximum byte number of the common parameter type in the target transmission parameter with the second maximum byte number of the common parameter type in the target storage parameter to obtain a comparison result;
if the comparison result represents that the first maximum byte number is larger than the second maximum byte number, determining that the test is not passed;
and if the comparison result represents that the first maximum byte number is smaller than or equal to the second maximum byte number, determining that the test passes.
2. The method for testing a functional module of an application program product according to claim 1, wherein the target transmission parameter includes a first encoding mode, the target storage parameter includes a second encoding mode, and the comparing the first maximum number of bytes of the common parameter type in the target transmission parameter with the second maximum number of bytes of the common parameter type in the target storage parameter includes:
Converting the parameter with the first maximum byte number from a first coding mode to a second coding mode to obtain a converted byte number corresponding to the parameter after the coding is changed;
comparing the converted byte number with the second maximum byte number to obtain the comparison result;
wherein the comparison result is that the converted byte number is higher than the second maximum byte number, and the first maximum byte number is represented to be larger than the second maximum byte number; and the comparison result is that the conversion byte number is smaller than or equal to the second maximum byte number, and the second maximum byte number is represented to be smaller than or equal to the second maximum byte number.
3. The method for testing a functional module of an application program product according to claim 2, wherein the first encoding mode is an utf-8 encoding mode, and the second encoding mode is a gbk encoding mode; or alternatively, the first and second heat exchangers may be,
the first coding mode is a gbk coding mode, and the second coding mode is an utf-8 coding mode.
4. The method for testing a functional module of an application program product according to claim 1, further comprising:
searching target database login information corresponding to the target database from the corresponding relation between a preset database and the database login information; the target database login information is the basis for logging in the target database.
5. A test apparatus for a functional module of an application program product, comprising:
the first determining module is used for determining a target functional module to be tested;
the first searching module is used for searching a target calling sequence corresponding to the target functional module from the corresponding relation between the preset functional module and the calling sequence, wherein the target calling sequence refers to the interaction sequence of a plurality of interaction functional modules involved in realizing the functions of the target functional module;
the second searching module is used for searching the target functional module and the target interaction interfaces corresponding to the two-by-two functional modules in the plurality of interaction functional modules from the preset corresponding relation between the two-by-two functional modules and the interaction interfaces, and the interaction interfaces corresponding to the two-by-two functional modules are channels for transmitting parameters of the two functional modules;
the third searching module is used for searching a target transmission parameter corresponding to the target interaction interface from a corresponding relation between a preset interaction interface and a transmission parameter, wherein the target transmission parameter comprises a parameter type and a first maximum byte number corresponding to the parameter type, and the parameter transmitted by the target interaction interface belongs to the parameter type and the byte number is smaller than or equal to the first maximum byte number;
The fourth searching module is used for searching a target database corresponding to each of the target functional module and the plurality of interactive functional modules from the corresponding relation between the preset functional module and the database, and the target database is used for storing parameters received through the target interactive interface;
a fifth searching module, configured to search, from a preset correspondence between a database and a storage parameter, a target storage parameter corresponding to the target database, where the target storage parameter includes a second maximum number of bytes corresponding to a parameter type that can be stored in the target database;
the following test operations are executed for any one of the target function modules and the interactive function modules:
the first acquisition module is used for acquiring a common parameter type which is common between the target transmission parameter of the target interaction interface corresponding to the functional module and the target storage parameter of the target database;
the comparison module is used for comparing the first maximum byte number of the common parameter type in the target transmission parameter with the second maximum byte number of the common parameter type in the target storage parameter to obtain a comparison result;
The second determining module is used for determining that the test is not passed if the comparison result represents that the first maximum byte number is larger than the second maximum byte number;
and the third determining module is used for determining that the test passes if the comparison result represents that the first maximum byte number is smaller than or equal to the second maximum byte number.
6. The apparatus according to claim 5, wherein the target transmission parameter includes a first encoding scheme, the target storage parameter includes a second encoding scheme, and the comparing module includes:
a conversion unit, configured to convert the parameter with the first maximum byte number from a first encoding mode to the second encoding mode, so as to obtain a converted byte number corresponding to the parameter after the encoding is changed;
a comparing unit, configured to compare the converted byte number with the second maximum byte number, to obtain the comparison result;
wherein the comparison result is that the converted byte number is higher than the second maximum byte number, and the first maximum byte number is represented to be larger than the second maximum byte number; and the comparison result is that the conversion byte number is smaller than or equal to the second maximum byte number, and the second maximum byte number is represented to be smaller than or equal to the second maximum byte number.
7. The device for testing a functional module of an application product according to claim 6, wherein the first encoding mode is an utf-8 encoding mode and the second encoding mode is a gbk encoding mode; or alternatively, the first and second heat exchangers may be,
the first coding mode is a gbk coding mode, and the second coding mode is an utf-8 coding mode.
8. The apparatus for testing a functional module of an application program product according to claim 5, further comprising:
a sixth searching module, configured to search, from a preset correspondence between a database and database login information, target database login information corresponding to the target database; the target database login information is the basis for logging in the target database.
9. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement a method of testing a functional module of an application product according to any of claims 1 to 4.
10. A computer readable storage medium, which when executed by a processor of a server, enables the server to perform a method of testing a functional module of an application product according to any one of claims 1 to 4.
CN202311217502.5A 2023-09-20 2023-09-20 Method for testing functional module of application program product, related device and medium Pending CN117271331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311217502.5A CN117271331A (en) 2023-09-20 2023-09-20 Method for testing functional module of application program product, related device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311217502.5A CN117271331A (en) 2023-09-20 2023-09-20 Method for testing functional module of application program product, related device and medium

Publications (1)

Publication Number Publication Date
CN117271331A true CN117271331A (en) 2023-12-22

Family

ID=89219042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311217502.5A Pending CN117271331A (en) 2023-09-20 2023-09-20 Method for testing functional module of application program product, related device and medium

Country Status (1)

Country Link
CN (1) CN117271331A (en)

Similar Documents

Publication Publication Date Title
US10547618B2 (en) Method and apparatus for setting access privilege, server and storage medium
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
US9639444B2 (en) Architecture for end-to-end testing of long-running, multi-stage asynchronous data processing services
CN113364853B (en) Business service system, business request method and gateway equipment
US11310066B2 (en) Method and apparatus for pushing information
CN109214543B (en) Data processing method and device
CN108388512B (en) Data processing method and server
CN112084179B (en) Data processing method, device, equipment and storage medium
CN114143000B (en) Method and device for inquiring trace based on careless transmission protocol and secret sharing
CN113761565B (en) Data desensitization method and device
CN112988311A (en) On-line experimental method based on WEB server
CN110728118B (en) Cross-data-platform data processing method, device, equipment and storage medium
CN112052152A (en) Simulation test method and device
CN114124883B (en) Data access method and device based on cloud storage address, computer equipment and medium
CN117271331A (en) Method for testing functional module of application program product, related device and medium
CN111752964A (en) Data processing method and device based on data interface
CN113590447B (en) Buried point processing method and device
CN113779018A (en) Data processing method and device
CN112765022A (en) Webshell static detection method based on data stream and electronic device
CN111367634A (en) Information processing method, information processing device and terminal equipment
CN111309884A (en) Robot dialogue method, device, medium, and electronic apparatus
CN113434508B (en) Method and apparatus for storing information
CN116911304B (en) Text recommendation method and device
CN114996557B (en) Service stability determination method, device, equipment and storage medium
CN113362097B (en) User determination method and device

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