CN113821424A - Operation recording and playback method and device of application software and electronic equipment - Google Patents

Operation recording and playback method and device of application software and electronic equipment Download PDF

Info

Publication number
CN113821424A
CN113821424A CN202111152094.0A CN202111152094A CN113821424A CN 113821424 A CN113821424 A CN 113821424A CN 202111152094 A CN202111152094 A CN 202111152094A CN 113821424 A CN113821424 A CN 113821424A
Authority
CN
China
Prior art keywords
target
recording
playback
result
application software
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
CN202111152094.0A
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.)
Glodon Co Ltd
Original Assignee
Glodon 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 Glodon Co Ltd filed Critical Glodon Co Ltd
Priority to CN202111152094.0A priority Critical patent/CN113821424A/en
Publication of CN113821424A publication Critical patent/CN113821424A/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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • 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

Landscapes

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

Abstract

The invention relates to the technical field of computer aided design, in particular to an operation recording and playback method of application software and electronic equipment, wherein the recording method comprises the steps of obtaining the binding relationship between operation and command and obtaining target operation; determining a target command corresponding to the target operation based on the binding relationship; and recording the target operation based on the target command, and determining a target recording result. The operation and the command are bound, the corresponding command is considered to be sent when the operation is triggered, and then the recording is triggered, so that the recording of the operation is independent of whether the UI operation is stable or not.

Description

Operation recording and playback method and device of application software and electronic equipment
Technical Field
The invention relates to the technical field of computer aided design, in particular to an operation recording and playback method of application software and electronic equipment.
Background
With the widespread use of computers, computer software plays an indispensable role in the work and life of people. The development difficulty is increased due to the increase of the software scale. In the process of software development, the problem of software function decline is inevitably encountered, and great influence is caused to the efficiency of software development. For the problem of function degradation, development and test personnel usually adopt the modes of writing unit tests, scripts and the like to protect the existing functions. Although the problem of function deterioration is solved to a certain extent, a lot of repeated work is added to development and testing personnel, and a great deal of time and energy are needed.
In the existing operation recording and playback system of application software, the automatic test still mainly depends on the recording and playback of User Interface (UI) operation and the unit test to protect and regress the software function. In the actual development process, the instability of the UI design causes that testers need to continuously maintain scripts, the maintenance cost is too high, and the efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide an operation recording and playback method for application software and an electronic device, so as to solve the problem of low operation recording efficiency caused by UI instability.
According to a first aspect, an embodiment of the present invention provides an operation recording method for application software, including:
acquiring a binding relation between an operation and a command and acquiring a target operation;
determining a target command corresponding to the target operation based on the binding relationship;
and recording the target operation based on the target command, and determining a target recording result.
The operation recording method of the application software, provided by the embodiment of the invention, binds the operation and the command, considers that the corresponding command is sent after the operation is triggered, and further triggers the recording to enable the recording of the operation to be unrelated to whether the UI operation is stable or not.
With reference to the first aspect, in a first implementation manner of the first aspect, the recording the target operation based on the target command, and determining a target recording result includes:
acquiring the type of the target command;
recording the target operation based on the target command to obtain a corresponding recording result;
and storing the recording result based on the type of the target command, and determining the target recording result.
The operation recording method of the application software provided by the embodiment of the invention stores the recording result according to the type of the target command, namely, the recording result is stored in a classified manner, and the subsequent playback in the same mode can be realized according to the same type of recording result during the playback, so that the subsequent playback efficiency can be improved.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the recording the target operation based on the target command to obtain a corresponding recording result includes:
triggering recording based on the target command;
acquiring data generated in the target operation process, wherein the recorded data comprises a target interface image and intermediate data;
and obtaining a corresponding recording result based on the interface image and the intermediate data.
According to the operation recording method of the application software, the target interface image and the intermediate data are stored, the application software can be analyzed according to the change of the interface image and the intermediate data in the subsequent comparison process, and the abnormal point can be conveniently located in time when the abnormality occurs.
With reference to the first implementation manner of the first aspect, in a third implementation manner of the first aspect, the storing the recording result based on the type of the target command, and determining the target recording result includes:
determining a target storage position corresponding to the recording result based on the type of the target command;
and storing the recording result as a preset format to the target storage position, and determining the target recording result.
According to the operation recording method of the application software, the recording result is stored in the target storage position in the preset format, the preset format is convenient for direct reading of data in subsequent playback, and the playback efficiency is improved.
According to a second aspect, an embodiment of the present invention provides an operation playback method for application software, including:
obtaining a playback command and a target recording result corresponding to the playback command, where the target recording result is obtained by recording according to the operation recording method of the application software in the first aspect of the present invention or any embodiment of the first aspect;
performing operation playback based on the playback command, and determining a target playback result;
and determining whether the application software is abnormal or not based on the target recording result and the target playback result.
The operation playback method of the application software provided by the embodiment of the invention carries out operation playback based on the playback command, namely, replaces UI operation by using a command sending mode during playback, and can avoid the influence on playback due to the instability of the UI operation.
With reference to the second aspect, in a first implementation manner of the second aspect, the performing operation playback based on the playback command and determining a target playback result includes:
acquiring the type of the playback command;
determining a playback mode based on the type of the playback command;
and performing operation playback based on the determined playback mode, and determining the target playback result.
According to the operation playback method of the application software, provided by the invention, different playback modes are set according to different types of playback commands, so that the operation playback efficiency is improved.
With reference to the second aspect, in a second implementation manner of the second aspect, the determining whether the application software is abnormal based on the target recording result and the target playback result includes:
comparing the target playback result with corresponding data in the target recording result, wherein the data comprises a target interface image and intermediate data;
determining whether the application software is abnormal based on the comparison result;
when it is determined that the application software is abnormal, determining an abnormal position in the application software based on the comparison result.
According to the operation playback method of the application software, provided by the embodiment of the invention, a screenshot verification mode is added in the playback process, the display effect is protected, and the correctness of the display effect is ensured.
With reference to the second aspect of the second embodiment, in the third embodiment of the second aspect, the comparing the target playback result with the corresponding data in the target recording result includes:
acquiring an actual value in the target playback result;
judging whether a corresponding expected value in the target recording result exists in a cache;
comparing the actual value to the expected value when the expected value is present in the cache.
The operation playback method of the application software provided by the embodiment of the invention can be used for realizing the whole process step by step during playback and verifying the intermediate data and the interface image in real time.
According to a third aspect, an embodiment of the present invention provides an electronic device, including: the recording method comprises a memory and a processor, wherein the memory and the processor are connected with each other in a communication manner, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the recording method for the operation of the application software in the first aspect or any one of the implementation manners of the first aspect, or execute the playback method for the operation of the application software in the second aspect or any one of the implementation manners of the second aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute an operation recording method of application software described in the first aspect or any one of the embodiments of the first aspect, or execute an operation playback method of application software described in the second aspect or any one of the embodiments of the second aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of an operation recording method of application software according to an embodiment of the present invention;
fig. 2 is a flowchart of an operation recording method of application software according to an embodiment of the present invention;
fig. 3 is a flowchart of an operation recording method of application software according to an embodiment of the present invention;
fig. 4 is a flowchart of an operation playback method of application software according to an embodiment of the present invention;
fig. 5 is a flowchart of an operation playback method of application software according to an embodiment of the present invention;
fig. 6 is a flowchart of an operation playback method of application software according to an embodiment of the present invention;
FIGS. 7 a-7 b are flow diagrams of data comparisons according to embodiments of the invention;
fig. 8 is a block diagram of an operation recording apparatus of application software according to an embodiment of the present invention;
fig. 9 is a block diagram of the construction of an operation playback apparatus of application software according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The operation recording method of the application software provided by the embodiment of the invention is used for recording the user operation of the application software. The operation of the user on the application software can be realized through a UI control, can also be realized through view operation, or can be realized through command operation, and the like, and because the user interface of the application software may change at any time in the development process, in order to avoid the instability of UI design to adjust the recording script brought by operation recording, the operation and the command are bound in the embodiment of the invention, and the recording of the user operation is uniformly carried out in a command mode. The application software can be run on an electronic device such as a computer, a mobile phone or a tablet computer, and is not limited herein, and can be specifically set according to actual requirements.
Further, an embodiment of the present invention further provides an operation playback method for application software, which plays back an operation through a playback command, and also avoids UI operations. And obtaining playback data in the playback process, and comparing the playback data with the corresponding recorded data to determine whether the application software is abnormal.
According to an embodiment of the present invention, there is provided an operation recording method of application software or an operation playback method of application software, it should be noted that the steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer executable instructions, and 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.
In this embodiment, an operation recording method of application software is provided, which can be used in electronic devices, such as computers, mobile phones, tablet computers, and the like, and fig. 1 is a flowchart of the operation recording method of application software according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
and S11, acquiring the binding relation between the operation and the command and acquiring the target operation.
The binding relationship between the operation and the command is configured in advance, for example, application software is run on the electronic device, a recording script is stored on the electronic device, and the binding relationship between the operation and the command is configured in the recording script. When the electronic equipment runs the recording script, the electronic equipment can acquire the binding relationship between the operation and the command correspondingly. Wherein the command is characterized in the recording script by the name of the command, for example, operation a-command a 1.
Corresponding to the same operation under different operation types, are distinguished by command names. For example, for a copy operation under a UI control and a copy operation under a view, a distinction needs to be made between them to indicate the difference of the two operations.
In the recording process, when a user performs interactive operation on the electronic device, the electronic device can acquire the user operation accordingly. For recording, it can be set on the recording script which user operations need to be recorded and which operations do not need to be recorded. That is, after the electronic device obtains the user operation, the user operation which does not need to be recorded is filtered, and the target operation is determined.
And S12, determining a target command corresponding to the target operation based on the binding relationship.
After the electronic device determines the target operation, the name of the target operation may be used to query in the binding relationship, and a target command corresponding to the target operation is determined. For the electronic device, the subsequent recording operation is performed based on the target command, and even if the UI design changes, that is, the interface layout changes, the binding relationship between the operation and the command is not affected, that is, the target command corresponding to the target operation does not change.
And S13, recording the target operation based on the target command, and determining the target recording result.
The electronic equipment records the target operation based on the target command, and data generated by the operation or interface image change caused by the operation can be stored in the recording process, so that a target recording result is determined. Optionally, when the recording result is saved, the recording result may be stored separately for the type of the target operation, so as to implement storage by category.
Details about this step will be described later.
According to the operation recording method of the application software, the operation and the command are bound, the corresponding command is considered to be sent when the operation is triggered, and then the recording is triggered, so that the recording of the operation is unrelated to whether the UI operation is stable or not, on the basis, the operation recording can be achieved through a set of scripts, and the operation recording efficiency is improved.
In this embodiment, an operation recording method of application software is provided, which can be used in electronic devices, such as computers, mobile phones, tablet computers, and the like, fig. 2 is a flowchart of the operation recording method of application software according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
and S21, acquiring the binding relation between the operation and the command and acquiring the target operation.
Please refer to S11 in fig. 1, which is not described herein again.
And S22, determining a target command corresponding to the target operation based on the binding relationship.
Please refer to S12 in fig. 1, which is not described herein again.
And S23, recording the target operation based on the target command, and determining the target recording result.
Specifically, S23 includes:
s231, acquiring the type of the target command.
As described above, the target command corresponds to the target operation, and after determining the type of the target operation, the electronic device may determine the type of the target command accordingly. For example, the types of target operations are UI control operations, command operations, and view operations, respectively. Among them, supported UI controls include but are not limited to: buttons (QPushButton), text editing controls (QLineEdit), check boxes (QCheckBox), tree controls (QTreeWidget), and so forth; view operations include, but are not limited to, operations that model a view, and the like.
When the user operates on the UI interface, the electronic equipment can recognize the type of the current user operation. If the current user operation is the target operation, that is, the user operation needing to be recorded, the electronic device may determine the type of the corresponding target command.
And S232, recording the target operation based on the target command to obtain a corresponding recording result.
As described above, the target command corresponds to the target operation, and the target operation is a user operation that needs to be recorded. After the electronic equipment acquires the target command, the electronic equipment indicates that the operation needs to be recorded. Therefore, the target command can be regarded as a command for triggering recording, and the target operation is recorded based on the target command, so that a corresponding recording result can be obtained.
In some optional implementations of this embodiment, the S232 may include:
(1) recording is triggered based on the target command.
(2) And acquiring data generated in the target operation process, wherein the recorded data comprises a target interface image and intermediate data.
(3) And obtaining a corresponding recording result based on the interface image and the intermediate data.
In the recording process, the electronic equipment records data generated by target operation, specifically including interface change caused by the target operation and generated intermediate data. Specifically, the electronic device monitors the interface changes indirectly caused by the target operation, and plays back separately during the playback, including but not limited to the appearance of view size, scale changes, color changes, and the like.
The indirect result refers to an interface change caused during a target operating a function, for example, when an object is dragged in a view, the view may change, and the log system only records the last position of the dragging, so that during playback, before the dragging operation is completed, an additional playback view change is required. Therefore, the electronic device needs to store the screenshot of the target interface image corresponding to the interface change.
In the operation process, the intermediate data is recorded in real time, and is used for data comparison during playback, and the data which needs to be recorded needs to be established by developers. And in the process of recording the script log, images in the view can be intercepted at any time, the log system can store the intercepted images in a specified log directory, and the screenshot operation is recorded in the log. During playback, the log system intercepts images with the same size and the same position at the same time and position for verification, and the correctness of the display effect is ensured.
By storing the target interface image and the intermediate data, the application software can be analyzed according to the change of the interface image and the intermediate data in the subsequent comparison process, so that the abnormal point can be conveniently and timely positioned when the abnormality occurs.
And S233, storing the recording result based on the type of the target command, and determining the target recording result.
And the electronic equipment stores the recording result according to the type of the target command, namely, the recording result is stored in a classified mode, and the target recording result is determined.
In some optional implementations of this embodiment, the S233 may include:
(1) and determining a target storage position corresponding to the recording result based on the type of the target command.
(2) And storing the recording result in a preset format to a target storage position, and determining a target recording result.
The electronic device may be a target storage location corresponding to each type of the target command, and after the electronic device records a recording result corresponding to a certain type of the target command, the recording result is stored in a preset format, and the recording result is stored in the target storage location to determine a target recording result. For example, the electronic device records a target operation to be recorded into a js file in a js statement format, and determines a target recording result.
The recording result is stored in the target storage position in the preset format, the preset format is convenient for direct reading of data in subsequent playback, and the playback efficiency is improved.
According to the operation recording method of the application software, the recording result is stored according to the type of the target command, namely the recording result is stored in a classified mode, the same mode can be played back according to the same type of recording result in the subsequent playback, and the subsequent playback efficiency can be improved.
As a specific implementation manner of this embodiment, as shown in fig. 3, the operation recording method of the application software includes:
(1) events and commands sent by user actions are monitored. As described above, after the electronic device obtains the user operation, the event sent by the user operation may be obtained, and the command of the user operation is determined by using the binding relationship between the operation and the command.
(2) And acquiring the type of the user operation. The type of user operation may be determined by the electronic device in response to the user operation, and may include UI control operations, command operations, and view operations, as described above.
(3) User operations that do not require recording are excluded. User operation needing to be recorded is set in the recording script, and accordingly the user operation needing not to be recorded can be eliminated by the electronic equipment.
(4) And subdividing the user operation to be recorded. The operation types are subdivided in the operations to be recorded, including but not limited to mouse clicks, mouse movements, key operations, and the like.
(5) Interface changes indirectly caused by user operations are monitored. The electronic device can intercept the interface image and the intermediate data corresponding to the interface change to determine a target recording result.
(6) And recording the user operation into a js file in the format of a js statement.
The operation recording method for the application software provided by the embodiment can record the operation flow of the software in real time, and can store the intermediate data and the target interface image in the recording process for comparing whether the behavior is in accordance with the expectation in the playback process.
In this embodiment, an operation recording method of application software is provided, which can be used in electronic devices, such as computers, mobile phones, tablet computers, and the like, fig. 4 is a flowchart of the operation recording method of application software according to the embodiment of the present invention, and as shown in fig. 4, the flowchart includes the following steps:
and S31, acquiring the playback command and the target recording result corresponding to the playback command.
Wherein the target recording result is obtained by recording according to the operation recording method of the application software in any one of the above embodiments. The determination of the target recording result may specifically refer to the above description, and is not described herein again.
As described above, since recording is performed based on a command, the electronic device also performs based on a playback command at the time of playback.
S32, the operation playback is performed based on the playback command, and the target playback result is determined.
The electronic equipment reads the playback commands in sequence, and performs corresponding processing based on the playback commands so as to perform operation playback on the application software and obtain a target playback result. The electronic equipment can store the interface image and the intermediate data in the playback process at the same time and position as the recording time, so that a target playback result is determined.
And S33, determining whether the application software is abnormal or not based on the target recording result and the target playback result.
And the electronic equipment performs corresponding comparison analysis on the target recording result and the target playback result to determine whether the target recording result and the target playback result are the same or not, and if the target recording result and the target playback result are not the same, the electronic equipment can determine that the application software is abnormal. Furthermore, as the target recording result and the target playback result both store corresponding intermediate images or intermediate data, the abnormal point of the application software can be determined based on the result of the comparative analysis, and the accurate positioning of the abnormal point is realized.
According to the operation playback method of the application software, operation playback is carried out based on the playback command, namely the UI operation is replaced by a command sending mode during playback, and the influence on the playback due to instability of the UI operation can be avoided.
In this embodiment, an operation recording method of application software is provided, which can be used in electronic devices, such as computers, mobile phones, tablet computers, and the like, and fig. 5 is a flowchart of the operation recording method of application software according to the embodiment of the present invention, as shown in fig. 5, the flowchart includes the following steps:
and S41, acquiring the playback command and the target recording result corresponding to the playback command.
Wherein the target recording result is obtained by recording according to the operation recording method of the application software in any one of the above embodiments.
Please refer to S31 in fig. 4 for details, which are not described herein.
S42, the operation playback is performed based on the playback command, and the target playback result is determined.
Specifically, S42 includes:
s421, the type of the playback command is acquired.
The determination method of the type of the playback command is similar to the determination method of the target command, and please refer to the above description, which is not repeated herein.
S422, the playback mode is determined based on the type of the playback command.
As described above, the electronic device stores the recorded data based on different types, since the different types correspond to different playback modes. Therefore, the electronic device determines the corresponding playback mode by using the type of the playback command.
And S423, performing operation playback based on the determined playback mode, and determining a target playback result.
If the command operation is recorded, the log system can parse the command and execute the relevant operation through the own command system. If the control operation is performed, the log system repackages the recorded control information and event type into a Qt event, and sends the Qt event to an event queue of the Qt by using the event mechanism of the Qt. If the recorded comparison command is received, the data to be compared is cached in a log system, and when the program is executed to the same position of the recorded comparison command during recording, the playback data is recorded, and the target playback result is determined.
And S43, determining whether the application software is abnormal or not based on the target recording result and the target playback result.
Specifically, S43 includes:
s431, comparing the target playback result with the corresponding data in the target recording result.
Wherein the data includes a target interface image and intermediate data.
And the electronic equipment respectively compares the target interface image in the playback result with the target interface image in the target recording result, compares the intermediate data in the playback result with the intermediate data in the target recording result, and determines a comparison result.
If the intermediate data in the playback result is inconsistent with the intermediate data at the same position of the cache, determining that the intermediate data is an error; if an error of image comparison occurs, the log system stores the current actual image in the playback result and the difference image of the cached image into a log directory together, so that developers can conveniently find the cause of the problem and pop up an error prompt.
In some optional implementations of this embodiment, the S431 may include:
(1) and acquiring an actual value in the target playback result.
(2) And judging whether the cache has a corresponding expected value in the target recording result.
(3) When an expected value is present in the cache, the actual value is compared to the expected value.
After the electronic equipment acquires the actual values at the same time and the same position, the actual values are compared with the corresponding expected values, and then the comparison result can be determined.
Since the electronic device is played back step by step during playback, there may be a case where an actual value is acquired but no expected value is in the cache, or where an expected value is acquired but no actual value is in the cache. However, in the absence of any value, the comparison cannot be performed, and therefore, the corresponding value needs to be stored in a buffer and compared when the corresponding value appears.
As shown in fig. 7a, after acquiring the expected value, the electronic device queries the cache for the corresponding actual value. If the actual value does not exist in the cache, storing the expected value into the cache for waiting; and if the actual value exists in the cache, judging whether the actual value is the same as the expected value. If the two are the same, executing the next playback command; if not, popping up an error prompt.
As shown in fig. 7b, after the electronic device obtains the actual value, the electronic device queries the cache for the corresponding expected value. If the expected value does not exist in the cache, storing the actual value into the cache for waiting; if the expected value exists in the cache, whether the expected value is the same as the actual value is judged. If the two are the same, executing the next playback command; if not, popping up an error prompt.
And the whole process is repeated step by step during playback, and the intermediate data and the interface image are verified in real time.
And S432, determining whether the application software is abnormal or not based on the comparison result.
When determining that the application software is abnormal, executing S433; otherwise, determining that the application software is normal.
And S433, determining the abnormal position in the application software based on the comparison result.
As described above, since the electronic device performs step playback during operation playback, the abnormal position in the application software can be located by using the comparison result of the intermediate data or the target interface image.
According to the operation playback method of the application software, different playback modes are set according to different types of playback commands, and the operation playback efficiency is improved.
As a specific application example of this embodiment, as shown in fig. 6, the operation playback method of the application software includes:
(1) and reading the script file and reading the js statements one by utilizing QScriptEngine of Qt. The electronic equipment performs operation recording and playback of application software based on a Qt mechanism, and step-by-step playback is adopted in the playback process.
(2) And analyzing the js statement, and performing classified playback on different operation types. The electronic equipment performs playback by adopting different playback modes according to different operation types to obtain a target playback result.
(3) Whether data needs to be compared. And comparing the target playback result with the corresponding data in the target recording result at the same time and the same position.
(4) Whether the data is consistent. When the data are consistent, executing the next js statement; when the data is inconsistent, the popup reports an error.
In this embodiment, an operation recording device of application software or an operation playback device of application software is further provided, where the device is used to implement the foregoing embodiments and preferred embodiments, and description thereof is omitted for brevity. 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.
The present embodiment provides an operation recording apparatus for application software, as shown in fig. 8, including:
a first obtaining module 51, configured to obtain a binding relationship between an operation and a command and obtain a target operation;
a first determining module 52, configured to determine, based on the binding relationship, a target command corresponding to the target operation;
and the second determining module 53 is configured to record the target operation based on the target command, and determine a target recording result.
The present embodiment provides an operation playback apparatus of application software, as shown in fig. 9, including:
a second obtaining module 61, configured to obtain a playback command and a target recording result corresponding to the playback command, where the target recording result is obtained by recording according to the operation recording method of the application software in the first aspect of the present invention or any embodiment of the first aspect;
a third determining module 62, configured to perform operation playback based on the playback command, and determine a target playback result;
a fourth determining module 63, configured to determine whether the application software is abnormal based on the target recording result and the target playback result.
The recording device for the operation of the application software or the playback device for the operation of the application software in the present embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices capable of providing the above-mentioned functions.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
An embodiment of the present invention further provides an electronic device, which has the operation recording device of the application software shown in fig. 8 or the operation playback device of the application software shown in fig. 9.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, as shown in fig. 10, the electronic device may include: at least one processor 71, such as a CPU (Central Processing Unit), at least one communication interface 73, memory 74, at least one communication bus 72. Wherein a communication bus 72 is used to enable the connection communication between these components. The communication interface 73 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 73 may also include a standard wired interface and a standard wireless interface. The Memory 74 may be a high-speed RAM Memory (volatile Random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 74 may alternatively be at least one memory device located remotely from the processor 71. Wherein the processor 71 may be in connection with the apparatus described in fig. 8 or 9, an application program is stored in the memory 74, and the processor 71 calls the program code stored in the memory 74 for performing any of the above-mentioned method steps.
The communication bus 72 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 72 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.
The memory 74 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 74 may also comprise a combination of memories of the kind described above.
The processor 71 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of CPU and NP.
The processor 71 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 74 is also used for storing program instructions. The processor 71 may call program instructions to implement an operation recording method of the application software as shown in any embodiment of the present application, or an operation playback method of the application software as shown in any embodiment of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the operation recording method of the application software or the operation playback method of the application software in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. An operation recording method of application software is characterized by comprising the following steps:
acquiring a binding relation between an operation and a command and acquiring a target operation;
determining a target command corresponding to the target operation based on the binding relationship;
and recording the target operation based on the target command, and determining a target recording result.
2. The method for recording the operation of the application software according to claim 1, wherein the recording the target operation based on the target command and determining a target recording result comprises:
acquiring the type of the target command;
recording the target operation based on the target command to obtain a corresponding recording result;
and storing the recording result based on the type of the target command, and determining the target recording result.
3. The method for recording the operation of the application software according to claim 2, wherein the recording the target operation based on the target command to obtain a corresponding recording result comprises:
triggering recording based on the target command;
acquiring data generated in the target operation process, wherein the recorded data comprises a target interface image and intermediate data;
and obtaining a corresponding recording result based on the interface image and the intermediate data.
4. The method for recording operation of application software according to claim 2, wherein the storing the recording result based on the type of the target command, and determining the target recording result comprises:
determining a target storage position corresponding to the recording result based on the type of the target command;
and storing the recording result as a preset format to the target storage position, and determining the target recording result.
5. An operation playback method of application software, comprising:
acquiring a playback command and a target recording result corresponding to the playback command, wherein the target recording result is obtained by recording according to the operation recording method of the application software of any one of claims 1-4;
performing operation playback based on the playback command, and determining a target playback result;
and determining whether the application software is abnormal or not based on the target recording result and the target playback result.
6. The operation playback method of application software according to claim 5, wherein performing operation playback based on the playback command to determine a target playback result comprises:
acquiring the type of the playback command;
determining a playback mode based on the type of the playback command;
and performing operation playback based on the determined playback mode, and determining the target playback result.
7. The operation playback method of application software according to claim 5, wherein the determining whether the application software is abnormal based on the target recording result and the target playback result includes:
comparing the target playback result with corresponding data in the target recording result, wherein the data comprises a target interface image and intermediate data;
determining whether the application software is abnormal based on the comparison result;
when it is determined that the application software is abnormal, determining an abnormal position in the application software based on the comparison result.
8. The method for replaying the operation of application software according to claim 7, wherein the comparing the target replay result with the corresponding data in the target recording result includes:
acquiring an actual value in the target playback result;
judging whether a corresponding expected value in the target recording result exists in a cache;
comparing the actual value to the expected value when the expected value is present in the cache.
9. An electronic device, comprising:
a memory and a processor, wherein the memory and the processor are connected with each other in communication, the memory stores computer instructions, and the processor executes the computer instructions to execute the operation recording method of the application software according to any one of claims 1 to 4 or execute the operation playback method of the application software according to any one of claims 5 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a computer to execute the operation recording method of the application software according to any one of claims 1 to 4 or the operation playback method of the application software according to any one of claims 5 to 8.
CN202111152094.0A 2021-09-29 2021-09-29 Operation recording and playback method and device of application software and electronic equipment Pending CN113821424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111152094.0A CN113821424A (en) 2021-09-29 2021-09-29 Operation recording and playback method and device of application software and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111152094.0A CN113821424A (en) 2021-09-29 2021-09-29 Operation recording and playback method and device of application software and electronic equipment

Publications (1)

Publication Number Publication Date
CN113821424A true CN113821424A (en) 2021-12-21

Family

ID=78921603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111152094.0A Pending CN113821424A (en) 2021-09-29 2021-09-29 Operation recording and playback method and device of application software and electronic equipment

Country Status (1)

Country Link
CN (1) CN113821424A (en)

Similar Documents

Publication Publication Date Title
US10853232B2 (en) Adaptive system for mobile device testing
US9129058B2 (en) Application monitoring through continuous record and replay
CN107239389B (en) Method and device for determining user operation record in hybrid APP
US20150058826A1 (en) Systems and methods for efficiently and effectively detecting mobile app bugs
WO2019161619A1 (en) Automatic interface test method and apparatus, and device and computer-readable storage medium
US20080141221A1 (en) Using recorder technology to find defects in software applications
CN110875858B (en) Application test data grabbing method, system, equipment and storage medium
US20150236799A1 (en) Method and system for quick testing and detecting mobile devices
US10802847B1 (en) System and method for reproducing and resolving application errors
US20130067439A1 (en) Injecting faults into program for testing
CN110879781A (en) Program debugging method and device, electronic equipment and computer readable storage medium
KR20190113050A (en) Method and system for automatic configuration test case generation of mobile application
CN111064610B (en) Log file subscription method, terminal device and storage medium
CN111930703A (en) Automatic log file capturing method and device and computer equipment
CN111414309A (en) Automatic test method of application program, computer equipment and storage medium
CN112817817B (en) Buried point information query method, buried point information query device, computer equipment and storage medium
CN110045952B (en) Code calling method and device
CN108170605A (en) Submission method, client and the computer readable storage medium of bug information
CN109783261B (en) Crash processing method and device for terminal application, electronic equipment and storage medium
EP4160421A1 (en) Method and apparatus for obtaining browser running data, and storage medium
CN109460310B (en) Information collection system, method, equipment and storage medium based on WEB interface
CN113821424A (en) Operation recording and playback method and device of application software and electronic equipment
US20220229718A1 (en) Automated crash recovery
CN111221723B (en) Test record generation method and device, storage medium and electronic equipment
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium

Legal Events

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