CN113986744A - Method and device for testing warehouse and table components and storage medium - Google Patents

Method and device for testing warehouse and table components and storage medium Download PDF

Info

Publication number
CN113986744A
CN113986744A CN202111290610.6A CN202111290610A CN113986744A CN 113986744 A CN113986744 A CN 113986744A CN 202111290610 A CN202111290610 A CN 202111290610A CN 113986744 A CN113986744 A CN 113986744A
Authority
CN
China
Prior art keywords
target
sub
test case
service
request message
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
CN202111290610.6A
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 CN202111290610.6A priority Critical patent/CN113986744A/en
Publication of CN113986744A publication Critical patent/CN113986744A/en
Pending legal-status Critical Current

Links

Images

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/3684Test management for test design, e.g. generating new test cases
    • 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

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 provides a method and a device for testing warehouse and table components and a storage medium, relates to the technical field of software testing, and can improve the efficiency of testing warehouse and table components. The method comprises the following steps: and receiving a simulation request message through the test case, wherein the simulation request message is used for indicating the processing of the target service, the test case can call the sub-library and sub-table components to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold. And calling the test case to process the target service according to the simulation request message. And generating a service response message through the test case, wherein the service response message is used for indicating whether the sub-library and sub-table component to be tested is successfully called.

Description

Method and device for testing warehouse and table components and storage medium
Technical Field
The present disclosure relates to the field of software testing, and in particular, to a method and an apparatus for testing a sub-library and sub-table component, and a storage medium.
Background
With the increasing abundance of Software functions, during the Development of Software, developers need to call a Software Development Kit (SDK) to implement relevant functional requirements. For example, the SDK component based on the sub-library and sub-table component is usually integrated into the developed project application.
At present, after the development of the sub-library and sub-table components is completed, the sub-library and sub-table components need to be integrated in the developed project application, and the functions of the sub-library and sub-table components need to be tested. However, in the current testing method, since a great deal of time is consumed for developing and completing project application, the efficiency of testing the sub-library and sub-table components is low.
Disclosure of Invention
The application provides a method and a device for testing warehouse and table components and a storage medium, which can improve the efficiency of testing warehouse and table components.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, the present application provides a method for testing a database and table component. The method is applied to computer equipment, the computer equipment is provided with a test case, and the test case is integrated with a sub-library and sub-table component to be tested.
According to the method, a simulation request message is received through a test case, the simulation request message is used for indicating processing of a target service, the test case can call a sub-library and sub-table component to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold. And calling the test case to process the target service according to the simulation request message. And generating a service response message through the test case, wherein the service response message is used for indicating whether the sub-library and sub-table component to be tested is successfully called.
Based on the technical scheme, the sub-library and sub-table components to be tested do not need to be integrated in the project application, and only the sub-library and sub-table components to be tested need to be integrated in the test case. And then, receiving a simulation request message through the test case, wherein the simulation request message is used for indicating the processing of the target service, the test case can call the sub-library and sub-table components to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold. And then, calling the test case to process the target service according to the simulation request message. And then, generating a service response message through the test case, wherein the service response message is used for indicating whether the sub-library and sub-table component to be tested is successfully called. Therefore, as the complexity of the test case is smaller than the preset complexity threshold, the time consumed for developing the test case is shorter, and the efficiency of testing the sub-library and sub-table components can be improved.
In one possible design, the test case includes a control module. An emulation request message is received by a control module.
In one possible design, the test case further includes: the control module comprises a target interface, and the target interface is used for calling the service module to process a target service. And calling a target interface through the control module according to the simulation request message, and sending the simulation request message to the service module. And determining a target operation through the service module according to the simulation request message, wherein the target operation is a method for processing the target service. And sending the target operation to the mapping module through the service module. And calling a target processing statement to execute the target operation on the target data table through the mapping module according to the target operation, wherein the target processing statement can call a sub-database sub-table component to be tested to determine the target data table, and the target data table corresponds to the target service.
In one possible design, the simulation request message further includes a data table identifier, and a table partitioning policy is configured in the test case, where the table partitioning policy is used to indicate a correspondence between the data table identifier and the data table. And calling a database sub-table component to determine a target data table through a mapping module according to the data table identification and the sub-table strategy.
In one possible design, the test case further includes an entity module, the service response message includes a first identifier or a second identifier, the first identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is successful, and the second identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is failed. And if the mapping module successfully calls the target processing statement, generating a first identifier through the entity module. And if the mapping module fails to call the target processing statement, generating a second identifier through the entity module.
In a second aspect, the present application provides a testing apparatus for a sub-library and sub-table component, which is applied to a computer device, wherein a test case is deployed on the computer device, and the test case integrates the sub-library and sub-table component to be tested. The apparatus includes a receiving unit and a processing unit.
The receiving unit is used for receiving a simulation request message through the test case, the simulation request message is used for indicating processing of the target service, the test case can call the sub-library and sub-table components to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold. And the processing unit is used for calling the test case to process the target service according to the simulation request message. And the processing unit is also used for generating a service response message through the test case, wherein the service response message is used for indicating whether the sub-library and sub-table component to be tested is successfully called.
In one possible design, the test case includes: and a control module. And the receiving unit is specifically used for receiving the simulation request message through the control module.
In one possible design, the test case further includes: the control module comprises a target interface, and the target interface is used for calling the service module to process a target service; the apparatus also includes a transmitting unit. And the sending unit is used for calling the target interface through the control module according to the simulation request message and sending the simulation request message to the service module. And the processing unit is used for determining target operation through the service module according to the simulation request message, wherein the target operation is a method for processing the target service. And the sending unit is also used for sending the target operation to the mapping module through the service module. And the processing unit is also used for calling a target processing statement to execute target operation on the target data table according to the target operation through the mapping module, the target processing statement can call the sub-database sub-table component to be tested to determine the target data table, and the target data table corresponds to the target service.
In one possible design, the simulation request message further includes a data table identifier, and a table partitioning policy is configured in the test case, where the table partitioning policy is used to indicate a correspondence between the data table identifier and the data table. And the processing unit is also used for calling the database sub-table component to determine the target data table through the mapping module according to the data table identification and the sub-table strategy.
In one possible design, the test case further includes an entity module, the service response message includes a first identifier or a second identifier, the first identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is successful, and the second identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is failed. And the processing unit is also used for generating a first identifier through the entity module if the mapping module successfully calls the target processing statement. And the processing unit is also used for generating a second identifier through the entity module if the mapping module fails to call the target processing statement.
In a third aspect, the present application provides a testing apparatus for a database and table dividing component, the apparatus comprising: a processor and a memory; the processor and the memory are coupled; the memory is configured to store one or more programs, and the one or more programs include computer executable instructions that, when the testing apparatus of the sub-library sub-table component runs, the processor executes the computer executable instructions stored in the memory to implement the method for testing the sub-library sub-table component as described in the first aspect and any possible implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for testing the sub-library and sub-table components described in any one of the possible implementation manners of the first aspect and the first aspect.
In a fifth aspect, the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a computer program or instructions to implement the method for testing a sub-library and sub-table component as described in the first aspect and any possible implementation manner of the first aspect.
In the foregoing solution, for technical problems that can be solved by a testing apparatus, a computer device, a computer storage medium, or a chip of a sub-library and sub-table component and technical effects that can be achieved by the testing apparatus, the computer device, the computer storage medium, or the chip, reference may be made to the technical problems and technical effects that are solved by the first aspect, and details are not described herein again.
Drawings
Fig. 1 is a schematic flowchart of a testing method for a database and table component according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another testing method for sub-library and sub-table components according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a testing apparatus for a sub-library and sub-table component according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of another testing apparatus for a sub-library and sub-table component according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship. For example, A/B may be understood as A or B.
The terms "first" and "second" in the description and claims of the present application are used for distinguishing between different objects and not for describing a particular order of the objects.
Furthermore, the terms "including" and "having," and any variations thereof, as referred to in the description of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
In addition, in the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "e.g.," is intended to present concepts in a concrete fashion.
Before describing the testing method of the sub-library and sub-table component in the embodiment of the present application in detail, the implementation environment and the application scenario of the embodiment of the present application are described first.
The technical scheme provided by the embodiment of the application can be executed by computer equipment. The computer device is a device installed with a programming tool that supports programming using a programming language (e.g., Java language, Python language), for example, IntelliJ IDEA, eclipse. The computer device may store script code written by a developer or automatically generate script code generated by scripting software. The computer device may be a tablet computer, a notebook computer, a desktop computer, a portable computer, and the like, which is not limited in this application.
In the embodiment of the application, a test case is deployed in a computer device. The test case integrates a sub-database and sub-table component to be tested, and the sub-database and sub-table component to be tested is used for determining a data table in the database. Illustratively, the data table a in the database a can be determined by the sub-base and sub-table component to be tested. As another example, data table B in database B is determined by the sub-base to be tested sub-table component.
It should be noted that, in the embodiment of the present application, the generation manner of the test case is not limited. For example, the test case may be generated by the programming tool through a programming language (e.g., Java). As another example, a computer device may automatically generate a test case.
The embodiments of the present application will be described in detail below with reference to the drawings attached to the specification.
As shown in fig. 1, a method for testing a component in a library and a table according to an embodiment of the present application includes:
s101, receiving a simulation request message through a test case.
Wherein, the simulation request message is used for indicating the processing target service.
It should be noted that, the target service is not limited in the embodiment of the present application. For example, the target service may be an account opening service. As another example, the target service may be a credit service. As another example, the target service may be a withdrawal service.
Alternatively, the emulation request message may be a Hypertext Transfer protocol (HTTP) message.
As a possible implementation manner, the simulation request message is generated by a preset simulation tool, wherein the simulation tool is used for generating the simulation request message. Thereafter, a simulation request message is received from the simulation tool by the test case.
The simulation tool is not limited in the embodiments of the present application. For example, the simulation tool may be a postman tool.
And S102, calling the test case to process the target service according to the simulation request message.
The test case can call the sub-library and sub-table components to be tested to process the target service.
It should be noted that each target service corresponds to a data table in a database. The test case can call the sub-library and sub-table component to be tested to determine the data table of the target service, and operate the data table to process the target service.
In the embodiment of the application, the complexity of the test case is less than the preset complexity threshold.
It should be noted that, in the embodiments of the present application, the complexity of the test case is used to characterize the complexity of the test case. The complexity of a test case is determined by the compilation length of the test case, the length of time the test case is compiled, the conditions (or indices) in the test case, the logic of the test case, and the like.
Illustratively, test case a has a length of 10, 2 conditions in test case a, and a time to compile the test case is 10 seconds. The length of the project application is 3000, 300 conditions exist in the project application, and the time of the project application is 20 days, so that the complexity of the test case is less than that of the project application, and the complexity of the test case is less than that of the project application.
It will be appreciated that the complexity of the test case is low compared to the complexity of the project application. That is, less time is spent developing test cases. Therefore, the efficiency of testing the sub-warehouse and sub-table components to be tested can be improved by testing the sub-warehouse and sub-table components to be tested through the test example.
S103, generating a service response message through the test case.
The service response message is used for indicating whether the sub-library and sub-table component to be tested is successfully called.
In one possible implementation, after the target processing statement is invoked to process the target service, a service response message may be generated.
For example, the service response message may be "call the sub-library and sub-table component successfully, and the service transaction is successful. For another example, the service response message may be "call of library and table component fails, and service transaction fails".
Based on the technical scheme, the sub-library and sub-table components to be tested do not need to be integrated in the project application, and only the sub-library and sub-table components to be tested need to be integrated in the test case. And then, receiving a simulation request message through the test case, wherein the simulation request message is used for indicating the processing of the target service, the test case can call the sub-library and sub-table components to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold. And then, calling the test case to process the target service according to the simulation request message. And then, generating a service response message through the test case, wherein the service response message is used for indicating whether the sub-library and sub-table component to be tested is successfully called. Therefore, as the complexity of the test case is smaller than the preset complexity threshold, the time consumed for developing the test case is shorter, and the efficiency of testing the sub-library and sub-table components can be improved.
In some embodiments, the test case includes a control module. Receiving, by the test case, a simulation request message (i.e., S101), including: an emulation request message is received by a control module.
In some embodiments, the test case further comprises: the system comprises a service module and a mapping module, wherein the control module comprises a target interface. As shown in fig. 2, invoking the testcase processing target service according to the simulation request message (i.e., S102) includes:
s201, the control module calls a target interface according to the simulation request message and sends the simulation request message to the service module.
In one possible embodiment, the control module comprises at least one interface, each of the at least one interface being configured to process at least one service. And at least one interface comprises a target interface, and the target interface is used for calling the service module to process the target service.
In one possible design, the emulation request message includes a service identifier, and the service identifier corresponds to the interface.
In one possible implementation, the control module determines the target interface according to the service identifier. And then, calling the target interface to send a simulation request message to the service module.
Illustratively, the simulation request message includes a service identifier a, where the service identifier a corresponds to the interface a, and the control module may call the interface a according to the service identifier a and send the simulation request message to the service module.
Accordingly, the service module receives the simulation request message from the control module.
S202, the service module determines target operation according to the simulation request message.
In one possible design, the service module includes at least one operation, and the at least one operation includes a target operation. The target operation is a method of processing a target service.
It should be noted that the target operation in the embodiment of the present application is used for operating on a data table. The embodiment of the present application does not limit the target operation. For example, the target operation may be to add data in a data table. As another example, the target operation may be to delete data in a data table. For example, the target operation may be to look up data in a data table.
In one possible implementation, the service module determines the target operation according to the service identifier. Wherein the service identifier corresponds to the target operation.
For example, if the service identifier is an account opening identifier, the corresponding target operation is an account opening operation (e.g., adding data to a data table). For another example, if the service identifier is a withdrawal identifier, the corresponding target operation is a withdrawal operation (e.g., modifying data in a data table).
S203, the service module sends the target operation to the mapping module.
Accordingly, the mapping module receives the target operation from the service module.
Optionally, the service module sends the simulation request message to the mapping module.
And S204, calling a target processing statement to execute target operation on the target data table by the mapping module according to the target operation.
The target processing statement can call the sub-library sub-table component to be tested to determine a target data table, and the target data table corresponds to the target service.
It should be noted that the target processing statement is a statement for operating the database. For example, the target processing statement may be a Structured Query Language (sql).
In one possible implementation, the mapping module determines the target processing statement according to the target operation. And then, calling a target processing statement to execute a target operation on the target data table.
Illustratively, if the target operation is an account opening operation (i.e., an operation to add an account), the target processing statement is an account adding statement (e.g., "add" statement). For another example, if the target operation is a sales operation, the target processing statement is an operation to delete an account (e.g., "delete" statement).
In some embodiments, the simulation request message further includes a data table identifier, and a table partitioning policy is configured in the test case, where the table partitioning policy is used to indicate a correspondence between the data table identifier and the data table. And before the mapping module calls a target processing statement to execute the target operation on the target data table according to the target operation, the mapping module calls a database sub-table component to determine the target data table according to the data table identifier and the sub-table strategy.
It should be noted that the table partitioning policy may be pre-configured by a developer during development.
Illustratively, if data table identifier a corresponds to data table a, data table identifier B corresponds to data table B, and data table identifier C corresponds to data table C. In the case where the emulation request message includes data table identification a, the target data table may be determined to be data table a.
It will be appreciated that the target data table can be determined by the test case invoking the sub-library sub-table component in conjunction with the data table identification and sub-table policy. Therefore, whether the sub-warehouse and sub-meter components can normally run can be tested, the complexity of the test case is low, the development time is short, and the efficiency of testing the sub-warehouse and sub-meter components is improved.
In some embodiments, the test case further includes an entity module, and the service response message includes a first identifier or a second identifier, where the first identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is successful, and the second identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is failed. Generating a service response message through the test case (i.e., S103), including: and if the mapping module successfully calls the target processing statement, the entity module generates a first identifier. And if the mapping module fails to call the target processing statement, the entity module generates a second identifier.
For example, if the target service is an account opening service and the account opening is successful, a "true" identifier (i.e., the first identifier) may be generated. If the account opening fails, a "fail" identifier (i.e., a second identifier) is generated.
It can be understood that by generating the first identifier or the second identifier, the developer can know the test result, thereby perfecting the test case and the sub-library and sub-table components.
In some embodiments, after generating the business response message, the business response message may be sent to the simulation tool.
The foregoing describes the solution provided by an embodiment of the present application, primarily from the perspective of a computer device. It will be appreciated that the computer device, in order to implement the above-described functions, comprises corresponding hardware structures and/or software modules for performing the respective functions. Those skilled in the art will readily appreciate that the steps of the method for testing the components of the example sub-libraries and sub-tables described in connection with the embodiments disclosed herein may be implemented in hardware or a combination of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application also provides a testing device for the database and table dividing components. The testing device of the sub-warehouse and sub-table component can be computer equipment, a CPU in the computer equipment, a processing module used for determining the testing of the sub-warehouse and sub-table component in the computer equipment, and a client used for testing the sub-warehouse and sub-table component in the computer equipment.
In the embodiment of the present application, the test of the sub-library and sub-table components may be divided into the functional modules or the functional units according to the above method examples, for example, each functional module or functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module or a functional unit. The division of the modules or units in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 3 is a schematic structural diagram of a testing apparatus for a sub-library and sub-table component according to an embodiment of the present application. The testing device of the sub-library and sub-table component is used for executing the testing method of the sub-library and sub-table component shown in figure 1 or figure 2. The testing device for the sub-library and sub-table components can comprise a receiving unit 301, a processing unit 302 and a transmitting unit 303.
The receiving unit 301 is configured to receive a simulation request message through a test case, where the simulation request message is used to instruct to process a target service, the test case can call a sub-library and sub-table component to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold. And the processing unit 302 is configured to invoke the test case to process the target service according to the simulation request message. The processing unit 302 is further configured to generate a service response message through the test case, where the service response message is used to indicate whether invoking the sub-library and sub-table component to be tested is successful.
Optionally, the test case includes: and a control module. The receiving unit 301 is specifically configured to receive the simulation request message through the control module.
Optionally, the test case further includes: the control module comprises a target interface, and the target interface is used for calling the service module to process a target service; the apparatus further comprises a transmitting unit 303. A sending unit 303, configured to call the target interface according to the simulation request message through the control module, and send the simulation request message to the service module. The processing unit 302 is configured to determine, by the service module, a target operation according to the simulation request message, where the target operation is a method for processing a target service. The sending unit 303 is further configured to send the target operation to the mapping module through the service module. The processing unit 302 is further configured to invoke a target processing statement to perform a target operation on the target data table according to the target operation through the mapping module, where the target processing statement can invoke a sub-library sub-table component to be tested to determine the target data table, and the target data table corresponds to the target service.
Optionally, the simulation request message further includes a data table identifier, a table splitting policy is configured in the test case, and the table splitting policy is used to indicate a correspondence between the data table identifier and the data table. The processing unit 302 is further configured to invoke, by the mapping module, a database-based table-based component to determine a target data table according to the data table identifier and the table-based policy.
Optionally, the test case further includes an entity module, where the service response message includes a first identifier or a second identifier, the first identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is successful, and the second identifier is used to indicate that the invoking of the sub-library and sub-table component to be tested is failed. The processing unit 302 is further configured to generate a first identifier through the entity module if the mapping module successfully calls the target processing statement. The processing unit 302 is further configured to generate a second identifier through the entity module if the mapping module fails to call the target processing statement.
Fig. 4 shows still another possible structure of the testing apparatus of the sub-library and sub-table component according to the above embodiment. This testing arrangement who divides storehouse branch table subassembly includes: a processor 401 and a communication interface 402. The processor 401 is used to control and manage the actions of the device, for example, to perform the various steps in the method flows shown in the above-described method embodiments, and/or to perform other processes for the techniques described herein. The communication interface 402 is used to support the testing apparatus of the sub-library and sub-table component to communicate with other network entities. The testing device of the sub-library and sub-table components may further comprise a memory 403 and a bus 404, the memory 403 being used for storing program codes and data of the device.
The processor 401 may implement or execute various illustrative logical blocks, units and circuits described in connection with the present disclosure. The processor may be a central processing unit, general purpose processor, digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, units, and circuits described in connection with the present disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like.
Memory 403 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
The bus 404 may be an Extended Industry Standard Architecture (EISA) bus or the like. The bus 404 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
In practical implementation, the receiving unit 301 may be implemented by the communication interface 402 shown in fig. 4, and the processing unit 302 may be implemented by the processor 401 shown in fig. 4 calling the program code in the memory 403. For the specific implementation process, reference may be made to the description of the test method portion of the sub-library and sub-table component shown in fig. 1 or fig. 2, which is not described herein again.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
The present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for testing the sub-library and sub-table components in the above method embodiments.
The embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is enabled to execute the method for testing the sub-library and sub-table components in the method flow shown in the above method embodiment.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a register, a hard disk, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, any suitable combination of the above, or any other form of computer readable storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuit (ASIC). In embodiments of the present application, 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.
Since the testing apparatus, the computer-readable storage medium, and the computer program product of the sub-library and sub-table component in the embodiments of the present invention can be applied to the above method, the technical effects obtained by the method can also refer to the above method embodiments, and the details of the embodiments of the present invention are not repeated herein.
The above is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. The method for testing the warehouse and table dividing components is characterized by being applied to computer equipment, wherein test cases are deployed on the computer equipment, and the test cases are integrated with the warehouse and table dividing components to be tested; the method comprises the following steps:
receiving a simulation request message through a test case, wherein the simulation request message is used for indicating to process a target service, the test case can call a sub-library and sub-table component to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold;
calling the test case to process the target service according to the simulation request message;
and generating a service response message through the test case, wherein the service response message is used for indicating whether the sub-library and sub-table component to be tested is successfully called.
2. The method of claim 1, wherein the test case comprises a control module; the receiving of the emulation request message includes:
receiving, by the control module, the simulation request message.
3. The method of claim 2, wherein the test case further comprises: the control module comprises a target interface, and the target interface is used for calling the service module to process the target service;
the calling the test case to process the target service according to the simulation request message includes:
calling the target interface through the control module according to the simulation request message, and sending the simulation request message to the service module;
determining a target operation according to the simulation request message through the service module, wherein the target operation is a method for processing the target service;
sending, by the service module, the target operation to the mapping module;
and calling a target processing statement to execute the target operation on a target data table through the mapping module according to the target operation, wherein the target processing statement can call the sub-database sub-table component to be tested to determine the target data table, and the target data table corresponds to the target service.
4. The method of claim 3, wherein the simulation request message further includes a data table identifier, and a table partitioning policy is configured in the test case, and the table partitioning policy is used to indicate a correspondence between the data table identifier and a data table;
before invoking, by the mapping module according to the target operation, a target processing statement to perform the target operation on a target data table, the method further includes:
and calling the database sub-table component to determine the target data table through the mapping module according to the data table identification and the sub-table strategy.
5. The method according to any of claims 1-4, wherein the test case further comprises an entity module, the service response message comprises a first identifier or a second identifier, the first identifier is used for indicating that the invoking of the sub-table component to be tested is successful, and the second identifier is used for indicating that the invoking of the sub-table component to be tested is failed;
the generating of the service response message by the test case includes:
if the mapping module successfully calls the target processing statement, the entity module generates the first identifier;
and if the mapping module fails to call the target processing statement, generating the second identifier through the entity module.
6. The device for testing the warehouse and table dividing components is applied to computer equipment, wherein test cases are deployed on the computer equipment, and the test cases are integrated with the warehouse and table dividing components to be tested; the device comprises:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a simulation request message through a test case, the simulation request message is used for indicating to process a target service, the test case can call a sub-library and sub-table component to be tested to process the target service, and the complexity of the test case is smaller than a preset complexity threshold;
the processing unit is used for calling the test case to process the target service according to the simulation request message;
the processing unit is further configured to generate a service response message through the test case, where the service response message is used to indicate whether invoking the to-be-tested sub-library and sub-table component is successful.
7. The apparatus of claim 6, wherein the test case comprises a control module;
the receiving unit is specifically configured to receive the simulation request message through the control module.
8. The apparatus of claim 7, wherein the test case further comprises: the control module comprises a target interface, and the target interface is used for calling the service module to process the target service; the apparatus further comprises a transmitting unit;
the sending unit is used for calling the target interface through the control module according to the simulation request message and sending the simulation request message to the service module;
the processing unit is configured to determine, by the service module, a target operation according to the simulation request message, where the target operation is a method for processing the target service;
the sending unit is further configured to send the target operation to the mapping module through the service module;
the processing unit is further configured to invoke a target processing statement to execute the target operation on a target data table according to the target operation through the mapping module, where the target processing statement can invoke the sub-database sub-table component to be tested to determine the target data table, and the target data table corresponds to the target service.
9. The apparatus of claim 8, wherein the simulation request message further includes a data table identifier, and a table partitioning policy is configured in the test case, and the table partitioning policy is used to indicate a correspondence between the data table identifier and a data table;
the processing unit is further configured to invoke the database sub-table component to determine the target data table through the mapping module according to the data table identifier and the sub-table policy.
10. The apparatus according to any of claims 6-9, wherein the test case further comprises an entity module, the service response message comprises a first identifier or a second identifier, the first identifier is used to indicate that the invoking of the sub-table component to be tested is successful, and the second identifier is used to indicate that the invoking of the sub-table component to be tested is failed;
the processing unit is further configured to generate the first identifier through the entity module if the mapping module successfully calls the target processing statement;
the processing unit is further configured to generate the second identifier through the entity module if the mapping module fails to invoke the target processing statement.
11. A testing arrangement of branch table subassembly of branch storehouse characterized in that includes: a processor and a memory; the processor and the memory are coupled; the memory is used for storing one or more programs, and the one or more programs comprise computer-executable instructions which, when the testing device of the sub-warehouse and sub-table component runs, the processor executes the computer-executable instructions stored by the memory to enable the testing device of the sub-warehouse and sub-table component to execute the method of any one of claims 1-5.
12. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a computer, cause the computer to perform the method of any of claims 1-5.
CN202111290610.6A 2021-11-02 2021-11-02 Method and device for testing warehouse and table components and storage medium Pending CN113986744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111290610.6A CN113986744A (en) 2021-11-02 2021-11-02 Method and device for testing warehouse and table components and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111290610.6A CN113986744A (en) 2021-11-02 2021-11-02 Method and device for testing warehouse and table components and storage medium

Publications (1)

Publication Number Publication Date
CN113986744A true CN113986744A (en) 2022-01-28

Family

ID=79745897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111290610.6A Pending CN113986744A (en) 2021-11-02 2021-11-02 Method and device for testing warehouse and table components and storage medium

Country Status (1)

Country Link
CN (1) CN113986744A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862216A (en) * 2022-05-16 2022-08-05 中国银行股份有限公司 Method and device for determining agile project scheduling scheme

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862216A (en) * 2022-05-16 2022-08-05 中国银行股份有限公司 Method and device for determining agile project scheduling scheme

Similar Documents

Publication Publication Date Title
US20190324772A1 (en) Method and device for processing smart contracts
CN110955409B (en) Method and device for creating resources on cloud platform
CN110659031A (en) Compiling method and device of application program, electronic equipment and storage medium
CN112948024B (en) Loading method and device of dynamic link library, storage medium and electronic equipment
CN110716845A (en) Method for reading log information of Android system
CN111427782B (en) Android dynamic link library operation method, device, equipment and storage medium
CN113986402A (en) Function calling method and device, electronic equipment and storage medium
CN109032612B (en) Interface calling method and device of hybrid application and computer readable storage medium
CN113986744A (en) Method and device for testing warehouse and table components and storage medium
CN114461223A (en) Code generation method and device and terminal equipment
US11288170B1 (en) Log analysis debugging without running on real production environment
CN106502707B (en) Code generation method and device
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN113127329A (en) Script debugging method and device and computer storage medium
CN109189591B (en) Method and device for calling application component
CN115510505A (en) Application file packaging method and device, electronic equipment and readable storage medium
CN113342660B (en) File testing method, device, system, electronic equipment and readable storage medium
CN115760391A (en) Intelligent contract changing method and device in block chain, electronic equipment and storage medium
CN114860204A (en) Program processing method, program operating device, terminal, smart card and storage medium
CN111176653B (en) Program compiling and packaging method and device, electronic equipment and storage medium
CN112463262A (en) Android system GPS module self-adaption method and terminal
CN112596751A (en) Compiling method, terminal, server and storage medium of application program installation package
CN111242731A (en) Service execution method and device
CN112068814A (en) Method, device, system and medium for generating executable file
CN111506301B (en) Method for bypassing system restriction reflection call and related equipment

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