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

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

Info

Publication number
CN110609786B
CN110609786B CN201910759762.2A CN201910759762A CN110609786B CN 110609786 B CN110609786 B CN 110609786B CN 201910759762 A CN201910759762 A CN 201910759762A CN 110609786 B CN110609786 B CN 110609786B
Authority
CN
China
Prior art keywords
simulation
interface
node
result data
server
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.)
Active
Application number
CN201910759762.2A
Other languages
Chinese (zh)
Other versions
CN110609786A (en
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/CN110609786B/en
Publication of CN110609786A publication Critical patent/CN110609786A/en
Application granted granted Critical
Publication of CN110609786B publication Critical patent/CN110609786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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 invention discloses a software testing method, a device, computer equipment and a storage medium, belonging to the technical field of testing flow 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 of the simulation node for completing interface simulation; transmitting target test data to the simulation node; result data of the analog node is received. In this way, under the condition that the system is abnormal or other external test systems can not be contacted, the result data can be obtained through the simulation interface, and especially for very complex external scenes, for example, the scene that the result data can be obtained only by running different processes of different systems, a virtual interface can be directly simulated through an interface document, and the result data can be directly obtained.

Description

Software testing method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of test flow improvement technologies, and in particular, to a software testing method, a software testing device, a computer device, and a storage medium.
Background
With the increasing complexity of software systems, developers need to test developed modules or units in the development process or after the development is completed, discover errors in time and repair the errors in time, so that the correctness and stability of a developed program are ensured.
At present, the realization of part of scenes needs to be connected with an external system, and an interface of the external system is called to finish the test. In practical application, if an interface or an environment of an external system has a problem, or the data of the external system may have an abnormality, or the data of the external system is lost in the calling process, when the data of the external system called by the interface is unstable, the test result of the next-stage service module is often greatly affected when the next-stage service module is tested based on the called data, and the obtained test result of the next-stage service module cannot truly reflect the performance of the next-stage service module, so that the test result is inaccurate.
Disclosure of Invention
Based on the above, in order to solve the technical problem that the test cannot be performed due to the failure of an external system in the related art, the invention provides a software test method, a software test device, computer equipment and a storage medium.
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 performs interface simulation according to the interface document and converts target test data into result data;
receiving information of the simulation node for completing interface simulation;
transmitting 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 of the simulation node completing 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 interface simulation result to judge whether the interface simulation is successful or not;
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 that verification test data has been associated with verification test data, and the specific step of sending the target test data to the simulation node includes:
Transmitting 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 verification result data associated with 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 analog node, the method further includes:
Analyzing the interface simulation result to judge whether the interface simulation is successful or not;
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 the simulation node of the simulation server, the method further comprises the steps of;
Querying the workload of a plurality of simulation nodes of the simulation server;
and selecting the simulation node with the minimum working load as the simulation node according to the working loads of the plurality of simulation nodes.
In one embodiment, the simulation server has a plurality of simulation nodes; before sending the interface call request to the simulation node of the simulation server, the method further comprises:
Querying the workload of a plurality of simulation nodes of the simulation server;
and randomly selecting one simulation node from simulation nodes with the workload smaller than a preset threshold 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 an external interface to be called, so that the simulation server simulates the external interface to be called according to the interface document, and converting target test data into result data through the simulated interface.
In a second aspect, there is provided a software testing apparatus comprising:
The interface calling request comprises 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;
the information receiving unit is used for receiving the information that the simulation node completes interface simulation;
The data transmitting unit is used for transmitting target test data to the simulation node;
and the result receiving unit is used for receiving result data returned by the analog node.
In a third aspect, a computer device is provided, comprising a memory and a processor, the memory having 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, there is provided a storage medium storing 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 comprise the following beneficial effects:
according to the software testing method, the 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 which needs to obtain data is simulated according to the interface document, and the testing data is sent to the data interface to obtain the needed testing parameters so as to carry out subsequent testing. The interface file comprises an information simulation server for establishing an interface to be simulated, and the required interface can be simulated according to the interface file to convert target test data into result data. In this way, under the condition that the system is abnormal or other external test systems can not be contacted, the result data can be obtained through the simulation interface, and especially for very complex external scenes, for example, the scene that the result data can be obtained only by running different processes of different systems, a virtual interface can be directly simulated through an 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 of 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 of a specific implementation of step S150 in the software testing method according to the corresponding embodiment of fig. 2.
Fig. 9 is a flowchart of 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 apparatus 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 shows a computer readable storage medium for implementing the software testing method described above.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Fig. 1 is a diagram of an implementation environment of a software testing method provided in one embodiment, as shown in fig. 1, in which a testing apparatus 100 and a simulation server 400 are included.
The test apparatus 100 is an apparatus for performing a test, for example, a computer apparatus such as a computer, a server, or the like used by a system tester. The simulation server 400 is a server that performs interface simulation during the test, and has a plurality of simulation nodes. When the external system fails, the test device 100 sends an interface call request to the simulation server 400, the simulation server 400 performs interface simulation according to an interface document included in the interface call request, after the interface simulation is completed, sends simulation completion information to the test device 100, after the test device 100 receives the simulation completion information, sends target test data to the simulation server 400, the simulation server 400 performs data processing through a simulated interface, and then sends the processed result data to the test device 100, and the test device 100 can perform subsequent test steps after receiving the result data.
It should be noted that, the test apparatus 100 and the simulation server 400 may be, but not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like. The test device 100 and the analog server 400 may be connected via bluetooth, USB (Universal Serial Bus ) or other communication connection, which is not limited herein.
As shown in fig. 2, in one embodiment, a software testing method is provided, and the software testing method may be applied to the testing device 100, and specifically may include the following steps:
Step S130, an interface calling request is sent 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 performs interface simulation according to the interface document and converts target test data into result data;
Under the condition of abnormal external system, firstly, calling an interface of a simulation server, and simulating an interface required to obtain data according to an interface document, wherein the interface document comprises an information simulation server for establishing the interface required to be simulated, and the information simulation server can simulate the required interface according to the interface document so as to convert target test data into result data.
Step S140, receiving information of the simulation node for completing interface simulation;
After the interface simulation is completed, the simulation server 400 sends a message that the simulation node completes the interface simulation, and the test device 100 sends the target test data to the simulation server 400 after receiving the message. In this way, 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 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 for data processing.
Step S150, sending target test data to the simulation node;
after receiving the interface simulation information from the simulation node, the test apparatus 100 may send the target test data to the simulation server 400. After receiving the target test data, the simulation server 400 uses the simulated interface to perform data processing, and converts the target test data into result data.
Step S160, receiving result data returned by the analog node.
After obtaining the result data, the simulation server 400 sends the result data to the test device 100, and after the test device 100 receives the result data, the subsequent test can be performed.
In this way, under the condition that the system is abnormal or other external test systems can not be contacted, the result data can be obtained through the simulation interface, and especially for very complex external scenes, for example, the scene that the result data can be obtained only by running different processes of different systems, a virtual interface can be directly simulated through an interface document, and the result data can be directly obtained.
For example, in one embodiment, after a certain test scenario is to input the target test data into the a server, the a server processes the target test data and outputs the processed target test data to the B server, and the B server processes the processed target test data and outputs the processed target test data to the C system, and then the target test data passes through a plurality of systems and servers to finally obtain a result data. For the complex scene, if the process is to be completely simulated, the simulation process can be simplified by using the scheme, an interface is directly simulated according to the interface document, then target test data is input into the interface, and the interface directly returns result data, so that the simulation content and difficulty are greatly simplified.
FIG. 3 shows that in one embodiment, following step S160 in the corresponding embodiment of FIG. 2, the software testing method may further comprise the steps of:
And step S170, testing according to the result data returned by the simulation node, and generating a test result.
In one embodiment, after the test device 100 obtains the result data, the result data may be further processed, and the test steps may be further performed to generate a test result, so that the relevant test personnel may debug according to the test result, which may not be necessary to debug on a time-consuming and labor-consuming basis in the joint debugging stage.
Fig. 4 shows that in one embodiment, the simulation server has a plurality of simulation nodes, and the software testing method may further include the following steps before step S130 in the corresponding embodiment of fig. 2:
Step S101, inquiring the work loads of a plurality of simulation nodes of the simulation server;
In the process of executing the test, a plurality of external system interface data are needed, and a plurality of interfaces are needed to be simulated at the moment. When judging according to the load of the simulation nodes of the simulation server, the working load of each simulation node needs to be queried first.
In one embodiment, the workload of the simulation nodes of the simulation server is queried sequentially, and in another embodiment, the workload of the simulation nodes of the simulation server is queried simultaneously.
Step S110, according to the working loads of the plurality of simulation nodes, selecting the simulation node with the smallest working load as the simulation node.
After the working load of each simulation node is obtained, the simulation node with the smallest working load is selected for simulation, so that the processing load of the simulation server is balanced, and the testing efficiency is improved. Wherein the workload includes processor utilization, occupied storage capacity, remaining storage capacity, and the like of the analog node.
In one embodiment, the workload is processor utilization, and the test apparatus 100 first queries that each of the simulation nodes of the simulation server 400 has processor utilization of 20%, 30%, and 50%, and selects a simulation node with processor utilization of 20% as the simulation node.
FIG. 5 shows that in one embodiment, the simulation server has a plurality of simulation nodes, and the software testing method may further include the following steps before step S130 in the corresponding embodiment of FIG. 2:
Step S101, inquiring the work loads of a plurality of simulation nodes of the simulation server;
step S120, randomly selecting one simulation node from the simulation nodes with the workload smaller than a preset threshold 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 easy to be instantaneously increased, the operation of the simulation node is not facilitated, and the simulation node is easy to instantaneously collapse, so that any one of the simulation nodes with the working load smaller than a preset threshold can be selected for simulation, and the problem of instantaneously increasing the processing pressure of the single simulation node is avoided.
Wherein the predetermined threshold may be set according to circumstances, and the present invention is not limited herein. For example, the predetermined threshold may be 23%, 37%, 71%, 83%, etc. if the workload is processor usage, and 128MB, 2048MB, 8192MB, etc. if the workload is storage capacity.
In one embodiment, the workload includes a processor utilization and occupied storage, the predetermined threshold is a weighted average of the processor utilization and occupied storage, and is set to 25, the test apparatus 100 queries the analog server 400 that the processor utilization of each analog node is 20%, 30%, 50%, and the occupied storage capacity percentage is 17%, 13%, and 11%, respectively, converts a first score representing the processor utilization of each analog node to 20, 30, and 50, respectively, converts a second score representing the occupied storage capacity of each analog node to 17, 13, and 11, respectively, then sets the weight of the first score to 0.6, and sets the weight of the second score to 0.4, respectively, and the weighted average of each analog node to 18.8, 23.2, and 34.4, wherein the analog nodes smaller than the predetermined threshold are analog nodes whose weighted average is 18.8 and 23.2, respectively, and then randomly extracts one analog node from the two analog nodes as the analog nodes of the analog interface.
Alternatively, in one embodiment shown in fig. 4 or 5, the workload includes at least one of the occupied storage, simulating processor usage of the node.
Optionally, fig. 6 is a detailed description of step S130 in the software testing method according to the corresponding embodiment of fig. 2, where step S130 may include the following steps:
step S131, establishing a simulation server;
Step S132, an interface calling request is sent 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 simulates the external interface to be called according to the interface document, and target test data is converted into result data through the simulated interface.
In this embodiment, when using simulation engineering to simulate result data, a server is first created, and 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 an interface call request is sent to a simulation node of a simulation server, a simulation server at least comprising one simulation node is first established, then the interface call request is sent to the simulation node of the simulation server, and after the simulation server receives the call request, the simulation server simulates an interface to be called according to an interface document in the call request. After the test is finished, the server and the interface are all logged off, 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 steps of:
Step S180, positioning an abnormal environment according to the test result;
Step S190, debug the abnormal environment, correct the abnormal environment.
In the development stage, if a plurality of systems are required to work cooperatively, joint debugging is required, and in general, joint debugging is performed after each system is developed and independent test is completed. At this time, as only the single test is performed, the joint debugging is not performed on the parts to be subjected to joint debugging, so that in the joint debugging stage, the parts with simpler or basic scenes are wrong, and thus, the parts to be debugged are too many, and the development progress and development efficiency are seriously affected. Therefore, the preferred scheme utilizes the simulation server to simulate the interface of the external system which needs to be debugged together, carries out joint debugging self-test in an independent test stage, and corrects a basic or simple abnormal environment according to the result of the joint debugging self-test, so that the progress of the joint debugging stage is greatly accelerated, and the development and test efficiency is improved.
In one embodiment, the development of the H5 (HTML 5) system and the SS interface are involved, and the H5 system and the SS interface are independently developed. After the H5 system and the SS interface are independently developed, the H5 system and the SS system need to be independently debugged and then jointly debugged. Taking an independent debugging stage of the H5 system as an example, in the independent debugging stage, as no SS interface is added, once the debugging which can be performed only by the return parameters of the SS interface is involved, the debugging can only be performed in a joint debugging stage, and the problem that part of basic functions cannot be realized and needs to be modified can be caused in the joint debugging stage. If the scheme is used for simulating the SS interface, parameters are returned to test through the simulated SS interface, so that the basic functions of H5 can be realized in the self-test stage, and more efforts can be made to test communication interaction between H5 and SS in the joint debugging stage.
Optionally, fig. 8 is a detailed description of step S150 in the software testing method according to the corresponding embodiment of fig. 2, where the information for completing the interface simulation by the simulation node includes the result of the interface simulation, and step S150 may include the following steps:
Step S151, analyzing the result of the interface simulation to judge whether the interface simulation is successful;
step S152, if the interface simulation is successful, sending target test data to the simulation node.
In the process of interface simulation of the simulation node, the success rate of the simulation is not hundred percent, at this time, whether the interface simulation is successful needs to be verified, in this embodiment, when the simulation node returns the information for completing the interface simulation, the result of the interface simulation is attached to the information for completing the interface simulation, in one embodiment, the result of the interface simulation is whether the interface simulation is successful, at this time, if the result of the interface simulation is that the interface simulation is successful, the target test data is sent to the simulation node, the 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 the alarm information is sent.
In another embodiment, a simulation interface result value is returned, 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, the target test data is sent to the simulation node, a subsequent test step is performed, if not, the interface is re-simulated, and a warning message is sent.
Optionally, fig. 9 is a detailed description of step S150 in the software testing method according to the corresponding embodiment of fig. 2, where the simulation node includes verification result data that verification test data has been associated with verification test data, and step S150 may include the following steps:
Step S155, transmitting verification test data to the simulation node;
Step S156, receiving interface result data returned by the analog 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 is matched with 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 be determined by verifying the test data and the verification result data associated with the test data, which specifically includes:
After receiving the information of interface simulation completed by the simulation node, firstly sending a verification test data to the simulation node, enabling the simulation node to return an interface result data after data processing through the interface which is just simulated, 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 a subsequent test step, if the data are not matched, re-simulating the interface, and sending alarm information.
In one embodiment, the verification result data is a fixed value, and the data matching is that the interface result data is the same as the verification result data, and in another embodiment, the verification result data is a threshold value, and the data matching is that the interface result data is within the threshold value of the verification result data.
As shown in fig. 10, in one embodiment, a software testing apparatus is provided, which may be integrated in the testing device 100 described above, and may specifically include a call requesting unit 110, an information receiving unit 120, a data transmitting unit 130, and a result receiving unit 140.
A call request unit 110, configured to send an interface call request to a simulation node of a 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 transmitting unit 130, configured to transmit target test data to the analog node;
and the result receiving unit 140 is configured to receive result data returned by the analog node.
The implementation process of the functions and roles of each module in the device is specifically shown in the implementation process of the corresponding steps in the software testing method, and is not repeated here.
It should be noted that although in the above detailed description several modules or units of a 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 in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, 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 (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform 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.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to this embodiment of the present invention is described below with reference to fig. 11. The electronic device 500 shown in fig. 11 is merely an example, and should not be construed as limiting the functionality and scope of use of 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 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 connecting the 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 such that the processing unit 510 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 510 may perform 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 of the simulation node for completing interface simulation; step S150, sending target test data to the simulation node; step S160, receiving result data of the analog node.
The storage unit 520 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 5201 and/or cache memory unit 5202, and may further include Read Only Memory (ROM) 5203.
The 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 or some combination of which may include an implementation of a network environment.
Bus 530 may be one or more 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.), one or more devices that enable a user to interact with the electronic device 500, and/or any device (e.g., router, modem, etc.) that enables the electronic device 500 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 550. Also, electronic device 500 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 560. As shown, network adapter 560 communicates with other modules of electronic device 500 over bus 530. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, 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 (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 12, a program product 600 for implementing the above-described 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 thereto, and in this 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. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 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, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of 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 adaptations, 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 (7)

1. A method of software testing, the method comprising:
When an interface calling request is sent to a simulation node of a simulation server, firstly establishing a simulation server at least comprising one simulation node;
under the condition that an external system is abnormal, an interface calling request is sent 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 simulates the external interface to be called according to the interface document, and target test data are converted into result data through the simulated interface;
receiving information of the simulation node for completing interface simulation, wherein the information of the simulation node for completing interface simulation comprises a result of the interface simulation;
Analyzing the interface simulation result to judge whether the interface simulation is successful or not;
if the interface simulation is successful, sending verification test data to the simulation node, wherein the simulation node comprises verification result data which is related to the verification test data;
receiving interface result data returned by the simulation node;
Comparing the interface result data returned by the simulation node with verification result data associated with 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;
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;
Receiving result data returned by the simulation node;
testing according to the result data returned by the simulation node, and generating a test result;
After the test is finished, the simulation server and the interface are all logged off, and when the next test is carried out, the simulation server is newly built for simulation.
2. 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 the workload of a plurality of simulation nodes of the simulation server;
and selecting the simulation node with the minimum working load as the simulation node according to the working loads of the plurality of simulation nodes.
3. The method of claim 1, wherein the analog server has a plurality of analog nodes; before sending the interface call request to the simulation node of the simulation server, the method further comprises:
Querying the workload of a plurality of simulation nodes of the simulation server;
and randomly selecting one simulation node from simulation nodes with the workload smaller than a preset threshold as the simulation node.
4. A method according to claim 2 or 3, wherein the workload comprises processor usage and/or occupied storage of the emulated node.
5. A test apparatus based on interface simulation, the apparatus comprising:
The system comprises a call request unit, a simulation server and a simulation server, wherein the call request unit is used for firstly establishing a simulation server at least comprising one simulation node when sending an interface call request to the simulation node of the simulation server, and sending an interface call request to the simulation node of the simulation server under the condition that an external system is abnormal, wherein the interface call request comprises an interface document of an external interface to be called, so that the simulation server simulates the external interface to be called according to the interface document, and converts target test data into result data through the simulated interface;
The information receiving unit is used for receiving the information of the simulation node for completing interface simulation, and the information of the simulation node for completing interface simulation comprises the result of the interface simulation;
the data sending unit is used for analyzing the interface simulation result, judging whether the interface simulation is successful, sending verification test data to the simulation node if the interface simulation is successful, wherein the simulation node comprises verification result data which is related to the verification test data, receiving the interface result data returned by the simulation node, comparing the interface result data returned by the simulation node with the verification result data which is related to the verification test data, determining whether the interface result data returned by the simulation node is matched with the verification result data which is related to the verification test data, and sending target test data to the simulation node if the interface result data returned by the simulation node is matched with the verification result data which is related to the verification test data;
and the result receiving unit is used for receiving result data returned by the simulation node, logging off the simulation server and the interface after the test is finished, and newly building the simulation server for simulation when the next test is carried out.
6. 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 4.
7. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the method of any of claims 1 to 4.
CN201910759762.2A 2019-08-16 2019-08-16 Software testing method, device, computer equipment and storage medium Active CN110609786B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

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

Family

ID=68890521

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN110609786B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274157B (en) * 2020-02-27 2022-08-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
CN114116501B (en) * 2021-11-30 2024-08-23 平安银行股份有限公司 Software testing method, device, medium and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726098A (en) * 2018-03-16 2019-05-07 平安科技(深圳)有限公司 Interface test method, device and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9298592B2 (en) * 2013-03-14 2016-03-29 International Business Machines Corporation Testing a software interface for a streaming hardware device
CN108200170B (en) * 2018-01-02 2020-01-03 武汉斗鱼网络科技有限公司 Message processing method and device and readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726098A (en) * 2018-03-16 2019-05-07 平安科技(深圳)有限公司 Interface test method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN110609786A (en) 2019-12-24

Similar Documents

Publication Publication Date Title
CN110609786B (en) Software testing method, device, computer equipment and storage medium
CN111309343B (en) Development deployment method and device
CN104636254A (en) Method and device for generating test case, testing method and testing equipment
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN110806970A (en) Client test method and device based on simulation server response and electronic equipment
CN107404418B (en) Internet product testing method, device, equipment and storage medium
CN111241111B (en) Data query method and device, data comparison method and device, medium and equipment
CN111917603A (en) Client test method and device, computer equipment and storage medium
CN112732499A (en) Test method and device based on micro-service architecture and computer system
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN112306857A (en) Method and apparatus for testing applications
CN114706740A (en) Chaos experiment method, device, storage medium and equipment
CN107257290A (en) A kind of method of testing and system of open SOA Service-Oriented Architecture Baseds
CN112084102A (en) Interface pressure testing method and device
CN112988578A (en) Automatic testing method and device
CN112559335A (en) Test method, device, equipment and storage medium
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
CN112799956B (en) Asset identification capability test method, device and system device
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN115357493A (en) Test method, test device, electronic equipment and storage medium
CN115185829A (en) Business process testing method and device, terminal equipment and storage medium
CN111786842B (en) Data processing method and hardware-in-the-loop test system

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
GR01 Patent grant
GR01 Patent grant