CN110837467B - Software testing method, device and system - Google Patents

Software testing method, device and system Download PDF

Info

Publication number
CN110837467B
CN110837467B CN201911046935.2A CN201911046935A CN110837467B CN 110837467 B CN110837467 B CN 110837467B CN 201911046935 A CN201911046935 A CN 201911046935A CN 110837467 B CN110837467 B CN 110837467B
Authority
CN
China
Prior art keywords
test case
instruction
case file
operation instruction
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911046935.2A
Other languages
Chinese (zh)
Other versions
CN110837467A (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.)
Sonoscape Medical Corp
Original Assignee
Sonoscape Medical Corp
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 Sonoscape Medical Corp filed Critical Sonoscape Medical Corp
Priority to CN201911046935.2A priority Critical patent/CN110837467B/en
Publication of CN110837467A publication Critical patent/CN110837467A/en
Application granted granted Critical
Publication of CN110837467B publication Critical patent/CN110837467B/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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a software testing method, device and system, wherein the method comprises the steps of receiving a testing instruction of a user; the test instruction carries identification information of the test case file; analyzing a test case file corresponding to the identification information in the test instruction to obtain at least one operation instruction; the script language in the test case file corresponds to operation information corresponding to at least one application scene; sending the operation instruction obtained by analysis to a server; receiving a return value sent by a server; and storing the execution record information of the test case file. Because the test case file comprises the operation information which is manually required to be input in different application scenes in the prior art, the operation information can be analyzed into the operation instruction to be sent to the server, the server controls the execution of the operation instruction, and the problems existing in the software testing process are recorded by storing the execution record information, so that the automatic testing of the software is realized, and the efficiency of testing the software is improved.

Description

Software testing method, device and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a software testing method, device and system.
Background
Ultrasonic equipment is a medical instrument developed according to the ultrasonic principle and applied to the field of medical and health for diagnosing and treating diseases. Ultrasound software is a core part in ultrasound equipment, and if there is a problem in the ultrasound software, the ultrasound equipment may not be used normally in the process of diagnosing a patient. Therefore, in order to improve the operational reliability of the ultrasonic device, the ultrasonic software needs to be tested.
In the prior art, in the process of testing the ultrasonic software, a tester needs to manually select different parameters such as a probe, a diagnosis item, a mode and the like so as to test the running condition of the ultrasonic software under different test scenes. However, as the ultrasonic software has more functions and more applicable application scenes, in the process of manually selecting different application scenes to test the ultrasonic software, the operation of manual intervention is more, and the efficiency of testing the ultrasonic software is lower.
Disclosure of Invention
Based on the defects in the prior art, the application provides a software testing method, device and system, so that automatic testing of ultrasonic software is realized, and the efficiency of testing the ultrasonic software is improved.
The first aspect of the invention discloses a software testing method, which is applied to a client and comprises the following steps:
receiving a test instruction of a user; the test instruction carries identification information of a test case file;
analyzing a test case file corresponding to the identification information in the test instruction to obtain at least one operation instruction; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file;
sending the operation instruction obtained by analysis to a server;
receiving a return value sent by the server; the return value is used for indicating whether the operation instruction is successfully executed or not;
storing the execution record information of the test case file; the execution record information comprises a return value sent by the server, the execution information of the test case file and the execution information of the operation instruction obtained through analysis.
Optionally, in the software testing method, the method for creating the test case file includes:
receiving an operation record file sent by the server; the operation record file comprises operation information executed by a user in the process of performing software test;
Generating the test case file according to the operation record file; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
Optionally, in the software testing method, the sending the operation instruction obtained by analysis to the server includes:
the operation instructions obtained through analysis are sent to the server side sentence by sentence; the next sentence of operation instructions are sent after receiving a return value corresponding to the last sentence of operation instructions sent by the server side.
Optionally, in the software testing method, the test instruction of the user further carries information about the number of times of executing the test case file.
Optionally, in the software testing method, the server is configured to send the received operation instruction to a software module to be tested, so that the software module executes the received operation instruction; the software module to be tested is an ultrasonic software module; the script language in the test case file corresponds to operation information corresponding to at least one application scene under the operation of the ultrasonic software module.
Optionally, in the software testing method, the executing information of the operation instruction obtained by parsing includes: the operation instruction obtained by analysis, the execution time information of the operation instruction obtained by analysis and the execution error information of the operation instruction obtained by analysis;
the execution information of the test case file includes: the identification information of the test case file, the execution time information of the test case file and the execution times information of the test case file.
The second aspect of the invention discloses a software testing method, which is applied to a server and comprises the following steps:
receiving an operation instruction sent by a client; the operation instruction is obtained by analyzing the test case file by the client; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file;
the received operation instruction is sent to a software module to be tested, so that the software module executes the received operation instruction;
receiving a return value sent by the software module; the return value is used for indicating whether the received operation instruction is successfully executed or not;
And sending the received return value to the client.
Optionally, in the software testing method, the method for creating the test case file includes:
responding to a recording start instruction of a user, and starting to record operation information executed in the process of software testing by the user;
responding to a recording ending instruction of a user, ending recording of operation information executed in the process of carrying out software testing on the user;
transmitting the operation record file to the client; the operation record file comprises operation information recorded by the server side and executed in the process of software testing by the user; the operation record file is converted into the test case file by the client; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
Optionally, in the software testing method, before the operation instruction sent by the client is received, the method further includes:
generating and sending a test instruction to the client; the test instruction carries identification information of a test case file; and the test instruction is generated by triggering a playback function key on the user operation interface, and the identification information of the test case file is selected and determined from a plurality of test case files by triggering a case management function key on the user operation interface.
Optionally, in the software testing method, the receiving an operation instruction sent by the client includes:
receiving operation instructions sent by the client sentence by sentence; the next operating instruction is received after the server sends a return value corresponding to the last operating instruction.
Optionally, in the software testing method, the sending the received operation instruction to the software module to be tested, so that the software module executes the received operation instruction includes:
and sending the received operation instruction to the software module to be tested, so that the software module injects the received operation instruction into an event circulation mechanism, and executing the received operation instruction according to the queue sequence in the event circulation mechanism.
Optionally, in the software testing method, the software module to be tested is an ultrasonic software module;
the script language in the test case file corresponds to operation information corresponding to at least one application scene under the operation of the ultrasonic software module.
The third aspect of the present invention discloses a software testing device, applied to a client, comprising:
The first receiving unit is used for receiving a test instruction of a user; the test instruction carries identification information of a test case file;
the analyzing unit is used for analyzing the test case file corresponding to the identification information in the test instruction to obtain at least one operation instruction; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file;
the first sending unit is used for sending the operation instruction obtained by analysis to the server;
the second receiving unit is used for receiving the return value sent by the server; the return value is used for indicating whether the operation instruction is successfully executed or not;
the storage unit is used for storing the execution record information of the test case file; the execution record information comprises a return value sent by the server, the execution information of the test case file and the execution information of the operation instruction obtained through analysis.
Optionally, in the software testing device, the software testing device further includes:
the third receiving unit is used for receiving the operation record file sent by the server; the operation record file comprises operation information executed by a user in the process of performing software test;
The generating unit is used for generating the test case file according to the operation record file; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
Optionally, in the software testing device, the parsing unit includes:
the analysis subunit is used for sending the operation instructions obtained through analysis to the server side sentence by sentence; the next sentence of operation instructions are sent after receiving a return value corresponding to the last sentence of operation instructions sent by the server side.
Optionally, in the software testing device, the test instruction of the user further carries information about the number of times of executing the test case file.
Optionally, in the software testing device, the server is configured to send the received operation instruction to a software module to be tested, so that the software module executes the received operation instruction; the software module to be tested is an ultrasonic software module; the script language in the test case file corresponds to operation information corresponding to at least one application scene under the operation of the ultrasonic software module.
Optionally, in the software testing device, the execution information of the operation instruction obtained by parsing includes: the operation instruction obtained by analysis, the execution time information of the operation instruction obtained by analysis and the execution error information of the operation instruction obtained by analysis;
the execution information of the test case file includes: the identification information of the test case file, the execution time information of the test case file and the execution times information of the test case file.
The fourth aspect of the present invention discloses a software testing device, applied to a server, comprising:
the first receiving unit is used for receiving the operation instruction sent by the client; the operation instruction is obtained by analyzing the test case file by the client; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file;
the first sending unit is used for sending the received operation instruction to a software module to be tested, so that the software module executes the received operation instruction;
the second receiving unit is used for receiving the return value sent by the software module; the return value is used for indicating whether the received operation instruction is successfully executed or not;
And the second sending unit is used for sending the received return value to the client.
Optionally, in the software testing device, the software testing device further includes:
the first response unit is used for responding to a recording start instruction of a user and starting to record operation information executed in the process of software testing of the user;
the second response unit is used for responding to a recording end instruction of a user and ending the recording of the operation information executed in the process of carrying out the software test on the user;
the third sending unit is used for sending the operation record file to the client; the operation record file comprises operation information recorded by the server side and executed in the process of software testing by the user; the operation record file is converted into the test case file by the client; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
Optionally, in the software testing device, the software testing device further includes:
the generating unit is used for generating and sending a test instruction to the client; the test instruction carries identification information of a test case file; and the test instruction is generated by triggering a playback function key on the user operation interface, and the identification information of the test case file is selected and determined from a plurality of test case files by triggering a case management function key on the user operation interface.
Optionally, in the software testing apparatus, the first receiving unit includes:
the first receiving subunit is used for receiving the operation instruction sent by the client side sentence by sentence; the next operating instruction is received after the server sends a return value corresponding to the last operating instruction.
Optionally, in the software testing apparatus, the first sending unit includes:
and the first sending subunit is used for sending the received operation instruction to the software module to be tested, so that the software module injects the received operation instruction into an event circulation mechanism, and executes the received operation instruction according to the queue sequence in the event circulation mechanism.
Optionally, in the software testing device, the software module to be tested is an ultrasonic software module;
the script language in the test case file corresponds to operation information corresponding to at least one application scene under the operation of the ultrasonic software module.
A fifth aspect of the present invention discloses a software testing system, comprising:
a client for performing any one of the methods described in the first aspect above;
And the server is connected with the client and is used for executing any one of the methods in the second aspect.
According to the technical scheme, the software testing method is applied to the client and is used for receiving the testing instruction of the user; the test instruction carries identification information of the test case file. And then analyzing the test case file corresponding to the identification information in the test instruction to obtain at least one operation instruction. The script language in the test case file corresponds to the operation information corresponding to at least one application scene. Then, the operation instruction obtained through analysis is sent to the server, and a return value sent by the server is received; the return value is used to indicate whether the operation instruction is executed successfully. Finally storing the execution record information of the test case file; the execution record information comprises a return value sent by the server, execution information of the test case file and execution information of an operation instruction obtained through analysis. Because the test case file comprises the operation information which is manually required to be input in different application scenes in the prior art, the client can analyze the test case file into the operation instruction and send the operation instruction to the server, the server controls the execution of the operation instruction, and the problem existing in the software testing process is recorded by storing the execution record information of the test case file, so that the automatic testing of the software is realized, and the efficiency of testing the software is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a software testing system according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a software testing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for creating a test case file according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a software testing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another software testing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a software testing system 100 is disclosed in the embodiment of the present application, and includes a client 101 and a server 102. Wherein, a communication connection is established between the client 101 and the server 102. The server 102 establishes a communication connection with the software module to be tested. The client 101 is applied to electronic devices such as mobile phones, tablet computers, desktop computers, and the like. The server 102 is applied to equipment such as ultrasonic equipment provided with software modules to be tested.
When the user starts to perform the software test, a test instruction is sent to the client 101, where the test instruction carries identification information of the test case file. The client 101 stores therein a plurality of test case files, and a scripting language in the test case files corresponds to operation information corresponding to at least one application scenario. And the user designates the test case file to be executed through the identification information of the test case file carried in the test instruction. After receiving the test instruction, the client 101 finds out a test case file corresponding to the identification information in the test instruction from the stored multiple test case files, analyzes the test case file, and obtains at least one operation instruction after analysis. The client 101 sends the operation instruction obtained by analysis to the server 102, and the server 102 sends the received operation instruction to the software module to be tested, so that the software module executes the received operation instruction. When the software module executes the operation instruction, a return value is sent to the server 102, where the return value is used to indicate whether the received operation instruction is executed successfully. The server 102 then transmits the return value to the client 101, and the client 101 records the return value, the execution information of the test case file, and the execution information of the operation instruction obtained by analysis.
Because the software module in the embodiment of the present application may be an ultrasound software module, the ultrasound software module is disposed in an ultrasound device, and the server 102 is also disposed in the ultrasound device, and the client 101 may be disposed in the ultrasound device or in other electronic devices such as a mobile phone, a tablet computer, and the like. Because the operation information of a plurality of application scenes in the prior art, which is needed to be manually input, when the ultrasonic software module runs, is correspondingly written into the test case file, the client 101 can analyze the test case file into an operation instruction and send the operation instruction to the server 102, so that the server 102 controls the ultrasonic software module to execute the operation instruction, and the client 101 records the problems existing in the software testing process by storing the execution record information of the test case file, thereby realizing the automatic test of the ultrasonic software and improving the efficiency of the test software.
It should be noted that the software testing method of the embodiment of the present application may also be used to test software modules other than ultrasonic software.
Specifically, the software testing method is described below by way of several examples, respectively.
Referring to fig. 2, an embodiment of the application discloses a software testing method, which specifically includes the following steps:
S201, the client receives a test instruction of a user.
The test instruction carries identification information of the test case file. The client side stores a plurality of test case files, and each test case file has respective identification information, such as name information, exclusive account information and the like of each test case file. After receiving the test instruction of the user, the client can determine the test case file required to be executed by the user by analyzing the test instruction of the user.
Specifically, the user triggers a test instruction on the device applied by the server or the mobile device, and sends the test instruction to the client. The test instruction of the user can be sent by clicking a key on a display interface of electronic equipment such as a computer, a mobile phone and the like. For example, if the software to be tested is ultrasonic software, the user may click on the relevant key to start the test on the user interface of the ultrasonic device, and issue a test instruction. It should be noted that there are many ways to generate and send the test instruction, including but not limited to those set forth in the embodiments of the present application, and that the difference in the ways to generate and send the test instruction of the user does not affect the implementation of the embodiments of the present application.
Optionally, in an embodiment of the present application, the test instruction is generated by triggering a playback function key on the user operation interface and selecting a plurality of test case files in the case management module.
Specifically, the user operation interface may be disposed on an electronic device where the server is located, or may be disposed on other electronic devices having a communication function. The user operation interface is displayed with a playback function key and a use case management module. The case management module contains identification information of a plurality of test case files, and the content of the plurality of test case files is stored in the client. After the user triggers the case management module, the user can select from a plurality of test case files in the case management module. When the user completes the selection of the test case file and triggers the playback function key, a test instruction carrying the identification information of the test case file selected by the user is generated. The test instruction is sent by a module with a communication function of the equipment where the user operation interface is located, for example, if the user operation interface is located on the equipment where the server is located, after the user triggers to generate the test instruction, the server may send the test instruction to the client, or may send the test instruction to other communication modules in the equipment.
Optionally, in an embodiment of the present application, the test instruction of the user further carries information about the number of times of executing the test case file. That is, the test instruction of the user may specify the number of times the test case file is executed, in addition to selecting a plurality of test case files stored in the client. In practical applications, when testing a software module, multiple tests are required. By setting the test times in the test instruction, the next test is not required to be started manually again after each test is finished, and the efficiency of testing the software module is improved.
S202, the client analyzes the test case file corresponding to the identification information in the test instruction to obtain at least one operation instruction.
The script language in the test case file corresponds to the operation information corresponding to at least one application scene, and the test case file is also a changeable file, and the script language corresponding to the operation information corresponding to at least one application scene can be generally edited and added or adjusted. The scripting language in the test case file may be a programming language such as C language, java language, etc. In practical application, the type of the script language in the test case file needs to be consistent with the type of the programming language which can be analyzed by the client, so that the client can analyze the test case file to obtain at least one operation instruction. The test case file is a test case file corresponding to the identification information carried in the test instruction of the user in step S201.
In the prior art, when a user tests a software module, a user needs to manually set specific application scenes, so that the software module runs a program in the set application scenes, and whether the software module runs in the set application scenes in error or not is detected. Specifically, the mode of manually setting the application scene is that a mouse clicks some keys in a screen of the device where the software module is located, touches some keys on a display screen of the device where the software module is located, adjusts operation information such as a knob on the device where the software module is located, and the like.
In the embodiment of the application, the scripting language in the test case file corresponds to the operation information corresponding to at least one application scene. Therefore, the operation instruction obtained by analyzing the test case file corresponds to the operation information. Specifically, the operation instruction obtained by analysis is an operation instruction function, when the operation instruction is executed, function interfaces corresponding to the operation instruction are called, each function interface corresponds to operation information such as some keys in a screen of the device where the mouse click software module is located, some keys on a display screen of the device where the touch software module is located, a knob on the device where the adjustment software module is located, and the like, so that a series of operations for setting an application scene such as adjusting the knob, clicking the keys, and the like can be realized by executing the operation instruction.
For example, when the software module to be tested is an ultrasonic software module, the script language in the test case file corresponds to operation information corresponding to at least one application scenario under the operation of the ultrasonic software module.
The operation information corresponding to the application scene of the ultrasonic software module comprises setting parameters such as a probe, a diagnosis item, an ultrasonic mode and the like of the ultrasonic equipment. And the operation instruction obtained by analysis in the test case file corresponds to the operation information. By executing the operation instruction obtained by analysis, the setting of parameters such as a probe, a diagnosis item, an ultrasonic mode and the like of the ultrasonic equipment can be completed.
Because the test case file comprises the operation information which is manually required to be input in different application scenes in the prior art, the client can analyze the test case file into the operation instruction and send the operation instruction to the server, and the server controls the execution of the operation instruction, so that the automatic test of the software is realized, and the efficiency of testing the software is improved.
S203, the client sends the operation instruction obtained through analysis to the server.
The communication between the server and the client may be implemented by using a framework such as remote procedure call (Remote Procedure Call, RPC). After the client analyzes the test case file, at least one operation instruction is obtained. Because the operation instruction corresponds to the operation information corresponding to at least one application scene, the operations required to be executed in different application scenes also have a sequence. Therefore, the client needs to send the operation instructions to the server, and also needs to tell the execution sequence of the operation instructions in the test case file to the server, so that the operation instructions can be executed according to the execution sequence. Specifically, the client may send the operation instructions to the server in a sentence-by-sentence manner according to the execution order, or may package and send all the operation instructions to the server after the operation instructions are arranged in order, and then the operation instructions are executed by the server in order.
Optionally, referring to fig. 3, in a specific embodiment of the present application, a method for creating a test case file includes:
s301, the server side responds to a recording start instruction of a user and starts recording operation information executed in the process of software testing of the user.
The recording start instruction is used for triggering the server to start recording. Specifically, a key capable of sending a recording start instruction is arranged on a user interface of the device where the software module is located. The user can send a recording start instruction to the server by clicking the key. After the server responds to the instruction, the operation information of the instruction in the software testing process of the user is recorded. It should be noted that, the server may be installed in the device where the software module to be tested is located, so as to read and record the operation performed by the user on the device.
The operation information executed in the software process by the user is an operation executed when the application scene is set, for example, a mouse clicks some keys in a screen of the device where the software module is located, touches some keys on a display screen of the device where the software module is located, adjusts a knob on the device where the software module is located, and the like.
After responding to a recording start instruction of a user, the server starts a thread and reads a background event queue of equipment where the software module is located. The operation events executed by the user on the equipment are orderly recorded in a background event queue of the equipment. The server side continuously inquires and reads the event queue, records the event queue, and writes the event queue of the background of the equipment into a write operation record file.
S302, the server responds to a recording ending instruction of the user, and the recording of operation information executed in the process of carrying out software testing on the user is ended.
When the user finishes the operation of the equipment where the software module to be tested is located, a key capable of sending out a recording ending instruction is pressed on a user interface of the equipment, and then the server end recording is controlled. In the process from the beginning to the end of recording, the server records the operation information executed in the process of software testing by the user, and writes the record into the operation record file.
S303, the server side sends the operation record file to the client side.
Wherein communication between the server and the client may be implemented using a remote procedure call (Remote Procedure Call, RPC) framework. Among them, there are many types of RPC frameworks, such as GRPC, thread, etc. It should be noted that there are many frameworks that can implement communication between the server and the client, including, but not limited to, those set forth in the embodiments of the present application.
Step S303 can also be regarded as an operation record file transmitted by the client receiving server.
S304, the client generates a test case file according to the operation record file.
The script language in the test case file corresponds to operation information executed in the process of software testing by a user. The test case file may edit a scripting language that adds or adjusts operational information corresponding to at least one application scenario.
Specifically, when step S304 is executed, the client converts the operation record file into a test case file. In the recording process of the server side, the language used in writing the recorded file is not necessarily the language which can be analyzed by the client side. Therefore, the client converts the content in the operation record file into a script language which can be analyzed by the client, and further generates the test case file. It should be noted that, if the language used in the operation record file can be parsed by the client, the operation record file is the test case file, and the client is not required to perform conversion.
It should be noted that, the test case file may edit a scripting language that adds or adjusts operation information corresponding to at least one application scenario. In practical application, after the application scenario to which the software module is applicable is added or adjusted, the operations from step S301 to step S304 need not be re-executed, i.e. the operation when the user sets the application scenario is re-recorded, and the modification may also be performed by adding or adjusting the corresponding scripting language in the test case file.
Optionally, in a specific embodiment of the present application, an implementation manner of step S203 is performed, including:
and the client sends the operation instruction obtained by analysis to the server sentence by sentence. The next operating instruction is sent after receiving a return value corresponding to the last operating instruction sent by the server.
Specifically, the client sends an operation instruction to the server in a statement blocking mode. The operation instructions are sent one by one according to the arrangement sequence of the operation instructions obtained after the test case file is analyzed, and after each operation instruction is sent to the server, the next operation instruction is sent continuously after the execution result of the operation instruction by the server, namely the return value, is received.
It should be noted that, there are many ways in which the client sends the operation instruction to the server, for example, all the operation instructions in the test case file may be directly sent to the server at the same time, and the ways in which the client sends the operation instruction to the server include, but are not limited to, what is proposed in the embodiments of the present application.
S204, the server side sends the received operation instruction to the software module to be tested, so that the software module executes the received operation instruction.
Because the operation instruction corresponds to the operation information under the application scene, after the software module receives the operation instruction, the setting of the application scene can be automatically completed by executing the operation instruction, and the application scene does not need to be set manually as in the prior art. And the software module runs the program under the application scene set by the received operation instruction.
It should be noted that, each time the software module executes an operation instruction, a corresponding return value is generated, and the return value is used to indicate whether the operation instruction is executed successfully. And the software module sends the generated return value to the server, and then the server sends the return value to the client, and the client records the return value.
Optionally, in a specific embodiment of the present application, performing an implementation of step S204 includes:
the server side sends the received operation instructions to the software module to be tested, so that the software module injects the received operation instructions into an event circulation mechanism, and executes the received operation instructions according to the sequence of the queues in the event circulation mechanism.
Because the server receives the operation instructions sent by the client in a sentence-by-sentence manner, the execution sequence of the operation instructions by the server is known, and the software module also receives the operation instructions sent by the server in a sentence-by-sentence manner, so that the execution sequence of the operation instructions is also known. The software module sequentially injects the operation instructions into a queue of the event circulation mechanism, and sequentially instructs the received operation instructions according to the queue. It should be noted that, if the client sends an operation instruction in a statement blocking manner, that is, after sending an operation instruction, only after receiving a return value, the client sends a next operation instruction, then only one operation instruction in the event cycle mechanism is injected by the software module, after the operation instruction is executed and the return value corresponding to the operation instruction is sent to the server, the client can receive the next operation instruction and continue to inject the next operation instruction into the event cycle mechanism.
It should be noted that, since there are many ways in which the client sends the operation instruction to the server, there are many corresponding ways in which the server sends the operation instruction to the software module, but no matter which way is used to send the operation instruction, the software module must execute the operation instruction sequentially.
Because the test case file comprises the operation information in different application scenes which are manually required to be input in the prior art, the server can send the received operation instruction to the software module to be tested, so that the software module executes the operation instruction without manually inputting the operation information, the automatic test of the software is realized, and the efficiency of testing the software is improved.
S205, the server receives the return value sent by the software module.
The return value is used for indicating whether the received operation instruction is successfully executed. Each sentence of operation instructions corresponds to a return value. After each sentence of operation instructions is executed, the software module sends the corresponding return value to the server.
It should be noted that, in practical application, it may be manually set that when a certain sentence of operation instruction is not successfully executed, the test on the software module is suspended. The software tester can directly analyze according to the existing errors, and re-test the software module after correcting the errors existing in the software module.
S206, the server sends the received return value to the client.
It should be noted that, because the software modules execute the operation instructions sequentially, the return values sent by the server to the client are also sent sequentially to execute the operation instructions. The client may determine the operation instruction corresponding to the received return value. The execution result of each operation instruction can be known.
S207, the client stores the execution record information of the test case file.
The execution record information comprises a return value sent by the server, execution information of the test case file and execution information of an operation instruction obtained through analysis. Specifically, after receiving the return value sent by the server in step S206, the client executes step S207. The execution information of the test case file in the execution record information may be identification information of the currently executed test case file, time information of executing the test case file, and frequency information of executing the test case file. The execution information of the operation instruction obtained by parsing may be the executed operation instruction, the execution time of each operation instruction, and the like. When the execution of the operation instruction fails, the error content information is displayed in the execution record information, namely, the information of the operation instruction with the failure execution is displayed. And the return value sent by the server is associated with the corresponding operation instruction. And the user can analyze and debug errors in the software module according to the execution record information to finish the test of the software module.
The steps S201, S202, S203, and S207 are implementation contents of the software testing method executed by the client. Step S204, step S205, and step S206 are implementation contents of the software testing method executed by the server.
Referring to fig. 4, based on the software testing method disclosed in the embodiment of the present application, the embodiment of the present application correspondingly discloses a software testing device 400, which is applied to a client, and includes: first receiving section 401, analyzing section 402, first transmitting section 403, second receiving section 404, and storing section 405.
The first receiving unit 401 is configured to receive a test instruction of a user. The test instruction carries identification information of the test case file.
Optionally, in an embodiment of the present application, the test instruction of the user further carries information about the number of times of executing the test case file.
The parsing unit 402 is configured to parse the test case file corresponding to the identification information in the test instruction, and obtain at least one operation instruction. The script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file.
Optionally, in an embodiment of the present application, the parsing unit 402 includes:
and the analysis subunit is used for sending the operation instructions obtained through analysis to the server side sentence by sentence. The next operating instruction is sent after receiving a return value corresponding to the last operating instruction sent by the server.
The first sending unit 403 is configured to send the operation instruction obtained by parsing to the server.
And the second receiving unit 404 is configured to receive the return value sent by the server. The return value is used to indicate whether the operation instruction is executed successfully.
And a storage unit 405, configured to store execution record information of the test case file. The execution record information comprises a return value sent by the server, execution information of the test case file and execution information of an operation instruction obtained through analysis.
Optionally, in an embodiment of the present application, the software testing apparatus 400 further includes: and a third receiving unit and a generating unit.
And the third receiving unit is used for receiving the operation record file sent by the server. The operation record file comprises operation information executed in the process of performing software test by a user.
And the generating unit is used for generating a test case file according to the operation record file. The script language in the test case file corresponds to operation information executed in the process of software testing by a user; the test case file may edit a scripting language that adds or adjusts operational information corresponding to at least one application scenario.
Optionally, in an embodiment of the present application, the server is configured to send the received operation instruction to a software module to be tested, so that the software module executes the received operation instruction. The software module to be tested is an ultrasonic software module; the script language in the test case file corresponds to the operation information corresponding to at least one application scene under the running of the ultrasonic software module.
Optionally, in an embodiment of the present application, the analyzing the execution information of the obtained operation instruction includes: analyzing the obtained operation instruction, analyzing the execution time information of the obtained operation instruction, and analyzing the execution error information of the obtained operation instruction.
The execution information of the test case file includes: identification information of the test case file, execution time information of the test case file, and execution times information of the test case file.
The specific principle and execution process of each unit and subunit in the software testing apparatus 400 disclosed in the foregoing embodiments of the present application are the same as those of the software testing method disclosed in the foregoing embodiments of the present application, and reference may be made to corresponding parts in the software testing method disclosed in the foregoing embodiments of the present application, which are not repeated herein.
The software testing device 400 provided by the application is applied to a client, and receives a testing instruction of a user through a first receiving unit 401; the test instruction carries identification information of the test case file. Then, the analyzing unit 402 analyzes the test case file corresponding to the identification information in the test instruction, so as to obtain at least one operation instruction. The script language in the test case file corresponds to the operation information corresponding to at least one application scene. The first sending unit 403 sends the operation instruction obtained by analysis to the server, and the second receiving unit 404 receives the return value sent by the server; the return value is used to indicate whether the operation instruction is executed successfully. Finally, the storage unit 405 stores the execution record information of the test case file; the execution record information comprises a return value sent by the server, execution information of the test case file and execution information of an operation instruction obtained through analysis. Because the test case file in the application includes operation information in different application scenarios that needs to be input manually in the prior art, the parsing unit 402 may parse the test case file into an operation instruction and send the operation instruction to the server, and the server controls the execution of the operation instruction, and stores the execution record information of the test case file through the storage unit 405, so as to record the problems existing in the software testing process, realize automatic testing of the software, and improve the efficiency of testing the software.
Referring to fig. 5, based on the software testing method disclosed in the embodiment of the present application, the embodiment of the present application correspondingly discloses a software testing device 500, which is applied to a server, and includes: a first receiving unit 501, a first transmitting unit 502, a second receiving unit 503, and a second transmitting unit 504.
The first receiving unit 501 is configured to receive an operation instruction sent by a client. The operation instruction is obtained by analyzing the test case file by the client. The script language in the test case file corresponds to operation information corresponding to at least one application scene, and the test case file is a changeable file.
Optionally, in a specific embodiment of the present application, the first receiving unit 501 includes:
the first receiving subunit is used for receiving the operation instruction sent by the client side sentence by sentence. The next operating instruction is received after the server sends the return value corresponding to the last operating instruction.
The first sending unit 502 is configured to send the received operation instruction to a software module to be tested, so that the software module executes the received operation instruction.
Optionally, in a specific embodiment of the present application, the first sending unit 502 includes:
The first sending subunit is used for sending the received operation instruction to the software module to be tested, so that the software module injects the received operation instruction into the event circulation mechanism, and executes the received operation instruction according to the queue sequence in the event circulation mechanism.
And the second receiving unit 503 is configured to receive the return value sent by the software module. The return value is used for indicating whether the received operation instruction is successfully executed.
And a second sending unit 504, configured to send the received return value to the client.
Optionally, in an embodiment of the present application, the software testing apparatus 500 further includes: a first response unit, a second response unit, and a third transmission unit.
The first response unit is used for responding to a recording start instruction of a user and starting to record operation information executed in the process of software testing of the user.
And the second response unit is used for responding to the recording ending instruction of the user and ending the recording of the operation information executed in the process of carrying out the software test on the user.
And the third sending unit is used for sending the operation record file to the client. The operation record file comprises operation information recorded by the server side and executed in the process of software testing by a user. The operation record file is converted into a test case file by the client; the script language in the test case file corresponds to operation information executed in the process of performing software test by the user. The test case file may edit a scripting language that adds or adjusts operational information corresponding to at least one application scenario.
Alternatively, in a specific embodiment of the present application, the software module to be tested is an ultrasound software module. The script language in the test case file corresponds to operation information corresponding to at least one application scene under the running of the ultrasonic software module.
Optionally, in an embodiment of the present application, the software testing apparatus 500 further includes:
and the generating unit is used for generating and sending the test instruction to the client. The test instruction carries identification information of the test case file; the test instruction is generated by triggering a playback function key on the user operation interface, and the identification information of the test case files is selected and determined from the plurality of test case files by triggering a case management function key on the user operation interface.
The specific principle and execution process of each unit and subunit in the software testing device 500 disclosed in the foregoing embodiments of the present application are the same as those of the software testing method disclosed in the foregoing embodiments of the present application, and reference may be made to corresponding parts in the software testing method disclosed in the foregoing embodiments of the present application, which are not repeated herein.
The testing device 500 provided in the embodiment of the present application is applied to a server, and receives an operation instruction sent by a client through a first receiving unit 501. The operation instruction is obtained by analyzing the test case file by the client; the script language in the test case file corresponds to the operation information corresponding to at least one application scene. The first sending unit 502 sends the received operation instruction to the software module to be tested, so that the software module executes the received operation instruction. The second receiving unit 503 receives the return value sent by the software module. The return value is used for indicating whether the received operation instruction is successfully executed. Finally, the second sending unit 504 sends the received return value to the client. Because the test case file in the application includes operation information under different application scenarios that needs to be input manually in the prior art, the first sending unit 502 can send the received operation instruction to the software module that needs to be tested, so that the software module executes the operation instruction without manually inputting the operation information, and the second sending unit 504 also sends the received return value to the client, so that the client can record and store the execution record information of the test case file, record the problems existing in the software testing process, realize automatic testing of the software, and improve the efficiency of testing the software.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transshipment) such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A software testing method, applied to a client, comprising:
receiving a test instruction of a user; the test instruction carries identification information of a test case file;
analyzing a test case file corresponding to the identification information in the test instruction to obtain at least one operation instruction; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file; the operation information corresponding to the application scene of the ultrasonic software module at least comprises the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment, the operation instruction obtained by analysis in the test case file corresponds to the operation information, and the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment is at least completed by executing the operation instruction obtained by analysis;
The operation instruction obtained through analysis is sent to a server, the server sends the operation instruction to an ultrasonic software module to be tested, the ultrasonic software module injects the received operation instruction into an event circulation mechanism, and the received operation instruction is executed according to a queue sequence in the event circulation mechanism; the method comprises the steps that when an ultrasonic software module executes an operation instruction, function interfaces corresponding to the operation instruction are called, and each function interface corresponds to a button in a screen of equipment where a mouse click software module is located, a button on a display screen of the equipment where a touch software module is located, and knob operation information on the equipment where an adjustment software module is located;
receiving a return value sent by the server; the return value is used for indicating whether the operation instruction is successfully executed or not;
storing the execution record information of the test case file; the execution record information comprises a return value sent by the server, the execution information of the test case file and the execution information of the operation instruction obtained by analysis;
the sending the operation instruction obtained by analysis to the server side comprises the following steps:
The operation instructions obtained through analysis are sent to the server side sentence by sentence according to the execution sequence; the next sentence of operation instructions are sent after receiving a return value corresponding to the last sentence of operation instructions sent by the server side;
or, the operation instructions obtained by analysis are all packaged and sent to the server after being arranged according to the sequence, and then the operation instructions are executed by the server according to the sequence;
the method for creating the test case file comprises the following steps:
receiving an operation record file sent by the server; the operation record file comprises operation information executed by a user in the process of performing software testing, wherein the operation information executed by the user in the process of performing the software testing is an operation executed when an application scene is set, and the operation record file is obtained by recording the operation information executed by the user in the process of performing the software testing from the recording start to the recording end;
generating the test case file according to the operation record file; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
2. The method of claim 1, wherein the user's test instructions further carry information on the number of times the test case file was executed.
3. The method of claim 1, wherein the scripting language in the test case file corresponds to operational information corresponding to at least one application scenario under which the ultrasound software module is running.
4. The method according to claim 1, wherein the parsed execution information of the operation instruction includes: the operation instruction obtained by analysis, the execution time information of the operation instruction obtained by analysis and the execution error information of the operation instruction obtained by analysis;
the execution information of the test case file includes: the identification information of the test case file, the execution time information of the test case file and the execution times information of the test case file.
5. The software testing method is characterized by being applied to a server and comprising the following steps:
receiving an operation instruction sent by a client; the operation instruction is obtained by analyzing the test case file by the client; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file;
The received operation instruction is sent to a software module to be tested, so that the software module executes the received operation instruction; the method comprises the steps that when the software module executes an operation instruction, function interfaces corresponding to the operation instruction are called, and each function interface corresponds to a button in a screen of equipment where the mouse clicks the software module, a button on a display screen of the equipment where the touch software module is located, and knob operation information on the equipment where the adjustment software module is located; the operation information corresponding to the application scene of the ultrasonic software module at least comprises the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment, the operation instruction obtained by analysis in the test case file corresponds to the operation information, and the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment is at least completed by executing the operation instruction obtained by analysis;
receiving a return value sent by the software module; the return value is used for indicating whether the received operation instruction is successfully executed or not;
sending the received return value to the client;
the operation instruction sent by the receiving client side comprises the following steps:
receiving operation instructions sent by the client sentence by sentence; the next sentence of operation instructions are received after the server side sends a return value corresponding to the last sentence of operation instructions;
Receiving an operation instruction packet sent by the client, and executing operation instructions in the operation instruction packet according to the sequence, wherein the operation instruction packet is obtained by the client by arranging the operation instructions obtained by analysis according to the sequence and then packaging the operation instructions;
the sending the received operation instruction to the software module to be tested, so that the software module executes the received operation instruction, including:
the received operation instructions are sent to the software module to be tested, so that the software module injects the received operation instructions into an event circulation mechanism, and the received operation instructions are executed according to the queue sequence in the event circulation mechanism;
the method for creating the test case file comprises the following steps:
responding to a recording start instruction of a user, and starting to record operation information executed in the process of performing software testing by the user, wherein the operation information executed in the process of performing the software testing by the user is an operation executed when an application scene is set;
responding to a recording ending instruction of a user, ending recording of operation information executed in the process of carrying out software testing on the user;
transmitting the operation record file to the client; the operation record file comprises operation information recorded by the server side and executed in the process of software testing by the user; the operation record file is obtained by recording operation information executed in the process of software testing by a user in the process from the beginning of recording to the end of recording of the server, and the operation record file is converted into the test case file by the client; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
6. The method of claim 5, further comprising, prior to receiving the operation instruction sent by the client:
generating and sending a test instruction to the client; the test instruction carries identification information of a test case file; and the test instruction is generated by triggering a playback function key on the user operation interface, and the identification information of the test case file is selected and determined from a plurality of test case files by triggering a case management function key on the user operation interface.
7. The method of claim 5, wherein the scripting language in the test case file corresponds to operational information corresponding to at least one application scenario under which the ultrasound software module is running.
8. A software testing apparatus, for application to a client, comprising:
the first receiving unit is used for receiving a test instruction of a user; the test instruction carries identification information of a test case file;
the analyzing unit is used for analyzing the test case file corresponding to the identification information in the test instruction to obtain at least one operation instruction; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file; the operation information corresponding to the application scene of the ultrasonic software module at least comprises the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment, the operation instruction obtained by analysis in the test case file corresponds to the operation information, and the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment is at least completed by executing the operation instruction obtained by analysis;
The first sending unit is used for sending the operation instruction obtained by analysis to a server, and sending the operation instruction to an ultrasonic software module to be tested by the server, so that the ultrasonic software module injects the received operation instruction into an event circulation mechanism, and the received operation instruction is executed according to a queue sequence in the event circulation mechanism; the method comprises the steps that when an ultrasonic software module executes an operation instruction, function interfaces corresponding to the operation instruction are called, and each function interface corresponds to a button in a screen of equipment where a mouse click software module is located, a button on a display screen of the equipment where a touch software module is located, and knob operation information on the equipment where an adjustment software module is located;
the second receiving unit is used for receiving the return value sent by the server; the return value is used for indicating whether the operation instruction is successfully executed or not;
the storage unit is used for storing the execution record information of the test case file; the execution record information comprises a return value sent by the server, the execution information of the test case file and the execution information of the operation instruction obtained by analysis;
The first sending unit is specifically configured to: the operation instructions obtained through analysis are sent to the server side sentence by sentence according to the execution sequence; the next sentence of operation instructions are sent after receiving a return value corresponding to the last sentence of operation instructions sent by the server side; or, the operation instructions obtained by analysis are all packaged and sent to the server after being arranged according to the sequence, and then the operation instructions are executed by the server according to the sequence;
the client creates a test case file, including:
receiving an operation record file sent by the server; the operation record file comprises operation information executed by a user in the process of performing software testing, wherein the operation information executed by the user in the process of performing the software testing is an operation executed when an application scene is set, and the operation record file is obtained by recording the operation information executed by the user in the process of performing the software testing from the recording start to the recording end;
generating the test case file according to the operation record file; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
9. A software testing device, applied to a server, comprising:
the first receiving unit is used for receiving the operation instruction sent by the client; the operation instruction is obtained by analyzing the test case file by the client; the script language in the test case file corresponds to operation information corresponding to at least one application scene; the test case file is a changeable file;
the first sending unit is used for sending the received operation instruction to a software module to be tested, so that the software module executes the received operation instruction; when executing the operation instruction, the software module calls a function interface corresponding to the operation instruction, wherein each function interface corresponds to a button in a screen of the device where the mouse click software module is located, a button on a display screen of the device where the touch software module is located, and knob operation information on the device where the adjustment software module is located; the operation information corresponding to the application scene of the ultrasonic software module at least comprises the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment, the operation instruction obtained by analysis in the test case file corresponds to the operation information, and the setting of the probe, the diagnosis item and the ultrasonic mode parameter of the ultrasonic equipment is at least completed by executing the operation instruction obtained by analysis;
The second receiving unit is used for receiving the return value sent by the software module; the return value is used for indicating whether the received operation instruction is successfully executed or not;
the second sending unit is used for sending the received return value to the client;
the first receiving unit is specifically configured to: receiving operation instructions sent by the client sentence by sentence; the next sentence of operation instructions are received after the server side sends a return value corresponding to the last sentence of operation instructions; receiving an operation instruction packet sent by the client, and executing operation instructions in the operation instruction packet according to the sequence, wherein the operation instruction packet is obtained by the client by arranging the operation instructions obtained by analysis according to the sequence and then packaging the operation instructions;
the first sending unit is specifically configured to: the received operation instructions are sent to the software module to be tested, so that the software module injects the received operation instructions into an event circulation mechanism, and the received operation instructions are executed according to the queue sequence in the event circulation mechanism;
the server creates a test case file, including:
responding to a recording start instruction of a user, and starting to record operation information executed in the process of performing software testing by the user, wherein the operation information executed in the process of performing the software testing by the user is an operation executed when an application scene is set;
Responding to a recording ending instruction of a user, ending recording of operation information executed in the process of carrying out software testing on the user;
transmitting the operation record file to the client; the operation record file comprises operation information recorded by the server side and executed in the process of software testing by the user; the operation record file is obtained by recording operation information executed in the process of software testing by a user in the process from the beginning of recording to the end of recording of the server, and the operation record file is converted into the test case file by the client; the script language in the test case file corresponds to operation information executed in the process of software testing by the user; the test case file can edit a script language which adds or adjusts operation information corresponding to at least one application scene.
10. A software testing system, comprising:
a client for performing the method of any of claims 1 to 4;
a server connected to the client for performing the method of any one of claims 5 to 7.
CN201911046935.2A 2019-10-30 2019-10-30 Software testing method, device and system Active CN110837467B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911046935.2A CN110837467B (en) 2019-10-30 2019-10-30 Software testing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911046935.2A CN110837467B (en) 2019-10-30 2019-10-30 Software testing method, device and system

Publications (2)

Publication Number Publication Date
CN110837467A CN110837467A (en) 2020-02-25
CN110837467B true CN110837467B (en) 2024-04-16

Family

ID=69576016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911046935.2A Active CN110837467B (en) 2019-10-30 2019-10-30 Software testing method, device and system

Country Status (1)

Country Link
CN (1) CN110837467B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597050A (en) * 2020-12-28 2021-04-02 上海品顺信息科技有限公司 Method, system, equipment and storage medium for testing associated source code and test case
CN116467222A (en) * 2023-06-19 2023-07-21 阿里巴巴(中国)有限公司 Domain name resolution software testing method, device and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN105260299A (en) * 2015-09-17 2016-01-20 安一恒通(北京)科技有限公司 Method, device, and system for software test
CN105320598A (en) * 2015-11-24 2016-02-10 广州华多网络科技有限公司 Software testing method and device
CN105868100A (en) * 2015-12-22 2016-08-17 乐视网信息技术(北京)股份有限公司 Android system-based automatic test method and device
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
WO2019051714A1 (en) * 2017-09-14 2019-03-21 深圳传音通讯有限公司 Test method and test apparatus for application memory of smart device
CN109871326A (en) * 2019-02-13 2019-06-11 广州云测信息技术有限公司 A kind of method and apparatus that script is recorded

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010018415A1 (en) * 2008-08-15 2010-02-18 Verum Holding B.V. A method and system for testing complex machine control software

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN105260299A (en) * 2015-09-17 2016-01-20 安一恒通(北京)科技有限公司 Method, device, and system for software test
CN105320598A (en) * 2015-11-24 2016-02-10 广州华多网络科技有限公司 Software testing method and device
CN105868100A (en) * 2015-12-22 2016-08-17 乐视网信息技术(北京)股份有限公司 Android system-based automatic test method and device
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
WO2019051714A1 (en) * 2017-09-14 2019-03-21 深圳传音通讯有限公司 Test method and test apparatus for application memory of smart device
CN109871326A (en) * 2019-02-13 2019-06-11 广州云测信息技术有限公司 A kind of method and apparatus that script is recorded

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孟磊.软件质量与测试.西安电子科技大学出版社,2015,98-102. *

Also Published As

Publication number Publication date
CN110837467A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
US8433733B2 (en) Web application record-replay system and method
US10853232B2 (en) Adaptive system for mobile device testing
CN110083543B (en) Regression testing method, device, electronic equipment and storage medium
US8645912B2 (en) System and method for use in replaying software application events
US9268670B1 (en) System for module selection in software application testing including generating a test executable based on an availability of root access
US20130298110A1 (en) Software Visualization Using Code Coverage Information
US8443340B2 (en) Execution capture and replay based debugging
US20090199096A1 (en) Automated gui test recording/playback
JP4295775B2 (en) GUI test support system and application program for test support
CN110013672B (en) Method, device, apparatus and computer-readable storage medium for automated testing of machine-run games
US20150074648A1 (en) Software defect verification
US20150006961A1 (en) Capturing trace information using annotated trace output
CN110716853A (en) Test script recording method, application program testing method and related device
CN103729294A (en) Method and device for testing performance script of application software
CN110837467B (en) Software testing method, device and system
CN111522749A (en) Page testing method and device, readable storage medium and electronic equipment
CN110825595B (en) Recording playback method and system, storage medium
CN110944231B (en) Monitoring method and device of video player
CN114661594A (en) Method, apparatus, medium, and program product for automated testing
CN106610845B (en) Information management method, device, server and system
CN114356434A (en) Page loading method, equipment, device, storage medium and program product
CN110888641B (en) Script automatic generation method and device, server and storage medium
CN111475423A (en) Data entry method and device, electronic equipment and readable storage medium
CN115514677B (en) Method and system for server dial testing
CN116860322A (en) Front-end data source processing method, device, equipment and storage medium

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