CN110609786A - Software testing method and device, computer equipment and storage medium - Google Patents

Software testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110609786A
CN110609786A CN201910759762.2A CN201910759762A CN110609786A CN 110609786 A CN110609786 A CN 110609786A CN 201910759762 A CN201910759762 A CN 201910759762A CN 110609786 A CN110609786 A CN 110609786A
Authority
CN
China
Prior art keywords
simulation
interface
node
simulation node
result data
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
CN201910759762.2A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910759762.2A priority Critical patent/CN110609786A/en
Publication of CN110609786A publication Critical patent/CN110609786A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface
    • 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
    • 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/3692Test management for test results analysis

Abstract

The invention discloses a software testing method, a device, computer equipment and a storage medium, belonging to the technical field of testing process improvement, wherein the software testing method comprises the following steps: sending an interface calling request to a simulation node of a simulation server, wherein the interface calling request comprises an interface document of the external interface to be called, so that the simulation node converts target test data into result data according to the interface document; receiving information that the simulation node completes interface simulation; sending target test data to the simulation node; result data of the simulation node is received. Therefore, under the condition that the system is abnormal or the external test system cannot be contacted, the result data can be obtained through the simulation interface, particularly for very complex external scenes, such as scenes that the result data can be obtained only by walking different processes of different systems, a virtual interface can be directly simulated through the interface document, and the result data can be directly obtained.

Description

Software testing method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of test flow improvement, in particular to a software test method, a software test device, computer equipment and a storage medium.
Background
With the increasing complexity of software systems, developers need to test developed modules or units during or after development, find errors and repair the errors in time, and ensure the correctness and stability of developed programs.
At present, the realization of a part of scenes needs to be connected with an external system and call an interface of the external system to complete the test. In practical application, if a problem occurs in an interface or an environment of an external system, or data of the external system may be abnormal, or abnormal situations such as data loss occur in a calling process, under the condition that the data of the external system called by the interface is unstable, when a next-level service module is tested based on the called data, a test result of the next-level service module is often greatly affected, and the obtained test result of the next-level service module cannot truly reflect the performance of the next-level service module, so that the test result is inaccurate.
Disclosure of Invention
Based on the above, the invention provides a software testing method, a software testing device, computer equipment and a storage medium, which are used for solving the technical problem that the external system fails to test in the related art.
In a first aspect, a software testing method is provided, including:
sending an interface calling request to a simulation node of a simulation server, wherein the interface calling request comprises an interface document of an external interface to be called, so that the simulation node can carry out interface simulation according to the interface document and convert target test data into result data;
receiving information that the simulation node completes interface simulation;
sending target test data to the simulation node;
receiving result data returned by the simulation node;
and testing according to the result data returned by the simulation node, and generating a test result.
In one embodiment, the information that the simulation node completes the interface simulation includes a result of the interface simulation, and the specific step of sending the target test data to the simulation node includes:
analyzing the result of the interface simulation, and judging whether the interface simulation is successful;
and if the interface simulation is successful, sending target test data to the simulation node.
In one embodiment, the simulation node includes verification result data in which verification test data has been associated with verification test data, and the specific step of sending target test data to the simulation node includes:
sending verification test data to the simulation node;
receiving interface result data returned by the simulation node;
comparing the interface result data returned by the simulation node with the verification result data associated with the verification test data, and determining whether the interface result data returned by the simulation node is matched with the verification result data associated with the verification test data;
and if the interface result data returned by the simulation node is matched with the verification result data associated with the verification test data, sending target test data to the simulation node.
After receiving the result data returned by the simulation node, the method further comprises:
analyzing the result of the interface simulation, and judging whether the interface simulation is successful;
and if the interface simulation is successful, sending target test data to the simulation node.
In one embodiment, the simulation server has a plurality of simulation nodes; before the interface call request is sent to a simulation node of a simulation server, the method further comprises the following steps;
querying workloads of a plurality of simulation nodes of the simulation server;
and selecting the simulation node with the minimum workload as the simulation node according to the workloads of the plurality of simulation nodes.
In one embodiment, the simulation server has a plurality of simulation nodes; before the sending the interface call request to the simulation node of the simulation server, the method further includes:
querying workloads of a plurality of simulation nodes of the simulation server;
and randomly selecting one simulation node from the simulation nodes with the workload less than the preset threshold value as the simulation node.
In one embodiment, the sending the interface call request to the simulation node of the simulation server includes:
establishing a simulation server;
and sending an interface calling request to a simulation node of the simulation server, wherein the interface calling request comprises an interface document of the external interface to be called, so that the simulation server can simulate the external interface to be called according to the interface document and convert target test data into result data through the simulated interface.
In a second aspect, a software testing apparatus is provided, including:
the system comprises a calling request unit, a simulation server and a test data processing unit, wherein the calling request unit is used for sending an interface calling request to a simulation node of the simulation server, and the interface calling request comprises an interface document of an external interface to be called so that the simulation node can carry out interface simulation according to the interface document and convert target test data into result data;
the information receiving unit is used for receiving the information that the simulation node completes interface simulation;
the data sending unit is used for sending target test data to the simulation node;
and the result receiving unit is used for receiving the result data returned by the simulation node.
In a third aspect, a computer device is provided, comprising a memory and a processor, wherein the memory has stored therein computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of the software testing method described above.
In a fourth aspect, a storage medium is provided that stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the software testing method described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the software testing method, the software testing device, the computer equipment and the storage medium, the interface of the simulation server is called under the condition that an external system is abnormal, the interface needing to obtain data is simulated according to the interface document, the test data is sent to the data interface, and the needed test parameters are obtained so as to carry out subsequent testing. The interface document comprises an information simulation server which establishes an interface to be simulated and can simulate the required interface according to the interface document to convert target test data into result data. Therefore, under the condition that the system is abnormal or the external test system cannot be contacted, the result data can be obtained through the simulation interface, particularly for very complex external scenes, such as scenes that the result data can be obtained only by walking different processes of different systems, a virtual interface can be directly simulated through the interface document, and the result data can be directly obtained.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
FIG. 1 is a diagram of an implementation environment for a software testing method provided in one embodiment.
FIG. 2 is a flow chart illustrating a method of software testing according to an exemplary embodiment.
Fig. 3 is a flow chart of another software testing method according to the corresponding embodiment of fig. 2.
Fig. 4 is a flow chart of another software testing method according to the corresponding embodiment of fig. 2.
Fig. 5 is a flow chart of another software testing method according to the corresponding embodiment of fig. 2.
Fig. 6 is a flowchart illustrating a specific implementation of step S130 in the software testing method according to the corresponding embodiment of fig. 2.
Fig. 7 is a flow chart of another software testing method according to the corresponding embodiment of fig. 2.
Fig. 8 is a flowchart illustrating a specific implementation of step S150 in the software testing method according to the corresponding embodiment of fig. 2.
Fig. 9 is a flowchart illustrating a specific implementation of step S150 in the software testing method according to the corresponding embodiment of fig. 2.
FIG. 10 is a block diagram illustrating a software testing device according to an exemplary embodiment.
Fig. 11 schematically shows an example block diagram of an electronic device for implementing the software testing method described above.
Fig. 12 schematically illustrates a computer-readable storage medium for implementing the software testing method described above.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention 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 invention and are not intended to limit the invention.
Fig. 1 is a diagram of an implementation environment of a software testing method provided in an embodiment, as shown in fig. 1, in the implementation environment, a testing device 100 and a simulation server 400 are included.
The test apparatus 100 is an apparatus for performing a test, and is, for example, a computer apparatus such as a computer and a server used by a system tester. The simulation server 400 is a server that performs interface simulation during a test, and has a plurality of simulation nodes. When an external system fails, the test equipment 100 sends an interface calling request to the simulation server 400, the simulation server 400 performs interface simulation according to an interface document contained in the interface calling request, after the interface simulation is completed, simulation completed information is sent to the test equipment 100, after the test equipment 100 receives the simulation completed information, target test data is sent to the simulation server 400, the simulation server 400 performs data processing through a simulated interface, then processed result data is sent to the test equipment 100, and after the test equipment 100 receives the result data, subsequent test steps can be performed.
It should be noted that the test apparatus 100 and the simulation server 400 may be, but are not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like. The test device 100 and the simulation server 400 may be connected via bluetooth, USB (Universal Serial Bus), or other communication connection methods, which is not limited herein.
As shown in fig. 2, in an embodiment, a software testing method is provided, which can be applied to the testing apparatus 100 described above, and specifically includes the following steps:
step S130, sending an interface calling request to a simulation node of a simulation server, wherein the interface calling request comprises an interface document of an external interface to be called, so that the simulation node can carry out interface simulation according to the interface document and convert target test data into result data;
under the condition of an abnormal external system, firstly, calling an interface of a simulation server, simulating an interface needing to obtain data according to an interface document, wherein the interface document comprises an information simulation server for establishing the interface needing to be simulated, and the information simulation server can simulate the required interface according to the interface document to convert target test data into result data.
Step S140, receiving information that the simulation node completes interface simulation;
after the interface simulation is completed, the simulation server 400 sends information that the simulation node completes the interface simulation, and the test device 100 receives the information and then sends target test data to the simulation server 400. This is because, before the interface simulation is completed, if the target test data is sent to the simulation server 400, the data processing is not performed, and the memory of the simulation server 400 is occupied, so the present invention simulates the interface to be called first, and after the interface simulation is completed, the target test data is sent to the simulation server 400 to process the data.
Step S150, sending target test data to the simulation node;
after receiving the information that the simulation node completes the interface simulation, the test device 100 may send target test data to the simulation server 400. After receiving the target test data, the simulation server 400 performs data processing using a simulated interface, and converts the target test data into result data.
And step S160, receiving result data returned by the simulation node.
After obtaining the result data, the simulation server 400 sends the result data to the testing device 100, and after receiving the result data, the testing device 100 can perform the subsequent testing.
Therefore, under the condition that the system is abnormal or the external test system cannot be contacted, the result data can be obtained through the simulation interface, particularly for very complex external scenes, such as scenes that the result data can be obtained only by walking different processes of different systems, a virtual interface can be directly simulated through the interface document, and the result data can be directly obtained.
For example, in one embodiment, after target test data is input into the server a, the server a processes the target test data and outputs the processed target test data to the server B, the server B processes the target test data and outputs the processed target test data to the system C, and then a result data is obtained after the processed target test data passes through a plurality of systems and servers. For such a complex scene, it is undoubtedly difficult to simulate all the flows, and if the scheme is used, the simulation process can be simplified, an interface is simulated directly according to the interface document, then the target test data is input into the interface, and the interface directly returns a result data, thereby greatly simplifying the simulation content and difficulty.
Fig. 3 shows that, in one embodiment, after step S160 in the corresponding embodiment of fig. 2, the software testing method may further include the following steps:
and S170, testing according to the result data returned by the simulation node, and generating a test result.
In one embodiment, after the test apparatus 100 obtains the result data, the result data may be further processed, and the test step is continuously performed to generate the test result, so that the relevant tester can perform debugging according to the test result, and thus, time and labor are not required to perform basic debugging in the joint debugging stage.
Fig. 4 shows that in an embodiment, the simulation server has a plurality of simulation nodes, and before step S130 in the corresponding embodiment of fig. 2, the software testing method may further include the following steps:
step S101, inquiring the working loads of a plurality of simulation nodes of the simulation server;
in the process of executing the test, the condition that a plurality of external system interface data are needed occurs, and a plurality of interfaces need to be simulated at this time. When the judgment is performed according to the load of the simulation node of the simulation server, the workload of each simulation node needs to be inquired first.
In one embodiment, the querying the workload of the simulation nodes of the simulation server is sequentially querying each simulation node of the simulation server, and in another embodiment, the querying the workload of the simulation nodes of the simulation server is respectively querying simultaneously.
And step S110, selecting the simulation node with the minimum workload as the simulation node according to the workloads of the plurality of simulation nodes.
After the workload of each simulation node is obtained, the simulation node with the smallest workload is selected for simulation, so that the processing load of the simulation server is balanced, and the test efficiency is improved. Wherein the workload includes processor utilization, occupied storage capacity, residual storage capacity and the like of the simulation node.
In one embodiment, the workload is processor utilization, the testing apparatus 100 first queries the simulation nodes of the simulation server 400 that the processor utilization is 20%, 30%, and 50%, respectively, and selects the simulation node with the processor utilization of 20% as the simulation node.
Fig. 5 shows that in an embodiment, the simulation server has a plurality of simulation nodes, and before step S130 in the corresponding embodiment of fig. 2, the software testing method may further include the following steps:
step S101, inquiring the working loads of a plurality of simulation nodes of the simulation server;
and step S120, randomly selecting one simulation node from the simulation nodes with the workload smaller than the preset threshold value as the simulation node.
If the simulation node with the minimum working load is directly selected for simulation, the processing pressure of a single simulation node is easily increased instantly, the operation of the simulation node is not facilitated, and the simulation node is easily broken instantly.
The predetermined threshold may be set according to specific situations, and the present invention is not limited herein. For example, if the workload is processor usage, the predetermined threshold may be 23%, 37%, 71%, 83%, etc., and if the workload is storage capacity, the predetermined threshold may be 128MB, 2048MB, 8192MB, etc.
In one embodiment, the workload includes processor usage and occupied storage, the predetermined threshold is a weighted average of the processor usage and occupied storage, and is set to 25, the testing apparatus 100 first queries each simulation node of the simulation server 400 that the processor usage is 20%, 30%, 50%, and the occupied storage capacity percentage is 17%, 13%, 11%, respectively, then converts the first score representing the processor usage of each simulation node to 20, 30, and 50, respectively, and the second score representing the occupied storage capacity of each simulation node to 17, 13, and 11, respectively, and then sets the weight of the first score to 0.6, the weight of the second score to 0.4, and the weighted average of the simulation nodes is 18.8, 23.2, and 34.4, wherein the simulation nodes smaller than the predetermined threshold are simulation nodes with weighted average of 18.8 and 23.2, then, one of the two analog nodes is randomly selected as the analog node of the analog interface.
Optionally, in an embodiment shown in fig. 4 or fig. 5, the workload includes at least one of processor utilization, committed memory of the simulation node.
Optionally, fig. 6 is a detailed description of step S130 in the software testing method according to the corresponding embodiment shown in fig. 2, where in the software testing method, step S130 may include the following steps:
step S131, establishing a simulation server;
step S132, sending an interface calling request to a simulation node of the simulation server, wherein the interface calling request comprises an interface document of an external interface to be called, so that the simulation server can simulate the external interface to be called according to the interface document and convert target test data into result data through the simulated interface.
In this embodiment, when simulation result data of a simulation project is utilized, a server is newly built, the server is configured to receive an interface call request, simulate an external interface to be called according to the interface call request, and then convert target test data into result data by using the external interface.
In one embodiment, when sending an interface call request to a simulation node of a simulation server, the simulation server is established and then sends the interface call request to the simulation node of the simulation server, and after receiving the call request, the simulation server simulates an interface to be called according to an interface document in the call request. And after the test is finished, the server and the interface are all cancelled, and when the next test is carried out, the simulation is carried out on the newly-built server. Therefore, the utilization rate of the server can be improved, the resources occupied by the server are reduced, and the maximization of resource utilization is realized.
Fig. 7 shows that, in one embodiment, after step S170 in the corresponding embodiment of fig. 3, the software testing method may further include the following steps:
step S180, positioning an abnormal environment according to the test result;
and step S190, debugging the abnormal environment and correcting the abnormal environment.
In the development stage, if a plurality of systems need to work cooperatively, joint debugging is needed, and generally, joint debugging is performed after all the systems are developed and independently tested. At this time, because only the test is carried out independently, the parts which need to be jointly debugged are not involved, so that errors can occur in the scenes with simpler parts or bases in the joint debugging stage, and thus, too many places need to be debugged, and the development progress and the development efficiency are seriously influenced. Therefore, the preferred scheme utilizes the simulation server to simulate the interfaces of the external systems which need to be debugged together, carries out joint debugging self-test in an independent test stage, and then corrects a more basic or simple abnormal environment according to the results of the joint debugging self-test, so that the progress of the joint debugging stage is greatly accelerated, and the efficiency of development and test is improved.
In one embodiment, the development of the H5(HTML5) system and the SS interface is involved, and the H5 system and the SS interface are independently developed respectively. After independently developing the H5 system and the SS interface, the H5 system and the SS system need to be independently debugged and then jointly debugged. Taking the independent debugging stage of the H5 system as an example, in the independent debugging stage, since no SS interface is added, once all the related debugging that can be performed only by the return parameter of the SS interface cannot be performed, the debugging can only be performed in the joint debugging stage, and at this time, a problem that part of basic functions cannot be implemented and need to be modified occurs in the joint debugging stage. If the scheme is used for simulating the SS interface, the simulated SS interface returns parameters for testing, so that the basic functions of H5 can be realized in the self-testing stage, and thus, in the joint debugging stage, much effort can be provided for testing the communication interaction between H5 and the SS.
Optionally, fig. 8 is a detailed description of step S150 in the software testing method shown according to the corresponding embodiment of fig. 2, in the software testing method, information that the simulation node completes interface simulation includes a result of the interface simulation, and step S150 may include the following steps:
step S151, analyzing the result of the interface simulation, and judging whether the interface simulation is successful;
step S152, if the interface simulation is successful, target test data is sent to the simulation node.
In the process of performing interface simulation by the simulation node, the success rate of the simulation is not one hundred percent, and at this time, it is further required to verify whether the interface simulation is successful or not, in this embodiment, when the simulation node returns information that the interface simulation is completed, a result of the interface simulation is attached to the information that the interface simulation is completed, in one embodiment, the result of the interface simulation is whether the interface simulation is successful or not, at this time, if the result of the interface simulation is that the interface simulation is successful, target test data is sent to the simulation node, a subsequent test step is performed, and if the result of the interface simulation is that the interface simulation is failed, the interface is re-simulated, and alarm information is sent.
In another embodiment, a simulation interface result value may be returned, and at this time, the simulation interface result value is analyzed to determine whether the simulation interface result value is within a preset simulation interface result value threshold, if so, target test data is sent to the simulation node to perform subsequent test steps, and if not, the interface is re-simulated, and alarm information is sent.
Optionally, fig. 9 is a detailed description of step S150 in the software testing method shown according to the corresponding embodiment of fig. 2, in the software testing method, the simulation node includes verification result data in which verification test data is associated with verification test data, and step S150 may include the following steps:
step S155, sending verification test data to the simulation node;
step S156, receiving interface result data returned by the simulation node;
step S157, comparing the interface result data returned by the simulation node with the verification result data associated with the verification test data, and determining whether the interface result data returned by the simulation node is matched with the verification result data associated with the verification test data;
step S158, if the interface result data returned by the simulation node matches the verification result data associated with the verification test data, sending the target test data to the simulation node.
In this embodiment, whether the simulation of the verification interface is successful may also pass verification test data and verification result data associated with the verification test data, and the specific method is as follows:
after receiving the information that the simulation node completes interface simulation, firstly sending verification test data to the simulation node, enabling the simulation node to return interface result data after data processing is carried out on the simulation node through a just-simulated interface, then comparing the interface result data with the verification result data, if the data are matched, sending target test data to the simulation node, carrying out subsequent test steps, and if the data are not matched, re-simulating the interface and sending alarm information.
In one embodiment, if the verification result data is a fixed value, the data match is that the interface result data and the verification result data are the same, and in another embodiment, if the verification result data is a threshold, the data match is that the interface result data is within the threshold of the verification result data.
As shown in fig. 10, in an embodiment, a software testing apparatus is provided, which may be integrated in the testing device 100, and specifically may include a call request unit 110, an information receiving unit 120, a data sending unit 130, and a result receiving unit 140.
The call request unit 110 is configured to send an interface call request to a simulation node of the simulation server, where the interface call request includes an interface document of an external interface to be called, so that the simulation node performs interface simulation according to the interface document and converts target test data into result data;
an information receiving unit 120, configured to receive information that the simulation node completes interface simulation;
a data sending unit 130, configured to send target test data to the simulation node;
and the result receiving unit 140 is configured to receive result data returned by the simulation node.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above software testing method, and is not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to this embodiment of the invention is described below with reference to fig. 11. The electronic device 500 shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 11, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, and a bus 530 that couples various system components including the memory unit 520 and the processing unit 510.
Wherein the storage unit stores program code that is executable by the processing unit 510 to cause the processing unit 510 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 510 may execute step S130 shown in fig. 2, and send an interface call request to a simulation node of a simulation server, where the interface call request includes an interface document of the external interface to be called, so that the simulation node converts target test data into result data according to the interface document; step S140, receiving information that the simulation node completes interface simulation; step S150, sending target test data to a simulation node; step S160, receiving result data of the simulation node.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
Storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. As shown, the network adapter 560 communicates with the other modules of the electronic device 500 over the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 12, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for testing software, the method comprising:
sending an interface calling request to a simulation node of a simulation server, wherein the interface calling request comprises an interface document of an external interface to be called, so that the simulation node can carry out interface simulation according to the interface document and convert target test data into result data;
receiving information that the simulation node completes interface simulation;
sending target test data to the simulation node;
receiving result data returned by the simulation node;
and testing according to the result data returned by the simulation node, and generating a test result.
2. The method of claim 1, wherein the information that the simulation node completes the interface simulation includes a result of the interface simulation, and the step of sending the target test data to the simulation node includes:
analyzing the result of the interface simulation, and judging whether the interface simulation is successful;
and if the interface simulation is successful, sending target test data to the simulation node.
3. The method of claim 1, wherein the simulation node includes verification result data that verification test data has been associated with verification test data, and the step of sending the target test data to the simulation node comprises:
sending verification test data to the simulation node;
receiving interface result data returned by the simulation node;
comparing the interface result data returned by the simulation node with the verification result data associated with the verification test data, and determining whether the interface result data returned by the simulation node is matched with the verification result data associated with the verification test data;
and if the interface result data returned by the simulation node is matched with the verification result data associated with the verification test data, sending target test data to the simulation node.
4. The method of claim 1, wherein the simulation server has a plurality of simulation nodes, and wherein the method further comprises, prior to sending the interface call request to the simulation node of the simulation server;
querying workloads of a plurality of simulation nodes of the simulation server;
and selecting the simulation node with the minimum workload as the simulation node according to the workloads of the plurality of simulation nodes.
5. The method of claim 1, wherein the simulation server has a plurality of simulation nodes; before the sending the interface call request to the simulation node of the simulation server, the method further includes:
querying workloads of a plurality of simulation nodes of the simulation server;
and randomly selecting one simulation node from the simulation nodes with the workload less than the preset threshold value as the simulation node.
6. A method according to claim 4 or 5, wherein the workload comprises processor usage and/or committed memory of the simulation node.
7. The method of claim 1, wherein sending the interface call request to a simulation node of a simulation server comprises:
establishing a simulation server;
and sending an interface calling request to a simulation node of the simulation server, wherein the interface calling request comprises an interface document of the external interface to be called, so that the simulation server can simulate the external interface to be called according to the interface document and convert target test data into result data through the simulated interface.
8. An interface simulation-based test apparatus, the apparatus comprising:
the system comprises a calling request unit, a simulation server and a test data processing unit, wherein the calling request unit is used for sending an interface calling request to a simulation node of the simulation server, and the interface calling request comprises an interface document of an external interface to be called so that the simulation node can carry out interface simulation according to the interface document and convert target test data into result data;
the information receiving unit is used for receiving the information that the simulation node completes interface simulation;
the data sending unit is used for sending target test data to the simulation node;
and the result receiving unit is used for receiving the result data returned by the simulation node.
9. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 7.
10. A storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the method of any one of claims 1-7.
CN201910759762.2A 2019-08-16 2019-08-16 Software testing method and device, computer equipment and storage medium Pending CN110609786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910759762.2A CN110609786A (en) 2019-08-16 2019-08-16 Software testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910759762.2A CN110609786A (en) 2019-08-16 2019-08-16 Software testing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110609786A true CN110609786A (en) 2019-12-24

Family

ID=68890521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910759762.2A Pending CN110609786A (en) 2019-08-16 2019-08-16 Software testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110609786A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274157A (en) * 2020-02-27 2020-06-12 平安医疗健康管理股份有限公司 Test data simulation method and device, computer equipment and storage medium
CN112685319A (en) * 2021-01-07 2021-04-20 北京全路通信信号研究设计院集团有限公司 Automatic testing method, device, medium, electronic equipment and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140282436A1 (en) * 2013-03-14 2014-09-18 International Business Machines Corporation Testing a software interface for a streaming hardware device
CN109726098A (en) * 2018-03-16 2019-05-07 平安科技(深圳)有限公司 Interface test method, device and computer readable storage medium
WO2019134306A1 (en) * 2018-01-02 2019-07-11 武汉斗鱼网络科技有限公司 Message processing method, device, terminal apparatus, and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140282436A1 (en) * 2013-03-14 2014-09-18 International Business Machines Corporation Testing a software interface for a streaming hardware device
WO2019134306A1 (en) * 2018-01-02 2019-07-11 武汉斗鱼网络科技有限公司 Message processing method, device, terminal apparatus, and readable storage medium
CN109726098A (en) * 2018-03-16 2019-05-07 平安科技(深圳)有限公司 Interface test method, device and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274157A (en) * 2020-02-27 2020-06-12 平安医疗健康管理股份有限公司 Test data simulation method and device, computer equipment and storage medium
CN112685319A (en) * 2021-01-07 2021-04-20 北京全路通信信号研究设计院集团有限公司 Automatic testing method, device, medium, electronic equipment and system

Similar Documents

Publication Publication Date Title
US10671516B2 (en) Method, device, and computer program product for testing code
CN110532185B (en) Test method, test device, electronic equipment and computer readable storage medium
CN111309343B (en) Development deployment method and device
CN110674047B (en) Software testing method and device and electronic equipment
CN110058920B (en) Virtual machine performance detection method and device, electronic equipment and storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN109901985B (en) Distributed test apparatus and method, storage medium, and electronic device
CN110806970A (en) Client test method and device based on simulation server response and electronic equipment
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN110609786A (en) Software testing method and device, computer equipment and storage medium
CN112148594A (en) Script testing method and device, electronic equipment and storage medium
CN112988578A (en) Automatic testing method and device
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN112988588A (en) Client software debugging method and device, storage medium and electronic equipment
CN112559335A (en) Test method, device, equipment and storage medium
CN112306857A (en) Method and apparatus for testing applications
CN112416746A (en) Test case generation method, device, equipment and medium
CN112416747A (en) Test case execution method, device, equipment and medium
CN115328891A (en) Data migration method and device, storage medium and electronic equipment
CN114741294A (en) Page debugging method, device, equipment and storage medium
CN115052037A (en) Client detection method, device, storage medium and equipment
CN110737900B (en) Webpage function testing method and device, server and computer readable storage medium
CN110674491B (en) Method and device for real-time evidence obtaining of android application and electronic equipment
CN110968519A (en) Game testing method, device, server and storage medium
CN112799956B (en) Asset identification capability test method, device and system device

Legal Events

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