CN112631939A - Use case configuration method, use case configuration device, and readable storage medium - Google Patents

Use case configuration method, use case configuration device, and readable storage medium Download PDF

Info

Publication number
CN112631939A
CN112631939A CN202011631526.1A CN202011631526A CN112631939A CN 112631939 A CN112631939 A CN 112631939A CN 202011631526 A CN202011631526 A CN 202011631526A CN 112631939 A CN112631939 A CN 112631939A
Authority
CN
China
Prior art keywords
target test
information
event
test task
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011631526.1A
Other languages
Chinese (zh)
Inventor
熊盛
翁国川
陈俊宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN202011631526.1A priority Critical patent/CN112631939A/en
Publication of CN112631939A publication Critical patent/CN112631939A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The application relates to a use case configuration method, computer equipment and a readable storage medium, and relates to the technical field of software testing. The method comprises the following steps: the server receives information of a target test task from the client, wherein the information of the target test task is modifiable information facing 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; the server can also write 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. When the method is adopted to realize the automatic generation of the test cases, users are not required to have programming bases, and the method is not limited to research and development personnel and has higher convenience and expandability.

Description

Use case configuration method, use case configuration device, and readable storage medium
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a use case configuration method, a use case configuration apparatus, and a readable storage medium.
Background
In software engineering, a tester can determine whether the application software or the software system works normally according to the test case. In order to meet the requirements of different users, diversified design and adjustment can be performed on systems, tools, control, game software and the like, and the test cases are required to be used for continuous testing, so that the final on-line product can highly meet the requirements of the users.
Currently, each automated testing platform is directed to research and development personnel, and the research and development personnel can use an automated testing tool to self-customize an automated testing case according to programming experience or flexibly combine a plurality of cases to test software products or systems and the like. The automatic generation of the current test case requires the intervention and investment of research personnel, requires a certain programming basis for users, and is limited in the convenience and expandability of the platform.
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.
Drawings
Fig. 1 is a schematic diagram of a mobile phone interface provided in an embodiment of the present application;
FIG. 2 is a block diagram of a test system according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a setup interface provided in an embodiment of the present application;
FIG. 4 is another schematic view of a setup interface provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of an information summary interface provided in an embodiment of the present application;
fig. 6 to fig. 9 are schematic flow diagrams of a use case configuration method provided in an embodiment of the present application;
fig. 10 to fig. 11 are schematic structural diagrams of a use case configuration apparatus according to an embodiment of the present application;
fig. 12 to 13 are schematic structural diagrams of a computer device according to an embodiment of the present application.
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 an information display area 50 and an operation area 51. The information 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. The operation area 51 includes a modification 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 in step 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: a processing unit 1001 and a communication unit 1002.
A communication 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;
the processing 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, the processing 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, the processing 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, the communication 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: a processing unit 1101 and a communication unit 1102.
A processing 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;
the communication 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, the communication 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.

Claims (10)

1. A use case configuration method, comprising:
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; 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;
and writing the parameters of the target test case into the logic code of the target test case to generate an operation script of the target test case.
2. The method of claim 1, wherein the information of the target test task comprises information of an event that the target test task comprises; the information of the event comprises at least one of: the type of the event, the description information of the event, the information of the control corresponding to the event, the input information of the input box corresponding to the event, the cycle number of the event, and the delay duration of the event.
3. The method of claim 2, wherein determining parameters of a target test case according to the information of the target test task comprises:
and coding the information of the event, and determining the parameters of the target test case according to the coded result.
4. The method of claim 2, further comprising:
and determining an event execution method according to the type of the event, and determining the logic code of the target test case according to the event execution method.
5. The method according to any one of claims 1-4, further comprising:
instructing the test equipment to run the running script of the target test case so as to execute the target test task;
and acquiring an execution result of the target test task, and sending the execution result to a client.
6. A method for generating a use case, comprising:
acquiring information of a target test task input by a user; the information of the target test task is modifiable information facing a user;
sending the information of the target test task to a server, so that the server generates 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 the target test task.
7. A use case configuration apparatus, comprising:
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 a user;
the processing unit is used for determining parameters of a target test case according to the information of the target test task, 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;
the processing unit is further configured to write the parameters of the target test case into the logic code of the target test case to generate an operation script of the target test case.
8. A use case configuration apparatus, comprising:
the processing unit is used for acquiring information of a target test task input by a user;
the processing unit is used for 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 the target test task.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202011631526.1A 2020-12-31 2020-12-31 Use case configuration method, use case configuration device, and readable storage medium Pending CN112631939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011631526.1A CN112631939A (en) 2020-12-31 2020-12-31 Use case configuration method, use case configuration device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011631526.1A CN112631939A (en) 2020-12-31 2020-12-31 Use case configuration method, use case configuration device, and readable storage medium

Publications (1)

Publication Number Publication Date
CN112631939A true CN112631939A (en) 2021-04-09

Family

ID=75289776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011631526.1A Pending CN112631939A (en) 2020-12-31 2020-12-31 Use case configuration method, use case configuration device, and readable storage medium

Country Status (1)

Country Link
CN (1) CN112631939A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204495A (en) * 2021-05-31 2021-08-03 广州方硅信息技术有限公司 Automatic testing method and device based on B/S architecture, storage medium and equipment
CN113468073A (en) * 2021-08-02 2021-10-01 在线途游(北京)科技有限公司 Automatic testing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040107415A1 (en) * 2002-12-03 2004-06-03 Konstantin Melamed Web-interactive software testing management method and computer system including an integrated test case authoring tool
CN104461895A (en) * 2014-12-17 2015-03-25 广东欧珀移动通信有限公司 Editing method and system of testing sequence and automatic testing system
CN106547689A (en) * 2016-10-20 2017-03-29 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040107415A1 (en) * 2002-12-03 2004-06-03 Konstantin Melamed Web-interactive software testing management method and computer system including an integrated test case authoring tool
CN104461895A (en) * 2014-12-17 2015-03-25 广东欧珀移动通信有限公司 Editing method and system of testing sequence and automatic testing system
CN106547689A (en) * 2016-10-20 2017-03-29 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204495A (en) * 2021-05-31 2021-08-03 广州方硅信息技术有限公司 Automatic testing method and device based on B/S architecture, storage medium and equipment
CN113468073A (en) * 2021-08-02 2021-10-01 在线途游(北京)科技有限公司 Automatic testing method

Similar Documents

Publication Publication Date Title
CN108459792B (en) Flow switching method and device and computer equipment
CN111212388B (en) Method, system and electronic equipment for batch short message sending management
US11456979B2 (en) Automated natural language communication analysis
US11138645B2 (en) Virtualized services discovery and recommendation engine
CN110138573B (en) Conference state prompting method, server, intelligent terminal and storage medium
US20160266880A1 (en) Application name modification method and device, and storage medium
CN112631939A (en) Use case configuration method, use case configuration device, and readable storage medium
CN112015654A (en) Method and apparatus for testing
CN105376719A (en) Information pushing method and device
CN112199007A (en) Menu display method and device, electronic equipment and storage medium
CN109271255A (en) Resource regulating method, system and electronic equipment and storage medium
CN111125205B (en) Signboard data display method, terminal and storage medium
US10108477B2 (en) Mobile device diagnostics
CN109302336B (en) Mail generation method and device, computer equipment and storage medium
CN107807885B (en) Task information display method and device
CN111104331A (en) Software management method, terminal device and computer-readable storage medium
CN114816430A (en) Business code development method, system and computer readable storage medium
CN114265655A (en) Cloud application data processing method, device and system and storage medium
CN113220562A (en) Terminal testing method and device, computer storage medium and electronic equipment
CN113190451A (en) Test method, test device, electronic equipment and storage medium
CN112783796A (en) Single-node testing method and device, computer equipment and readable storage medium
CN110300048B (en) Audio message sending method, equipment and system based on instant messaging
CN112925623A (en) Task processing method and device, electronic equipment and medium
CN112686742A (en) Sales invoice risk early warning method and device, storage medium and electronic equipment
CN112463616A (en) Chaos testing method and device for Kubernetes container platform

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