CN114840407A - Mock testing method and related equipment - Google Patents

Mock testing method and related equipment Download PDF

Info

Publication number
CN114840407A
CN114840407A CN202110143431.3A CN202110143431A CN114840407A CN 114840407 A CN114840407 A CN 114840407A CN 202110143431 A CN202110143431 A CN 202110143431A CN 114840407 A CN114840407 A CN 114840407A
Authority
CN
China
Prior art keywords
test
mock
service
testing
identification information
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
CN202110143431.3A
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.)
Jialian Payment Co ltd
Original Assignee
Jialian Payment Co 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 Jialian Payment Co ltd filed Critical Jialian Payment Co ltd
Priority to CN202110143431.3A priority Critical patent/CN114840407A/en
Publication of CN114840407A publication Critical patent/CN114840407A/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 embodiment of the application discloses a Mock testing method, which comprises the following steps: acquiring a service test request sent by a test end, wherein the service test request comprises service identification information of a service requested to be tested by the test end; determining configuration parameters from a Mock test configuration database, wherein the configuration parameters comprise test items to be tested by the target service and test results corresponding to the test items; calling the testing method to perform Mock testing on the testing item to obtain a testing result corresponding to the configuration parameter; and returning the test result to the test end. According to the scheme, the related configuration parameters are stored in the Mock test configuration database in advance, and the configuration parameters stored in the Mock test configuration database are used for testing when the testing is needed, so that the operation process of the source code file of the Mock test system when the user needs to test with different requirements is avoided, the Mock test system does not need to be restarted when different test processes are carried out, and the Mock test process is easier to implement.

Description

Mock testing method and related equipment
Technical Field
The embodiment of the application relates to the field of communication, in particular to a Mock testing method and related equipment.
Background
The Mock test refers to a test method which is created by using a virtual object for some objects which are not easy to construct or obtain in the test process so as to facilitate the test. Related tests are required in the Mock test service by using Mock configuration parameters.
In the prior art, Mock configuration parameters are usually configured in a source code file of a Mock test system in advance, and when an automatic test is executed, the Mock configuration parameters in the source code file of the Mock test system are used for testing.
In the existing Mock data testing process, because Mock configuration parameters are written in source code files of a Mock testing system, when the Mock configuration parameters need to be changed due to different testing requirements, the whole Mock testing system needs to be restarted, the testing process is complicated, and the workload of technicians is increased.
Disclosure of Invention
The embodiment of the application provides a Mock testing method, which is used for a Mock testing process, related configuration parameters are pre-stored in a Mock testing configuration database, the configuration parameters stored in the Mock testing configuration database are used for testing when testing is needed, the operation process of the source code file of a Mock testing system is avoided when a user needs to test different requirements, the Mock testing system does not need to be restarted when different testing processes are carried out, and the Mock testing process is easier to implement.
A first aspect of the embodiments of the present application provides a Mock testing method, including:
acquiring a service test request sent by a test end, wherein the service test request comprises service identification information of a service requested to be tested by the test end;
determining configuration parameters of the target service associated with the service identification information from a Mock test configuration database, wherein the configuration parameters comprise test items to be tested by the target service and test results corresponding to the test items;
determining a test method corresponding to the test item, calling the test method to perform Mock test on the test item, and obtaining a test result corresponding to the configuration parameter;
and returning the test result to the test end.
Based on the Mock testing method provided in the first aspect of the embodiment of the present application, optionally, the method further includes:
and receiving configuration parameters of the Mock service, and storing the configuration parameters into the Mock test configuration database, wherein the configuration parameters of the Mock service comprise the service identification information.
Based on the Mock testing method provided in the first aspect of the embodiment of the present application, optionally, after the service test request sent by the testing end is obtained, the method further includes:
judging whether the service test request meets the preset condition for performing the Mock test;
and if the service test request meets the preset condition for performing the Mock test, executing the subsequent test method corresponding to the test item, calling the test method to perform the Mock test on the test item, and obtaining the test result corresponding to the configuration parameter.
Based on the Mock testing method provided in the first aspect of the embodiment of the present application, optionally, the method further includes:
and if the service test request does not accord with the preset condition for performing the Mock test, forwarding the service test request to other services.
Based on the Mock testing method provided in the first aspect of the embodiment of the present application, optionally, the determining whether the service testing request meets the preset condition for performing the Mock testing includes:
acquiring verification information corresponding to the service identification information, wherein the verification information is prestored in the Mock test configuration database;
judging whether the service identification information is consistent with the verification information;
if the service identification information is inconsistent with the verification information, the service test request conforms to the preset condition for performing the Mock test;
and if the service identification information is consistent with the verification information, the service test request does not accord with the preset condition for performing the Mock test.
Based on the Mock testing method provided in the first aspect of the embodiment of the present application, optionally, the method further includes:
receiving a configuration parameter deleting request of the testing end, wherein the testing deleting request comprises service identification information;
determining configuration parameters associated with the service identification information in the Mock test configuration database;
and deleting the configuration parameters.
A second aspect of the embodiments of the present application provides a Mock test device, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a service test request sent by a test end, and the service test request comprises service identification information of a service requested to be called by the test end;
a determining unit, configured to determine, from a Mock test configuration database, configuration parameters of a target service associated with the service identification information, where the configuration parameters include a test item to be tested by the target service and a test result corresponding to the test item;
the test unit is used for determining a test method corresponding to the test item, calling the test method to perform Mock test on the test item, and obtaining a test result corresponding to the test item;
and the return unit is used for returning the test result to the test end.
A third aspect of the embodiments of the present application provides a Mock testing device, including:
the system comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;
the memory is a transient memory or a persistent memory;
the central processing unit is configured to communicate with the memory, and execute the instruction operations in the memory on the Mock test device to execute the method according to any one of the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to perform the method according to any one of the first aspects of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product containing instructions, which when executed on a computer, cause the computer to perform the method according to any one of the first aspect of embodiments of the present application.
According to the technical scheme, the embodiment of the application has the following advantages: according to the embodiment of the application, the service test request sent by the test end is obtained, the configuration parameters of the target service related to the service test request are determined from the Mock test configuration database based on the service identification information included in the service test request, the corresponding Mock test is carried out based on the configuration parameters, the test result is returned to the test section, and then the Mock test process is completed. By the method, testers do not need to modify the source code files of the Mock test system, different types of tests can be completed only by adding corresponding configuration parameters in the Mock test configuration database, and the configuration parameters can be adjusted without the use process of the terminal Mock test system, so that tests with different requirements can be completed. The Mock testing process is more convenient, and the feasibility of the Mock testing process is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of an embodiment of the Mock testing method of the present application;
FIG. 2 is another schematic flow chart of an embodiment of the Mock testing method of the present application;
FIG. 3 is a schematic structural diagram of an embodiment of a Mock testing device according to the present application;
FIG. 4 is another schematic structural diagram of an embodiment of a Mock testing device according to the present application.
Detailed Description
The embodiment of the application provides a Mock testing method, which is used for a Mock testing process, and the Mock testing process is easier to implement by pre-storing related configuration parameters in a Mock testing configuration database according to the scheme, so that the operating process of a source code file of a Mock testing system is avoided when a user needs to test different requirements.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. 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 terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
The Mock test refers to a test method which is created by using a virtual object for some objects which are not easy to construct or obtain in the test process so as to facilitate the test. Related tests are required in the Mock test service by using Mock configuration parameters.
In the existing Mock data testing process, because Mock configuration parameters are written in source code files of a Mock testing system, when the Mock configuration parameters need to be changed due to different testing requirements, the whole Mock testing system needs to be restarted, the testing process is complicated, the workload of technicians is increased, and certain difficulty exists in implementation.
To solve the above problems, the present application provides a new Mock testing method, and referring to fig. 1, an embodiment of the Mock testing method of the present application includes: step 101-step 104.
101. And acquiring a service test request sent by a test end.
And acquiring a service test request sent by a test end. The service test request comprises service identification information of the service requested to be tested by the test terminal. The service test request indicates that the test end needs to request a certain service, and the service actually requested by the test end can be determined based on the service identification information. The specific service identification information can be preset, and different types of services with different settings in the Mock test system can be obtained through different service identifications.
102. And determining the configuration parameters of the target service associated with the service identification information from a Mock test configuration database.
And inquiring in a Mock test configuration database based on the service identification information, and further determining the configuration parameters of the target service associated with the service identification information from the Mock test configuration database. Specifically, the service identification information may be stored in the Mock test configuration database as a primary key in association with the configuration parameters, so that the configuration parameters are determined after the Mock test system obtains the service test request. The configuration parameters are pre-stored in a Mock test configuration database, and the configuration parameters comprise test items to be tested by the target service and test results corresponding to the test items. The specific configuration parameters may be set differently based on the desired test content, for example, for the interface test, the return content, the return time limit of the required test, the number of delayed return seconds, and whether to return multiple requests, etc. may be set according to the actual situation, and are not limited herein. It is understood that different test results and test items may be set for the performance test or the functional test different from the interface test, which is not limited herein.
103. And determining a test method corresponding to the test item, calling the test method to perform Mock test on the test item, and obtaining a test result corresponding to the configuration parameters.
And determining a test method corresponding to the test item, calling the test method to perform Mock test on the test item, and obtaining a test result corresponding to the configuration parameter. And carrying out corresponding Mock test based on the configuration parameters acquired from the Mock test configuration database to obtain a test result corresponding to the configuration parameters stored by the configuration parameters. And then completing the Mock test, specifically, replacing and modifying the field contained in the configuration parameter and the current field in the Mock test system, so that the Mock test system can complete the corresponding test item according to the configuration parameter, specifically, the Mock test system can be determined according to the actual situation, and the Mock test system is not limited herein.
104. And returning the test result to the test end.
And the Mock test system returns the test result to the test end. And then completing the Mock test process, wherein the test result is obtained based on the service identification information, so that when the Mock test is performed, a user can obtain different types of tests by modifying the service identification information in the service test request. Meanwhile, the configuration parameters are stored in the Mock test configuration database, so that a user can carry out tests in different modes without adjusting the source code file of the Mock test system, and for the condition that a plurality of users carry out tests, the configuration parameters can be obtained by deploying the service on the virtual machine of the user and requesting the Mock test configuration database, so that the simultaneous test process of the plurality of users can be completed.
According to the embodiment of the application, the service test request sent by the test end is obtained, the configuration parameters of the target service related to the service test request are determined from the Mock test configuration database based on the service identification information included in the service test request, the corresponding Mock test is carried out based on the configuration parameters, the test result is returned to the test section, and then the Mock test process is completed. By the method, testers do not need to modify the source code files of the Mock test system, different types of tests can be completed only by adding corresponding configuration parameters in the Mock test configuration database, and the configuration parameters can be adjusted without the use process of the terminal Mock test system, so that tests with different requirements can be completed. The Mock testing process is more convenient, and the feasibility of the Mock testing process is improved.
To solve the problem, based on the embodiment described in fig. 1, a detailed embodiment that can be selectively implemented in the implementation process of the present solution is provided below, and referring to fig. 2, an embodiment of the present application includes: step 201-step 207.
201. And receiving configuration parameters of the Mock service, and storing pre-stored data into the Mock test configuration database.
And receiving configuration parameters of the Mock service, and storing pre-stored data into the Mock test configuration database. The user can directly operate the Mock test configuration database, and directly store the configuration parameters into the Mock test configuration database, wherein the configuration parameters of the Mock service comprise the service identification information. It is understood that the configuration parameters may include other related information besides the data associated with the Mock test, such as information of an operator, operation time, etc., which may be determined according to the actual situation, and is not limited herein.
202. And acquiring a service test request sent by a test end.
The method comprises the steps of obtaining a service test request sent by a test end, wherein the service test request comprises service identification information of a service which is requested to be tested by the test end. This step is similar to step 101 in the embodiment corresponding to fig. 1, and is not described herein again.
203. And judging whether the service test request meets the preset condition for performing the Mock test.
And judging the service test request, judging whether the service test request meets the preset condition for performing the Mock test, wherein the specific preset condition can be stored in a Mock test configuration database in advance, and if the service test request meets the preset condition for performing the Mock test, executing the step 205, determining the configuration parameters of the target service associated with the service identification information from the Mock test configuration database, and performing the Mock test. If the predetermined condition is not met, step 204 is executed to forward the service test request to other services. The preset condition may be determined based on an actual situation, and the present solution explains whether the service identification information included in the service test request is consistent with the verification information pre-stored in the Mock test configuration database as the preset condition. It can be understood that, in the actual implementation process of the present disclosure, the preset condition may be set according to its own requirement, and is not limited herein.
The verification information can be obtained from a Mock test configuration database, and the verification information and the service identification information are stored in a correlation manner in the embodiment, so that the corresponding verification information can be obtained based on the service identification information, the verification information is preset for a user, and if the service identification information is inconsistent with the verification information, the service test request meets the preset condition for performing the Mock test; and if the service identification information is consistent with the verification information, the service test request does not accord with the preset condition for performing the Mock test, and the test request needs to be forwarded to other services. The purpose of performing the Mock test if the service identification information and the verification information are not consistent is to set the Mock test in the practical implementation process, the user needs to perform the Mock test under most conditions, so that the use requirement of the user can be met only by adjusting the verification information to any form, and when other services are required, the verification information needs to be accurately adjusted to be consistent with the service identification information, so that the purpose of calling other services is achieved, the use process of the user is further facilitated, and the implementation of the scheme is improved. It can be understood that, in the actual implementation process, the Mock service may also be requested when the service identification information is consistent with the verification information, and other services are requested when the service identification information is inconsistent with the verification information, which may be determined according to the actual situation and is not limited herein.
204. And forwarding the service test request to other services.
If the service identification information is consistent with the verification information, the service test request is forwarded to other services, and if the service identification information is consistent with the verification information, the service which the user actually desires to request is a real service, so the service test request needs to be forwarded to other services.
205. And determining the configuration parameters of the target service associated with the service identification information from a Mock test configuration database.
And determining the configuration parameters of the target service associated with the service identification information from a Mock test configuration database. It can be understood that the Mock test configuration database may add a corresponding lock mechanism to avoid the situation that multiple persons modify the same data at the same time, and is not limited herein.
206. And determining a test method corresponding to the test item, calling the test method to perform Mock test on the test item, and obtaining a test result corresponding to the test item.
207. And returning the test result to the test end.
Steps 206 to 207 are similar to steps 103 to 104 in the embodiment corresponding to fig. 1, and are not described herein again.
208. And receiving a configuration parameter deleting request of the testing end.
After obtaining the test result, the Mock test system can also clean the configuration parameters in the Mock test configuration database, specifically, firstly, a configuration parameter deleting request sent by a user needs to be obtained, the test deleting request comprises service identification information, and the configuration parameters stored corresponding to the service identification information are the configuration parameters needing to be deleted.
209. Determining configuration parameters associated with the service identification information in the Mock test configuration database.
And inquiring a Mock test configuration database based on the service identification information to obtain the configuration parameters associated with the service identification information so as to carry out the subsequent deleting process.
210. And deleting the configuration parameters.
And deleting the determined configuration parameters associated with the service identification information, thereby completing cleaning of the Mock test configuration database. Therefore, unnecessary data of the Mock test configuration database are reduced, test data management is facilitated, and the feasibility of the scheme is improved. It should be understood that, the above steps 208 to 210 are a cleaning process for the Mock test configuration database, and the implementation process does not conflict with the Mock test process, and therefore, the implementation process can also be performed independently, which may be determined according to the actual situation, and is not limited herein.
The technical scheme is that the service test request is judged, whether the service test request meets the condition for performing the Mock test is judged, the Mock test is performed if the service test request meets the condition, the request is forwarded to other services if the service test request does not meet the condition, and meanwhile, the preset condition is stored in the Mock test configuration database, so that a user can only change the preset condition stored in the Mock test configuration database to enable a test terminal to obtain other services or Mock services, the simplicity and convenience of the test process are improved, and the practicability of the technical scheme is improved.
The Mock test method in the application embodiment is described above, and the Mock test device in the embodiment of the present invention is described below. Referring to fig. 3, an embodiment of the present application includes:
an obtaining unit 301, configured to obtain a service test request sent by a test end, where the service test request includes service identification information of a service requested to be called by the test end;
a determining unit 302, configured to determine, from a Mock test configuration database, configuration parameters of a target service associated with the service identification information, where the configuration parameters include a test item to be tested by the target service and a test result corresponding to the test item;
the testing unit 303 is configured to determine a testing method corresponding to the testing item, and call the testing method to perform a Mock test on the testing item to obtain a testing result corresponding to the testing item;
a returning unit 304, configured to return the test result to the testing end.
In this embodiment, the flow executed by each unit in the Mock test device is similar to the method flow described in the embodiment corresponding to fig. 1, and is not repeated herein.
Fig. 4 is a schematic structural diagram of a Mock testing device according to an embodiment of the present application, where the server 400 may include one or more Central Processing Units (CPUs) 401 and a memory 405, and the memory 405 stores one or more applications or data.
In this embodiment, the specific functional module division in the central processing unit 401 may be similar to the functional module division manner of each unit described in the foregoing fig. 3, and is not described here again.
Memory 405 may be volatile storage or persistent storage, among other things. The program stored in memory 405 may include one or more modules, each of which may include a sequence of instructions operating on a server. Still further, the central processor 401 may be arranged to communicate with the memory 405, and to execute a series of instruction operations in the memory 405 on the server 400.
The server 400 may also include one or more power supplies 402, one or more wired or wireless network interfaces 403, one or more input-output interfaces 404, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The central processing unit 401 may perform the operations performed by the Mock testing method in the embodiment shown in fig. 1, and details thereof are not repeated herein.
The present invention also provides a computer readable storage medium for implementing the functions of the Mock testing method, having a computer program stored thereon, which, when executed by a processor, may be used to execute the method as described in fig. 1.
It will be appreciated that the integrated units, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a corresponding one of the computer readable storage media or integrated as a computer program product for performing the above-described method. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the steps of the above embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A Mock testing method is characterized by comprising the following steps:
acquiring a service test request sent by a test end, wherein the service test request comprises service identification information of a service requested to be tested by the test end;
determining configuration parameters of the target service associated with the service identification information from a Mock test configuration database, wherein the configuration parameters comprise test items to be tested by the target service and test results corresponding to the test items;
determining a test method corresponding to the test item, calling the test method to perform Mock test on the test item, and obtaining a test result corresponding to the configuration parameter;
and returning the test result to the test end.
2. The Mock test method according to claim 1, wherein said method further comprises:
and receiving configuration parameters of the Mock service, and storing the configuration parameters into the Mock test configuration database, wherein the configuration parameters of the Mock service comprise the service identification information.
3. The Mock testing method according to claim 1, wherein after said obtaining a service test request sent by a testing end, said method further comprises:
judging whether the service test request meets the preset condition for performing the Mock test;
and if the service test request meets the preset condition for performing the Mock test, executing the subsequent test method corresponding to the test item, calling the test method to perform the Mock test on the test item, and obtaining the test result corresponding to the configuration parameter.
4. The Mock test method according to claim 3, wherein said method further comprises:
and if the service test request does not accord with the preset condition for performing the Mock test, forwarding the service test request to other services.
5. The Mock testing method according to any of the claims 3 to 4, wherein said determining whether said service testing request meets a predetermined condition for performing Mock testing comprises:
acquiring verification information corresponding to the service identification information, wherein the verification information is prestored in the Mock test configuration database;
judging whether the service identification information is consistent with the verification information;
if the service identification information is inconsistent with the verification information, the service test request conforms to the preset condition for performing the Mock test;
and if the service identification information is consistent with the verification information, the service test request does not accord with the preset condition for performing the Mock test.
6. The Mock test method according to claim 1, wherein said method further comprises:
receiving a configuration parameter deleting request of the testing end, wherein the testing deleting request comprises service identification information;
determining configuration parameters associated with the service identification information in the Mock test configuration database;
and deleting the configuration parameters.
7. A Mock test device, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a service test request sent by a test end, and the service test request comprises service identification information of a service requested to be called by the test end;
a determining unit, configured to determine, from a Mock test configuration database, configuration parameters of a target service associated with the service identification information, where the configuration parameters include a test item to be tested by the target service and a test result corresponding to the test item;
the test unit is used for determining a test method corresponding to the test item, calling the test method to perform Mock test on the test item, and obtaining a test result corresponding to the test item;
and the return unit is used for returning the test result to the test end.
8. A Mock test device, comprising:
the system comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;
the memory is a transient memory or a persistent memory;
the central processor is configured to communicate with the memory, and the instructions in the memory are executed on the Mock test device to perform the method of any of claims 1-6.
9. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-6.
10. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-6.
CN202110143431.3A 2021-02-02 2021-02-02 Mock testing method and related equipment Pending CN114840407A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110143431.3A CN114840407A (en) 2021-02-02 2021-02-02 Mock testing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110143431.3A CN114840407A (en) 2021-02-02 2021-02-02 Mock testing method and related equipment

Publications (1)

Publication Number Publication Date
CN114840407A true CN114840407A (en) 2022-08-02

Family

ID=82561109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110143431.3A Pending CN114840407A (en) 2021-02-02 2021-02-02 Mock testing method and related equipment

Country Status (1)

Country Link
CN (1) CN114840407A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166569A (en) * 2023-04-26 2023-05-26 深圳市和讯华谷信息技术有限公司 Mock testing method and related equipment thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166569A (en) * 2023-04-26 2023-05-26 深圳市和讯华谷信息技术有限公司 Mock testing method and related equipment thereof

Similar Documents

Publication Publication Date Title
CN109558320B (en) System testing method, device, system, equipment and computer readable storage medium
CN111209060A (en) Capability development platform processing method and device
CN112134961B (en) Client use control method, client and computer storage medium
CN109246280B (en) Address book cloud processing method and device, computer equipment and readable storage medium
CN114840407A (en) Mock testing method and related equipment
CN109873731B (en) Test method, device and system
CN107092556B (en) Test method, device and equipment
CN108647139B (en) System test method, device, storage medium and electronic device
CN112905457B (en) Software testing method and device
CN112241357A (en) Method, device, equipment and computer readable medium for gray scale test
CN114285779A (en) Method, device and system for processing test request
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
CN109246324B (en) Method, device and equipment for monitoring and processing customer service quality and mobile terminal
CN110858201B (en) Data processing method and system, processor and storage medium
CN113343110A (en) Method for realizing electronic book recommendation based on release information, electronic equipment and storage medium
CN108882229B (en) Information processing method and device
CN111767178A (en) Physical machine performance testing method and device
CN112381481A (en) Product available inventory management method, device, computer equipment and storage medium
CN112214532A (en) Service data auditing method and related device
CN111400260A (en) File display method, display device, terminal device and readable storage medium
CN117435510B (en) Automatic test method, terminal equipment and computer readable storage medium
CN112732362B (en) Method and device for accessing nationwide software resources, electronic equipment and storage medium
CN111010692B (en) Method, device, storage medium and terminal for customizing STK (SIM tool kit) identification
CN117194253B (en) Method and system for generating test data of service scene
CN113434215A (en) Information loading method and device, storage medium and processor

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