Disclosure of Invention
The embodiment of the application provides a case configuration method, a case configuration device and a readable storage medium, automatic generation of test cases is not limited to research and development personnel, programming bases are not required for users, and the case configuration method and device have high convenience and expandability.
In a first aspect, a use case configuration method is provided, and the method includes: the server receives information of a target test task from the client; the information of the target test task is modifiable information facing to a user;
the server determines parameters of a target test case according to the information of the target test task; the target test case is used for executing a target test task, and the parameters are input parameters when the target test case is executed;
and the server writes the parameters of the target test case into the logic codes of the target test case to generate an operation script of the target test case.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, the server determines parameters of the target test case according to the information of the target test task, including: and coding the information of the event, and determining the parameters of the target test case according to the coded result.
In one embodiment, the method includes: and determining an event execution method according to the type of the event, and determining a logic code for executing the target test case according to the event execution method.
In one embodiment, the method further includes:
and the server instructs the test equipment to run the running script of the target test case so as to execute the target test task, acquire the execution result of the target test task and send the execution result to the client.
In the method provided by the first aspect, the server may automatically generate the running script of the test case of the test task according to the information of the test task, and the user may input the information of the test task to realize the automation of the test case. The automatic generation of the test case is not limited to research and development personnel, the user is not required to have a programming basis, and the test case has high convenience and expandability.
In a second aspect, a use case generation method is provided, including:
the method comprises the steps that a client side obtains information of a target test task input by a user; the information of the target test task is modifiable information facing to a user;
the client sends the information of the target test task to the server, so that the server determines the running script of the target test case according to the information of the target test task; the target test case is used for executing a target test task.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, the method further comprises:
and receiving the execution result of the target test task from the server.
In the method provided by the second aspect, the client may receive the information of the test task input by the user, and the client may also send the information of the test task to the server, so that the server automatically generates the running script of the test case of the test task according to the information of the test task. The user inputs the information of the test task to realize the automatic realization of the test case, the automatic generation of the test case is not limited to research personnel, the user is not required to have a programming basis, and the test case has higher convenience and expandability.
In a third aspect, a use case configuration apparatus is provided, including:
the communication unit is used for receiving the information of the target test task from the client; the information of the target test task is modifiable information facing to a user;
the processing unit is used for determining the parameters of the target test case according to the information of the target test task and writing the parameters of the target test case into the logic codes of the target test case so as to generate an operation script of the target test case; the target test case is used for executing the target test task, and the parameters are input parameters when the target test case is executed.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, the processing unit is specifically configured to encode the information of the event, and determine the parameter of the target test case according to the encoded result.
In one embodiment, the processing unit is specifically configured to determine an event execution method according to the type of the event, and determine a logic code for executing the target test case according to the event execution method.
In one embodiment, the processing unit is specifically configured to instruct the test device to run a running script of the target test case to execute the target test task, and obtain an execution result of the target test task;
the communication unit is further configured to send the execution result to the client.
In a fourth aspect, a use case configuration apparatus is provided, including:
the processing unit is used for acquiring information of a target test task input by a user; the target test task is modifiable information facing to a user;
the processing unit is used for sending the information of the target test task to the server so that the server determines the running script of the target test case according to the information of the target test task; the target test case is used for executing a target test task.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, the communication unit is further configured to receive the execution result of the target test task from the server.
In a fifth aspect, a computer device is provided, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method according to the first aspect and any one of the possible implementations of the first aspect, or the method according to the first aspect and any one of the possible implementations of the first aspect when executing the computer program.
A sixth aspect provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method of the first aspect and any one of the possible implementations of the first aspect, or the method of the first aspect and any one of the possible implementations of the first aspect.
In the embodiment of the application, the client can acquire the information of the test task and send the information of the test task to the server. The server can automatically generate the running script of the test case of the test task according to the information of the test task, and the user can input the information of the test task to realize the automatic realization of the test case. The automatic generation of the test case is not limited to research and development personnel, the user is not required to have a programming basis, and the test case has high convenience and expandability.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
First, to facilitate understanding of the technical methods provided by the embodiments of the present application, terms related to the embodiments of the present application are explained:
(1) test case
The Test Case (Test Case) is used to describe a Test task for testing a Test object (e.g., a software product), and may embody a Test scheme, a Test method, a Test strategy, and the like.
The parameters of the test case may be input parameters when the test case is executed, that is, input data provided to the system under test for implementing the test case, and may be parameters describing information such as a test target (test object), a test environment, input data, a test step, an expected result, a test script, and the like, for example.
(2) Testing events included in a task
The event included in the test task may be a user operation event involved in executing the test task, and the event included in the test task may be generally determined according to an actual operation of a user, for example, a click event, a slide event, an input text event, and the like.
Assuming that the test task is "enter user x's live room", taking the mobile phone interface shown in fig. 1 as an example, user operations that may be involved in entering user x's live room using a mobile phone include a sliding operation on the mobile phone screen (e.g., sliding a user list), and a sliding operation on the mobile phone screen (e.g., clicking a user avatar). Wherein, the click operation triggers a click event, the slide operation triggers a slide event, and the test task may include the click event and the slide event.
(3) Run script for test case
The run script of the test case is a run script written according to the requirements of the test case, and may include a logic code in which parameters of the test case are written. When the running script of the test case is run, the test case is executed.
The use case configuration method provided by the embodiment of the application is applicable to the test system shown in fig. 2. Referring to fig. 2, the system includes a client 10, a server 20, and a test apparatus 30. Among other things, the client 10 provides a variety of services to the user, for example, the services provided may be automated testing of software products, software systems, and the like. The server 20 is used for supporting background implementation of services provided by the client 10, for example, test cases can be configured and generated, and execution of automated test tasks is supported. The test device 30 is a carrier of a test task, and executes the test task by running a script of a test case.
In one possible implementation, the client 10 may provide a visual interface including setting items of the test tasks and setting items of the events included in the test tasks. Fig. 3 is a visualization interface provided by an embodiment of the present application, and referring to fig. 3, the setting items of the test task may include a setting item a1 of a test task id (identity) and a setting item a2 of description information of the test task. The setting items of the event may include a setting item a3 of an event type, a setting item a4 of event description information, a setting item a5 of control information, an input box information setting item a6, a loop number setting item a7, and a delay time setting item a 8.
The setting item may be a pull-down menu or an input box, and the client 10 may determine information of the test task and information of an event included in the test task according to an option selected by the user in the pull-down menu or information input by the user in the input box.
In another possible implementation, the visual interface further includes an "new event" function control a9 shown in fig. 4, which enables the user to input information of a plurality of events. When the "new event" function control a9 is triggered, the client 10 displays the interface shown in fig. 3, and the user can select or input information of an event on the newly displayed interface. Alternatively, the interface displayed after the function control a9 is triggered may not include the setting item of the test task, for example, the setting item a1 of the test task ID and the setting item a2 of the description information described above.
In another possible implementation manner, after the user sets information of all events included in the task to be tested through the setting interface shown in fig. 3 or fig. 4, the user clicks the "save" control. The client 10 may display the information summary interface shown in fig. 5. Referring to fig. 5, the information summary interface includes aninformation display area 50 and anoperation area 51. Theinformation display area 50 is used for displaying information selected or input by a user, such as an event type, a delay time of an event, a cycle number of an event, and the like. Theoperation area 51 includes amodification control 510 that supports the user to modify corresponding information and a deletion control 511 that supports the user to delete corresponding information.
The embodiment of the present application provides a use case configuration method, which is applicable to the server 20 in the system shown in fig. 2, and as shown in fig. 6, the method includes the following steps:
601, the server receives information of a target test task from a client; the information of the target test task is modifiable information facing the user.
The information of the target test task may be text information input or selected by a user on an interface provided by the client, and is used for describing the requirements of the target test task. The user may also modify the information of the target test task at the client. In specific implementation, the client side provides an automatic testing function for a user, and when the user can input information of a target testing task at the client side, the server receives the information of the target testing task from the client side.
In a possible implementation manner, the requirement of the test task represents a requirement of each event included in the test task, and the information of the test task may include information of each event included in the test task. Wherein the information of the event comprises at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
The type of the event may include a click type, a report event, an input event, a cut-in background event, or other types. The description information of the event is used to describe the event, and may be an event name, for example, the event name is "click user avatar". The information of the control corresponding to the event is used to indicate a control triggered when the event is executed, for example, the event is a "click confirmation control", the control corresponding to the event is a "confirmation" control, and the information of the control corresponding to the event may be an ID of the "confirmation" control. The input information of the input box corresponding to the event is used for indicating the input box for receiving the external information when the event is executed, for example, the event is "input user account password", the control corresponding to the event is a "user name" input box and a "password" input box, and the input information of the input box corresponding to the event may be "user name" and "password". The cycle number of the event may be a total cycle number of the event in the test case corresponding to the event. The delay duration of the event may be in a test case corresponding to the event, and may include a delay duration before the time starts and a delay duration after the event ends.
Referring to fig. 3, the type of the event may be information received by the client through the setting item a3, description information of the event may be information received through the setting item a4, information of the control corresponding to the event may be information received through the setting item a5, input information of the input box corresponding to the event may be information received through the setting item a6, the number of cycles of the event may be information received through the setting item a7, and the delay duration of the event may be information received through the setting item a 8.
In another possible implementation manner, the information of the test task may further include an ID of the test task and description information of the test task. Wherein, the ID of the test task may be the information received by the setting item a1, and the description information of the test task may be the information received by the setting item a 2.
Step 602, the server determines parameters of a target test case according to the information of the target test task; the target test case is used for executing a target test task.
In a specific implementation, the information of the target test task may be in a text format, and the server converts the information in the text format into a programming language to support the requirement of the server for identifying the target test task and determine case parameters according to an identification result, so that a test case matched with the case parameters can be constructed according to the determined case parameters, that is, the target test case according to the embodiment of the application.
In a possible implementation manner, the server encodes information of an event included in the test task, and determines a parameter of the target test case according to an encoded result, where the parameter is an input parameter when the target test case is executed. The information of the event is coded into a character string. It should be noted that the JSON code can convert the information of the event into a character string, and the character string obtained by the JSON code can be transferred between functions, so as to support the server to call each related function to automatically generate the test case. For example, the server may perform JSON coding on information of an event included in the test task, and may determine parameters of the target test case according to a result of the JSON coding.
Step 603, the server writes the parameters of the target test case into the logic code of the target test case to generate the running script of the target test case.
In specific implementation, the server can determine the logic code of the target test case, write the parameters of the target test case into the logic code, and construct the running script of the target test case. When the running script of the target test case is run, the target test case is executed, and the target test task is executed.
In one possible implementation, the logic of the code executing different types of events is different, and the logic code matching the event type may be generated according to the event type. For example, after the server obtains the information of the event included in the task to be tested, the execution method is determined according to the type of the event in the information, and the logic code for executing the target test case is determined according to the execution method. For example, the type of the event is a click event, and the logic code of the target test case can support the click event; or, the type of the event is a reporting event, and the logic code of the target test case can support the reporting type of the event.
In a possible implementation manner, the server calls an Application Program Interface (API) that is open to the outside of the app platform to generate an operation script of the target test case. The Appium platform is an automated testing framework that can be used for testing applications.
In the method provided by the embodiment of the application, after the server generates the running script of the target test case, the server can also instruct the test equipment to run the running script of the target test case so as to execute the target test task.
In specific implementation, the server instructs the test equipment to run the running script of the target test case through the appum to execute the target test task. For example, after the server calls an API that is open to the outside by the app platform to generate an operation script of the target test case, the app uses a WebDriver protocol to drive the test equipment to operate the operation script of the target test case. The operating system supported by the testing equipment is not limited in the embodiment of the application, and can be an iOS, Android or Windows operating system, and the task to be tested can be a testing task on an iOS application program, an Android application program or a Windows application program.
In the method provided by the embodiment of the application, after the server instructs the test equipment to run the running script of the target test case, the server can also obtain the execution result of the target test task and send the execution result to the client.
In specific implementation, after the application platform uses the WebDriver protocol to drive the test equipment to run the running script of the target test case, the server can obtain the execution result of the target test case, that is, the execution result of the target test task. Wherein the execution result of the target test task may be pass or fail.
In the method shown in fig. 6, the server may automatically generate the running script of the test case of the test task according to the information of the test task, and the user may input the information of the test task to realize the automatic implementation of the test case. The automatic generation of the test case is not limited to research and development personnel, the user is not required to have a programming basis, and the test case has high convenience and expandability.
The embodiment of the present application provides a use case configuration method, which is applicable to a client 10 in a system shown in fig. 2, and as shown in fig. 7, the method includes the following steps:
step 701, a client acquires information of a target test task input by a user; the information of the target test task is modifiable information facing the user.
The information of the target test task may be text information input or selected by a user at the client, and is used to describe the requirement of the target test task. In specific implementation, the client provides an automatic test function for a user, and when the user can input information of a target test task at the client, the client can acquire the information of the target test task.
In a possible implementation manner, the requirement of the test task represents a requirement of each event included in the test task, and the information of the test task may include information of each event included in the test task. Wherein the information of the event comprises at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
The type of the event may include a click type, a report event, an input event, a cut-in background event, or other types. The description information of the event is used to describe the event, and may be an event name, for example, the event name is "click user avatar". The information of the control corresponding to the event is used to indicate a control triggered when the event is executed, for example, the event is a "click confirmation control", the control corresponding to the event is a "confirmation" control, and the information of the control corresponding to the event may be an ID of the "confirmation" control. The input information of the input box corresponding to the event is used for indicating the input box for receiving the external information when the event is executed, for example, the event is "input user account password", the control corresponding to the event is a "user name" input box and a "password" input box, and the input information of the input box corresponding to the event may be "user name" and "password". The cycle number of the event may be a total cycle number of the event in the test case corresponding to the event. The delay duration of the event may be in a test case corresponding to the event, and may include a delay duration before the time starts and a delay duration after the event ends.
Referring to fig. 3, the type of the event may be information received by the client through the setting item a3, description information of the event may be information received through the setting item a4, information of the control corresponding to the event may be information received through the setting item a5, input information of the input box corresponding to the event may be information received through the setting item a6, the number of cycles of the event may be information received through the setting item a7, and the delay duration of the event may be information received through the setting item a 8.
In another possible implementation manner, the information of the test task may further include an ID of the test task and description information of the test task. Wherein, the ID of the test task may be the information received by the setting item a1, and the description information of the test task may be the information received by the setting item a 2.
Step 702, the client sends the information of the target test task to the server, so that the server determines the running script of the target test case according to the information of the target test task; the target test case is used for executing a target test task.
In specific implementation, the client sends the information of the target test task to the server through a communication network between the client and the server.
In the method provided by the embodiment of the application, after the test equipment runs the running script of the target test case, the server can obtain the execution result of the target test task, and the client can receive the execution result of the target test task from the server.
In the method shown in fig. 7, the client may receive the information of the test task input by the user, and the client may also send the information of the test task to the server, so that the server automatically generates the running script of the test case of the test task according to the information of the test task. The user inputs the information of the test task to realize the automatic realization of the test case, the automatic generation of the test case is not limited to research personnel, the user is not required to have a programming basis, and the test case has higher convenience and expandability.
An embodiment of the present application provides a use case configuration method, which is applicable to the test system shown in fig. 2, and as shown in fig. 8, the method includes the following steps:
step 801, the client acquires information of the target test task input by the user.
Specifically, the client may provide a visual interface, the user may select or input the information of the target test task in the visual interface, and the client may obtain the information of the target test task.
Step 802, the client sends the information of the target test task to the server.
Specifically, after obtaining the information of the target test task, the client sends the information of the target test task to the server, so that the server automatically customizes the test case according to the information of the target test task.
Step 803, the server receives the information of the target test task from the client, and determines the parameters of the target test case according to the information of the target test task.
And the target test case is used for executing the target test task. Specifically, the information of the target test task may be encoded to obtain a character string, so that the character string may be transferred between functions to construct a logic code of the target test case.
And step 804, the server writes the parameters of the target test case into the logic codes of the target test case to generate the running script of the target test case.
Specifically, after the logic code of the target test case is constructed instep 803, the parameters of the target test case (for example, the character string encoded in step 803) may also be written into the logic code to generate the running script of the target test case.
Step 805, the server instructs the test equipment to run the running script of the target test case to execute the target test task.
Specifically, the server may drive the test device to run a running script of the target test case through the Appium platform. It should be noted that, for the specific implementation related to the method shown in fig. 8, reference is made to the foregoing, and details are not described herein.
In the method shown in fig. 8, the client may receive the information of the test task input by the user, and the client may also send the information of the test task to the server. The server can receive the information of the test task from the client and automatically generate the running script of the test case of the test task according to the information of the test task. The user inputs the information of the test task to realize the automatic realization of the test case, the automatic generation of the test case is not limited to research personnel, the user is not required to have a programming basis, and the test case has higher convenience and expandability.
An embodiment of the present application further provides a use case configuration method, as shown in fig. 9, the method includes the following steps:
step 901, the client acquires the information of the target test task and sends the information of the target test task to the server.
Specifically, the user sets in turn on a setting interface for each event included in the task to be tested, and selects or inputs information of the event, such as an event type, a cycle number of the event, and the like, on a visual interface provided by the client.
Step 902, the server receives the information of the target test task and converts the information of the target test task into data in a JSON format.
Optionally, the server may further store the data in the JSON format in a use case database.
Step 903, the server selects a test device from the device pool.
Specifically, the server selects one device from the device pool to automatically establish connection, and the device can support an ios system or an Android system.
And 904, determining parameters of the target test case according to the JSON format data, and constructing the target test case.
Step 905, determining a corresponding logic code according to the event type, writing parameters of the target test case into the logic code, and obtaining an operation script of the target test case.
For example, referring to FIG. 9, event types include click type, report type, cut-through to background type, and others. And determining corresponding execution logic according to the click type, the report type, the cut-in background type and other types, so that corresponding logic codes can be determined.
And step 906, the server realizes the automatic test of the test equipment through the apium.
Specifically, the server drives the test equipment to run the running script of the target test case through the appium, and automatic testing is performed.
In the automatic test, an event queue is maintained, and for all events included in the target test task, the events are added into the event queue according to the execution sequence of the logic codes corresponding to the events. And according to a first-in first-out principle, running the logic code corresponding to each event until the event queue is empty. And judging whether to delay the execution of the logic code corresponding to the event or not according to the state and the parameters of the event aiming at each event.
Optionally, after step 906, the server may monitor the execution state of the target test case, and send an execution result to the client after the target test case is executed, where the execution result indicates "pass" or "fail".
An embodiment of the present application provides a use case configuration device, which may be a server according to an embodiment of the present application. As shown in fig. 10, the use case configuration apparatus includes: aprocessing unit 1001 and acommunication unit 1002.
Acommunication unit 1002, configured to receive information of a target test task from a client; the information of the target test task is modifiable information facing to a user;
theprocessing unit 1001 is configured to determine parameters of a target test case according to information of a target test task, and write the parameters of the target test case into a logic code of the target test case to generate an operation script of the target test case; and the target test case is used for executing the target test task.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, theprocessing unit 1001 is specifically configured to encode the information of the event, and determine the parameter of the target test case according to the encoded result.
In one embodiment, theprocessing unit 1001 is specifically configured to determine an execution method according to the type of the event, determine a logic code for executing the target test case according to the execution method, and write a parameter of the target test case into the logic code to obtain an operation script of the target test case.
In one embodiment, thecommunication unit 1002 is further configured to instruct the testing device to execute a running script of the target test case to execute the target test task, and further obtain an execution result of the target test task and send the execution result to the client.
The embodiment of the present application provides a use case configuration device, which may be a client in the embodiment of the present application. As shown in fig. 11, the use case configuration apparatus includes: aprocessing unit 1101 and acommunication unit 1102.
Aprocessing unit 1101 for acquiring information of a target test task input by a user; the information of the target test task is modifiable information facing to a user;
thecommunication unit 1102 is configured to send information of the target test task to the server, so that the server determines an operation script of the target test case according to the information of the target test task; the target test case is used for executing a target test task.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, thecommunication unit 1102 is further configured to receive the execution result of the target test task from the server.
The embodiment of the present application further provides a computer device, which may be a server, for example, the cloud server described in the foregoing embodiment of the present application. The internal structure thereof may be as shown in fig. 12. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device may store configuration information, rights information, and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the steps executed by the server in the method shown in fig. 6-9 in the embodiment of the present application.
An embodiment of the present application further provides a computer device, where the computer device may be a client described in the embodiment of the present application, and an internal structure diagram of the computer device may be as shown in fig. 13. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement the steps executed by the client in the method shown in fig. 6 to 9 in the embodiment of the present application. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a control, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In a possible implementation, the display screen may be the setting interface shown in fig. 3, 4 or 5, and the processor may receive information selected or input by the user on the setting interface shown in fig. 3, 4 or 5 through the display screen. The processor may also send information selected or entered by the user to the server through the communication interface.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor enables a server to perform the steps of:
receiving information of a target test task from a client; the information of the target test task is modifiable information facing a user;
determining parameters of a target test case according to the information of the target test task, and writing the parameters of the target test case into a logic code of the target test case to generate an operation script of the target test case; and the target test case is used for executing the target test task.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, the server determines parameters of the target test case according to the information of the target test task, including: and coding the information of the event, and determining the parameters of the target test case according to the coded result.
In one embodiment, the computer program, when executed by the processor, supports the server to determine an event execution method according to the type of the event, and determine the logic code of the target test case according to the event execution method.
In one embodiment, when being executed by the processor, the computer program supports the server to instruct the test device to run the running script of the target test case so as to execute the target test task, and also can obtain the execution result of the target test task and send the execution result to the client.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when executed by a processor, enables a client to carry out the steps of:
acquiring information of a target test task input by a user;
sending the information of the target test task to a server, so that the server determines an operation script of a target test case according to the information of the target test task; the target test case is used for executing a target test task.
In one embodiment, the information of the target test task comprises information of an event included in the target test task; the information of the event includes at least one of: the method comprises the following steps of determining the type of an event, the description information of the event, the information of a control corresponding to the event, the input information of an input box corresponding to the event, the cycle number of the event and the delay duration of the event.
In one embodiment, the computer program, when executed by the processor, enables the client to receive results of the execution of the target test task from the server.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.