CN113934629A - Method and device for obtaining test case, electronic equipment and storage medium - Google Patents

Method and device for obtaining test case, electronic equipment and storage medium Download PDF

Info

Publication number
CN113934629A
CN113934629A CN202111182904.7A CN202111182904A CN113934629A CN 113934629 A CN113934629 A CN 113934629A CN 202111182904 A CN202111182904 A CN 202111182904A CN 113934629 A CN113934629 A CN 113934629A
Authority
CN
China
Prior art keywords
target
test case
restoring
behaviors
time period
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
CN202111182904.7A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111182904.7A priority Critical patent/CN113934629A/en
Publication of CN113934629A publication Critical patent/CN113934629A/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

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 present disclosure provides a method, an apparatus, an electronic device and a storage medium for obtaining a test case, which relate to the technical field of computers and at least solve the technical problem of low test efficiency caused by low probability of recurrence of a problem fed back to a user in the related art. The specific implementation scheme is as follows: restoring a target operation path by using a behavior log acquired in a target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on first equipment in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first equipment to have abnormal operation; and generating a test case based on the target operation path, wherein the test case is used for reproducing an operation exception scene.

Description

Method and device for obtaining test case, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for obtaining a test case, an electronic device, and a storage medium.
Background
After the software product is released, the tester can reproduce the user operation scene according to the collected problem feedback, so that the product problem can be quickly found, and the maintenance can be timely updated.
In the existing scheme, in order to improve the problem recurrence probability, the problem recurrence probability can be communicated with a user who feeds back the problem, the problem occurrence scene and related specific operation are determined, or a tester manually reproduces the problem according to the description of the user. However, the time cost for communicating with the user is large, and the problem of user feedback is difficult to solve in time; when the tester conducts manual reproduction, due to the fact that the using scene and the operation steps of the user are not clear, the reproduction difficulty is high, and a large amount of labor cost needs to be consumed.
Disclosure of Invention
The disclosure provides a method, a device, an electronic device and a storage medium for obtaining a test case, so as to at least solve the technical problem of low test efficiency caused by low recurrence probability of a problem fed back to a user in the related art.
According to an aspect of the present disclosure, a method for obtaining a test case is provided, including: restoring a target operation path by using a behavior log acquired in a target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on first equipment in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first equipment to have abnormal operation; and generating a test case based on the target operation path, wherein the test case is used for reproducing an operation exception scene.
According to another aspect of the present disclosure, an apparatus for obtaining a test case is provided, including: the restoring module is used for restoring a target operation path by using the behavior log acquired in the target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on the first equipment in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first equipment to have abnormal operation; and the obtaining module is used for generating a test case based on the target operation path, wherein the test case is used for reproducing an operation abnormal scene.
According to still another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for obtaining the test case provided by the disclosure.
According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, in which computer instructions are stored, wherein the computer instructions are used for causing a computer to execute the method for obtaining a test case proposed by the present disclosure.
According to yet another aspect of the present disclosure, a computer program product is provided, which includes a computer program that is executed by a processor to perform the method for obtaining test cases set forth in the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a block diagram of a hardware structure of a computer terminal (or mobile device) for implementing a method for obtaining test cases according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram of a method of obtaining test cases according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of obtaining a target operation path according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a process for obtaining a target operation path according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an apparatus for obtaining a test case according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
With the development of computer technology and software technology, testing work has become one of the important links in the development process of software products. Testers typically perform testing using test cases, which are a set of test inputs, execution conditions, and expected results tailored for a particular purpose in order to test a certain program path or verify that a certain specific requirement is met.
In order to reproduce the problem of user feedback in the existing scheme, the following two schemes are generally adopted:
the first scheme is as follows: an exhaustive problem occurs according to the user feedback operation scenario. The scheme is suitable for the scene that the user can clearly and accurately describe the scene of the problem, the operation before the problem occurs and the equipment information when the problem occurs. The application scene of the scheme has high requirements on users, the users are required to clearly describe problems, and the operation path is clear. Therefore, the application range of the scheme is limited, the time cost for communicating with the user in actual operation is high, the user is not a professional tester, the description of the problem is not accurate enough, and finally the effect of reproducing the problem is poor.
Scheme II: and analyzing the user behavior log. The scheme is used in a scene that the user is difficult to contact and the problem description is not clear. Specifically, an operation log of the user in the problem feedback time period is obtained through the equipment mark of the user, and relevant testing personnel analyze the operation log to further obtain an operation path to reproduce the problem. The requirement of the scheme on the testers is high, and the problem that the user feedback distribution is not accurate easily occurs because the problem description is generally not clear enough during the user feedback. In addition, a user may browse and operate a plurality of service scenes in a time period, rather than being limited to operate in a single scene, and services are mutually decoupled in development and testing, so that testers cannot understand logs of non-local services, analysis of user behavior logs is difficult, multi-party communication is needed, manpower is wasted, and problem closed-loop time is prolonged.
The existing scheme can not realize high-efficiency reproduction of the problem of user feedback, and has the technical problem of low test efficiency.
In accordance with an embodiment of the present disclosure, there is provided a method for obtaining test cases, it should be noted that the steps shown in the flowchart of the figure may be executed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that here.
The method embodiments provided by the embodiments of the present disclosure may be executed in a mobile terminal, a computer terminal or similar electronic devices. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein. Fig. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing the method for obtaining test cases.
As shown in fig. 1, the computer terminal 100 includes a computing unit 101 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)102 or a computer program loaded from a storage unit 108 into a Random Access Memory (RAM) 103. In the RAM 103, various programs and data necessary for the operation of the computer terminal 100 can also be stored. The computing unit 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input/output (I/O) interface 105 is also connected to bus 104.
A number of components in the computer terminal 100 are connected to the I/O interface 105, including: an input unit 106 such as a keyboard, a mouse, and the like; an output unit 107 such as various types of displays, speakers, and the like; a storage unit 108, such as a magnetic disk, optical disk, or the like; and a communication unit 109 such as a network card, modem, wireless communication transceiver, etc. The communication unit 109 allows the computer terminal 100 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Computing unit 101 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 101 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 101 performs the method of obtaining test cases described herein. For example, in some embodiments, the method of obtaining test cases may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 108. In some embodiments, part or all of the computer program may be loaded and/or installed onto the computer terminal 100 via the ROM 102 and/or the communication unit 109. When loaded into RAM 103 and executed by computing unit 101, a computer program may perform one or more steps of the method of obtaining test cases described herein. Alternatively, in other embodiments, the computing unit 101 may be configured to perform the method of obtaining test cases by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here can be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
It should be noted here that in some alternative embodiments, the electronic device shown in fig. 1 may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in the electronic device described above.
In the above operating environment, the present disclosure provides a method for obtaining test cases as shown in fig. 2, which may be executed by a computer terminal or similar electronic device as shown in fig. 1. Fig. 2 is a flowchart of a method for obtaining a test case according to an embodiment of the present disclosure. As shown in fig. 2, the method may include the steps of:
step S20, restoring a target operation path by using the behavior log acquired in the target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on the first device in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first device to have abnormal operation;
the target time period may be a time period of a preset time length before and after a time node when the first device is abnormal in operation, wherein the preset time length may be flexibly adjusted according to actual requirements.
The behavior log includes a plurality of operation behaviors performed on the first device within the target time period, for example, the plurality of operation behaviors may include, for example, clicking a button or a picture on a user interface, performing a refresh, pulling down logic, and the like. The behavior log further includes information such as device identification and operation time of the first device.
The first device may be any electronic device used by a user, such as a mobile phone, a tablet, and the like.
Specifically, the implementation process of restoring the target operation path by using the behavior log obtained in the target time period may refer to further description of the embodiment of the present disclosure, and is not repeated here.
And step S22, generating a test case based on the target operation path, wherein the test case is used for reproducing an operation exception scene.
Optionally, the target operation path is mapped to a test case. The test case may be an automation case.
Specifically, the implementation process of generating the test case based on the target operation path may refer to further description of the embodiments of the present disclosure, and is not repeated herein.
According to the present disclosure, in the above steps S20 to S22, restoring a target operation path by using the behavior log acquired in the target time period, where the target operation path is used to describe a plurality of operation behaviors executed on the first device in the target time period, and at least one of the plurality of operation behaviors triggers an operation abnormality of the first device; the test case is generated based on the target operation path, wherein the test case is used for reproducing an abnormal operation scene, the purpose of quickly reproducing the problem of user feedback is achieved, the effect of improving the problem reproduction probability of user feedback and further improving the test efficiency is achieved, and the technical problem that the test efficiency is low due to the fact that the problem reproduction probability of user feedback is low in the related technology is solved.
The method for obtaining a test case according to the embodiment of the present disclosure is further described below.
As an optional implementation manner, the method for obtaining a test case further includes:
and step S24, controlling a plurality of second devices to run test cases so as to reproduce an abnormal operation scene.
The second device can be a device for testing personnel to perform testing work, and can be used for running a generated test case and reproducing an abnormal operation scene. And a plurality of second devices are adopted to run the test cases, so that the test efficiency is effectively improved.
As an optional implementation manner, the method for obtaining a test case further includes:
step S26, in response to that at least one of the plurality of second devices reproduces an abnormal operation scenario in the process of running the test case, controlling the at least one second device to send out an alarm prompt message.
The alarm prompt information can be used for prompting the operation executed by the second equipment when the abnormal operation scene appears, and assisting a tester to quickly reproduce the problem fed back by the user.
Optionally, when at least one of the plurality of second devices reproduces an abnormal operation scene in the process of running the test case, the display component and/or the audio component of the at least one second device is controlled to send out an alarm prompt message. For example, when at least one second device reproduces an abnormal operation scene in the process of running the test case, the alarm prompt information popup window may be displayed on the graphical user interface of the second device, and the audio component of the second device is controlled to send out a voice prompt such as "abnormal operation" and the like, so as to prompt the tester to quickly find the second device with the abnormal operation scene.
As an alternative implementation, in step S20, the implementation process of restoring the target operation path by using the behavior log acquired in the target time period may be as shown in fig. 3, and includes:
step S200, determining the equipment identification of the first equipment;
the device identifier of the first device may be manually input by a tester or automatically obtained by a test system.
Step S202, acquiring a behavior log in a target time period based on the equipment identification;
for example, the operation behavior of the user can be obtained through a point burying mode and the like when the product is released, the point burying mode can be used for collecting information such as the display amount, the click amount and the browsing time of the user, the use condition of the product by the user can be accurately known through the point burying mode, and therefore optimization iteration and income calculation conditions of the product are conducted. When the problem fed back by the user is received and the user cannot accurately describe the problem recurrence path, the behavior log of the user in the target time period can be obtained through the identification of the first device.
And step S204, sequentially restoring a plurality of operation behaviors by using the behavior log to obtain a target operation path.
In the above steps S200 to S204, the behavior log in the target time period is obtained through the device identifier of the first device, so that a plurality of operation behaviors executed in the target time period are restored according to the behavior log when the first device has an abnormal operation scene, and the target operation path is finally obtained, so that the feedback problem of the user can be accurately located, and the operation path where the problem occurs can be quickly restored.
The following describes an implementation process of restoring the target operation path by using the behavior log obtained in the target time period, with reference to fig. 4.
Fig. 4 is a schematic process diagram for obtaining a target operation path according to an embodiment of the present disclosure. As shown in fig. 4, after obtaining the device identifier of the first device, the device identifier of the first device may be used for querying. For example, there are buried points for monitoring user behaviors at the end, the front end, and the back end, and after querying at the end, the front end, and the back end according to the device identifier of the first device, behavior logs in a target time period are obtained, and a plurality of operation behaviors are sequentially restored by using the behavior logs to obtain a target operation path.
As an alternative implementation, in step S204, sequentially restoring a plurality of operation behaviors by using the behavior log includes:
step S2040, analyzing the behavior log, and acquiring an object identifier and an operation identifier corresponding to each operation behavior in the plurality of operation behaviors;
step S2042, sequentially restoring a plurality of operation behaviors by using the object identifier and the operation identifier.
For example, there are three refresh modes on a page, the operation identifiers corresponding to the three refresh modes are mode a, mode B, and mode C, the object identifiers corresponding to them are point location 1, point location 2, and point location 3, and when a user executes refresh mode a, a behavior log is recorded at point location 1. Analyzing the behavior log to obtain an object identifier and an operation identifier corresponding to each operation behavior in the plurality of operation behaviors, and when the behavior log is viewed and analyzed, the information of the point 1 represents that a user carries out a refreshing mode A on the page, namely the recovery of the operation behavior of the user is completed.
As an optional implementation manner, in step S22, generating a test case based on the target operation path includes: and recording the target operation path to generate a test case.
The method for acquiring the test case provided by the embodiment of the disclosure can effectively reduce the user feedback closed-loop time, reduce the time cost for communication with the user, and reduce the technical threshold for processing the user feedback problem through the user behavior log, can also reproduce the problem through the automatic case even if the service log is not familiar, and meanwhile, the test case is operated by adopting a plurality of second devices, thereby effectively improving the problem reproduction probability and reducing the labor cost input by manual testing.
The method comprises the steps that a target operation path is restored by utilizing a behavior log acquired in a target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on first equipment in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first equipment to have abnormal operation; the test case is generated based on the target operation path, wherein the test case is used for reproducing an abnormal operation scene, the purpose of quickly reproducing the problem of user feedback is achieved, the effect of improving the problem reproduction probability of user feedback and further improving the test efficiency is achieved, and the technical problem that the test efficiency is low due to the fact that the problem reproduction probability of user feedback is low in the related technology is solved.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the methods according to the embodiments of the present disclosure.
The present disclosure further provides a device for obtaining a test case, where the device is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of an apparatus for obtaining test cases according to an embodiment of the present disclosure, and as shown in fig. 5, an apparatus 500 for obtaining test cases includes: a restoring module 501 and an obtaining module 502.
The restoring module 501 is configured to restore a target operation path by using a behavior log acquired in a target time period, where the target operation path is used to describe a plurality of operation behaviors executed on a first device in the target time period, and at least one of the plurality of operation behaviors triggers an operation exception to occur in the first device;
the obtaining module 502 is configured to generate a test case based on the target operation path, where the test case is used to reproduce an operation exception scenario.
Optionally, the apparatus 500 for obtaining a test case further includes: the control module 503 is configured to control the multiple second devices to run the test cases so as to reproduce an abnormal operation scenario.
Optionally, the control module 503 is further configured to control at least one second device to send an alarm prompt message in response to that the at least one second device among the plurality of second devices reproduces an abnormal operation scenario in the process of running the test case.
Optionally, the restoring module 501 includes: a determining unit 5011 configured to determine a device identifier of the first device; an obtaining unit 5012, configured to obtain a behavior log in a target time period based on the device identifier; the restoring unit 5013 is configured to sequentially restore a plurality of operation behaviors by using the behavior log to obtain the target operation path.
Optionally, the restoring module 501 is configured to analyze the behavior log to obtain an object identifier and an operation identifier corresponding to each of the plurality of operation behaviors; and sequentially restoring a plurality of operation behaviors by using the object identifier and the operation identifier.
Optionally, the obtaining module 502 is further configured to record the target operation path, and generate a test case.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
According to an embodiment of the present disclosure, there is also provided an electronic device including a memory having stored therein computer instructions and at least one processor configured to execute the computer instructions to perform the steps in any of the above method embodiments.
Optionally, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present disclosure, the processor may be configured to execute the following steps by a computer program:
s1, restoring a target operation path by using the behavior log acquired in the target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on the first device in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first device to have abnormal operation;
s2, generating a test case based on the target operation path, wherein the test case is used for reproducing an operation exception scene.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
According to an embodiment of the present disclosure, there is also provided a non-transitory computer readable storage medium having stored therein computer instructions, wherein the computer instructions are arranged to perform the steps in any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned non-transitory computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, restoring a target operation path by using the behavior log acquired in the target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on the first device in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first device to have abnormal operation;
s2, generating a test case based on the target operation path, wherein the test case is used for reproducing an operation exception scene.
Alternatively, in the present embodiment, the non-transitory computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The present disclosure also provides a computer program product according to an embodiment of the present disclosure. Program code for implementing the audio processing methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the above embodiments of the present disclosure, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present disclosure, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
The foregoing is merely a preferred embodiment of the present disclosure, and it should be noted that modifications and embellishments could be made by those skilled in the art without departing from the principle of the present disclosure, and these should also be considered as the protection scope of the present disclosure.

Claims (13)

1. A method for obtaining test cases comprises the following steps:
restoring a target operation path by using a behavior log acquired in a target time period, wherein the target operation path is used for describing a plurality of operation behaviors executed on first equipment in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first equipment to have abnormal operation;
and generating a test case based on the target operation path, wherein the test case is used for reproducing an operation exception scene.
2. The method of claim 1, further comprising:
and controlling a plurality of second devices to run the test cases so as to reproduce the operation abnormal scene.
3. The method of claim 2, further comprising:
and controlling at least one second device to send out alarm prompt information in response to the situation that the operation exception scene reappears in the process of running the test case by at least one second device in the plurality of second devices.
4. The method of claim 1, wherein restoring the target operation path using the behavior log obtained within the target time period comprises:
determining a device identification of the first device;
acquiring the behavior log in the target time period based on the equipment identification;
and sequentially restoring the plurality of operation behaviors by using the behavior log to obtain the target operation path.
5. The method of claim 4, wherein sequentially restoring the plurality of operational behaviors using the behavior log comprises:
analyzing the behavior log to obtain an object identifier and an operation identifier corresponding to each operation behavior in the plurality of operation behaviors;
and sequentially restoring the plurality of operation behaviors by using the object identifier and the operation identifier.
6. The method of claim 1, wherein generating the test case based on the target operational path comprises:
and recording the target operation path to generate the test case.
7. An apparatus for obtaining test cases, comprising:
the device comprises a restoring module, a processing module and a processing module, wherein the restoring module is used for restoring a target operation path by using a behavior log acquired in a target time period, the target operation path is used for describing a plurality of operation behaviors executed on first equipment in the target time period, and at least one operation behavior in the plurality of operation behaviors triggers the first equipment to have abnormal operation;
and the obtaining module is used for generating a test case based on the target operation path, wherein the test case is used for reproducing an operation abnormal scene.
8. The apparatus of claim 7, wherein the reduction module comprises:
a determining unit, configured to determine a device identifier of the first device;
an obtaining unit, configured to obtain the behavior log in the target time period based on the device identifier;
and the restoring unit is used for sequentially restoring the plurality of operation behaviors by using the behavior log to obtain the target operation path.
9. The apparatus according to claim 8, wherein the restoring module is further configured to parse the behavior log to obtain an object identifier and an operation identifier corresponding to each of the plurality of operation behaviors; and sequentially restoring the plurality of operation behaviors by using the object identifier and the operation identifier.
10. The apparatus of claim 7, wherein the obtaining module is further configured to record the target operation path to generate the test case.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202111182904.7A 2021-10-11 2021-10-11 Method and device for obtaining test case, electronic equipment and storage medium Pending CN113934629A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111182904.7A CN113934629A (en) 2021-10-11 2021-10-11 Method and device for obtaining test case, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111182904.7A CN113934629A (en) 2021-10-11 2021-10-11 Method and device for obtaining test case, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113934629A true CN113934629A (en) 2022-01-14

Family

ID=79278513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111182904.7A Pending CN113934629A (en) 2021-10-11 2021-10-11 Method and device for obtaining test case, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113934629A (en)

Similar Documents

Publication Publication Date Title
US10048995B1 (en) Methods and apparatus for improved fault analysis
CN104598380A (en) Method and system for automatic testing based on control
CN112000806A (en) Abnormal log monitoring and analyzing method, system, equipment and storage medium
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
CN112115038A (en) Application testing method and device and storage medium
CN106713011B (en) Method and system for obtaining test data
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN111259212B (en) Telemetering data interpretation method, device, equipment and storage medium
CN111324480B (en) Large-scale host transaction fault positioning system and method
CN113792341A (en) Privacy compliance automation detection method, device, equipment and medium for application program
US20150066965A1 (en) Data processing, data collection
CN108647284B (en) Method and device for recording user behavior, medium and computing equipment
CN111381995A (en) Method and device for restoring user operation and computer
CN115345600B (en) RPA flow generation method and device
CN113934629A (en) Method and device for obtaining test case, electronic equipment and storage medium
CN111176944A (en) Block chain intelligent contract calling record analysis method, device, terminal and storage medium
CN113934595A (en) Data analysis method and system, storage medium and electronic terminal
CN111274143B (en) Buried point test method, buried point test device, buried point test equipment and storage medium
CN114706371A (en) Complete vehicle network non-dormancy diagnosis method and device, electronic equipment and storage medium
CN114372003A (en) Test environment monitoring method and device and electronic equipment
CN114049065A (en) Data processing method, device and system
CN112541011A (en) Power grid terminal fault processing method and device based on RPA and AI
CN112162954A (en) User operation log generation method, user operation log generation device
CN114253867B (en) Automatic testing method, device and system based on neural network model
CN111208993B (en) Flow data analysis processing system

Legal Events

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