CN108255691B - Thermodynamic diagram display method and device - Google Patents

Thermodynamic diagram display method and device Download PDF

Info

Publication number
CN108255691B
CN108255691B CN201810083613.4A CN201810083613A CN108255691B CN 108255691 B CN108255691 B CN 108255691B CN 201810083613 A CN201810083613 A CN 201810083613A CN 108255691 B CN108255691 B CN 108255691B
Authority
CN
China
Prior art keywords
software
behavior
tested
page
operation page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810083613.4A
Other languages
Chinese (zh)
Other versions
CN108255691A (en
Inventor
王辉
姚垒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201810083613.4A priority Critical patent/CN108255691B/en
Publication of CN108255691A publication Critical patent/CN108255691A/en
Application granted granted Critical
Publication of CN108255691B publication Critical patent/CN108255691B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3438Recording 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 monitoring of user actions
    • 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
    • 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

Abstract

The invention provides a thermodynamic diagram display method and a thermodynamic diagram display device, wherein the thermodynamic diagram display method comprises the following steps: collecting user behavior data corresponding to software to be tested, wherein the user behavior data comprises: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of software to be tested, an event type, identification of an operation control on the operation page and position information of an operation point are obtained; acquiring first user behavior data comprising the identification of the operation page aiming at each operation page, and further determining behavior flow corresponding to each operation control and/or each operation point on the operation page; and sending the thermal values corresponding to the operation controls and/or the operation points on the current operation page to the terminal equipment so that the terminal equipment draws and displays the thermodynamic diagrams on the current operation page, thereby realizing the drawing and displaying of the thermodynamic diagrams based on the user behavior data corresponding to the software to be tested, enabling testers to easily know the functions focused by the users, compiling test cases pertinently and improving the test efficiency.

Description

Thermodynamic diagram display method and device
Technical Field
The invention relates to the technical field of internet, in particular to a thermodynamic diagram display method and device.
Background
At present, the automatic test case corresponding to the APP is directly written aiming at each function of the APP by manpower, and the function focused by the APP user is difficult to obtain, so that the automatic test case is difficult to effectively test aiming at the function focused by the user, and the test efficiency is reduced.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, the first objective of the present invention is to provide a thermodynamic diagram demonstration method, which is used for solving the problem of poor testing efficiency in the prior art.
A second object of the invention is to propose another thermodynamic diagram representation method.
A third object of the invention is to propose a thermodynamic diagram display device.
A fourth object of the invention is to propose another thermodynamic diagram display device.
A fifth object of the invention is to propose another thermodynamic diagram display device.
A sixth object of the invention is to propose another thermodynamic diagram display device.
A seventh object of the invention is to propose a non-transitory computer-readable storage medium.
An eighth object of the invention is to propose another non-transitory computer-readable storage medium.
A ninth object of the invention is to propose a computer program product.
A tenth object of the invention is to propose another computer program product.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a thermodynamic diagram displaying method, including:
collecting user behavior data corresponding to software to be tested; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of the software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained;
acquiring first user behavior data comprising the identification of the operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data;
receiving an acquisition request sent by terminal equipment; the obtaining request comprises: presetting a time period, an identifier of the software to be tested and an identifier of a current operation page;
determining a thermal value corresponding to each operation control and/or each operation point on the current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period;
and sending the thermal value corresponding to each operation control and/or each operation point on the current operation page to the terminal equipment so that the terminal equipment draws and displays a thermodynamic diagram on the current operation page.
Further, the determining, according to the first user behavior data, behavior flows corresponding to each operation control and/or each operation point on the operation page includes:
acquiring the quantity of second user behavior data of each event occurrence time including the identification of the operation control and/or the position information of the operation point aiming at each operation control and/or each operation point;
and determining the number of the occurrence time of each event as the behavior flow corresponding to the operation control and/or the operation point at the occurrence time of each event.
Further, the user behavior data further includes: the behavior sequence group represents user behaviors in the process from starting the software to be tested to closing the software to be tested;
the method further comprises the following steps:
acquiring third user behavior data comprising the identification of the behavior sequence group aiming at each behavior sequence group; sequencing the third user behavior data according to event occurrence time to obtain a sequential behavior sequence set corresponding to the behavior sequence group;
screening the ordered behavior sequence set by adopting a width-first search algorithm BFS to obtain the shortest path from a first operation page of the software to be tested to a target operation page in the ordered behavior sequence set;
determining a group of switching behavior sequences corresponding to the shortest path according to the shortest path and switching sequences among all operation pages in the shortest path;
analyzing the switching behavior sequence by adopting a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence;
and combining the program fragment and the program template to generate an automatic test case.
Further, the determining a group of switching behavior sequences corresponding to the shortest path according to the shortest path and the switching sequences between the operation pages in the shortest path includes:
acquiring the identifiers of any two adjacent operation pages in the shortest path;
inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages;
acquiring a heat value of the at least one switching behavior within a preset time range, and determining the switching behavior with the highest corresponding heat value as the switching behavior between two adjacent operation pages;
and combining the switching behaviors between any two adjacent operation pages to obtain the switching behavior sequence.
According to the thermodynamic diagram display method, user behavior data corresponding to software to be tested are collected; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained; acquiring first user behavior data comprising an identifier of an operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data; receiving an acquisition request sent by terminal equipment; the acquisition request comprises the following steps: presetting a time period, an identifier of software to be tested and an identifier of a current operation page; determining a thermal value corresponding to each operation control and/or each operation point on a current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period; the thermodynamic values corresponding to the operation controls and/or the operation points on the current operation page are sent to the terminal equipment, so that the terminal equipment draws and displays thermodynamic diagrams on the current operation page, the thermodynamic diagrams on the pages of the software to be tested are obtained based on user behavior data corresponding to the software to be tested, and testers can easily know the important attention function of the users based on the thermodynamic diagrams, so that the automatic test cases are written in a targeted manner, and the test efficiency of the automatic test cases is improved.
In order to achieve the above object, a second aspect of the present invention provides a thermodynamic diagram display method, including:
the method comprises the steps of obtaining a thermodynamic diagram display request of a terminal device user, wherein the thermodynamic diagram display request comprises: displaying the time period and the identifier of the software to be displayed;
running the software to be displayed on the terminal equipment according to the thermodynamic diagram display request;
monitoring and acquiring a current operation page of the software to be displayed, reporting an acquisition request comprising the display time period, the identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period;
and drawing and displaying a thermodynamic diagram on the current operation page according to the thermodynamic values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period.
Further, the acquiring a thermodynamic diagram display request of a terminal device user includes:
displaying a time period selection interface, and acquiring a display time period selected by a user on the time period selection interface;
displaying a software selection interface, and acquiring software to be displayed selected on the software selection interface by a user;
when the preset user behavior is monitored, the preset user behavior is identified as a thermodynamic diagram display request.
According to the thermodynamic diagram display method, a thermodynamic diagram display request of a terminal device user is obtained, wherein the thermodynamic diagram display request comprises the following steps: displaying the time period and the identifier of the software to be displayed; running software to be displayed on the terminal equipment according to the thermodynamic diagram display request; monitoring and acquiring a current operation page of software to be displayed, reporting an acquisition request comprising a display time period, an identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period; according to the heat force values corresponding to the operation controls and/or the operation points on the operation page of the software to be displayed in the display time period, the thermodynamic diagrams are drawn and displayed on the current operation page, so that the corresponding thermodynamic diagrams can be displayed on the current operation page of the software to be displayed according to the display time period and the software to be displayed selected by the tester in the process that the tester uses the software to be displayed, the thermodynamic diagrams can easily know the functions focused by the user on each operation page, the automatic test cases can be written pertinently, and the test efficiency of the automatic test cases is improved.
In order to achieve the above object, a third aspect of the present invention provides a thermodynamic diagram display apparatus, including:
the acquisition module is used for acquiring user behavior data corresponding to the software to be tested; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of the software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained;
the acquisition module is used for acquiring first user behavior data comprising the identification of the operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data;
the receiving module is used for receiving an acquisition request sent by the terminal equipment; the obtaining request comprises: presetting a time period, an identifier of the software to be tested and an identifier of a current operation page;
the determining module is used for determining the thermal value corresponding to each operation control and/or each operating point on the current operation page of the software to be tested according to the behavior flow corresponding to each operation control and/or each operating point on the current operation page of the software to be tested in a preset time period;
and the sending module is used for sending the thermal values corresponding to the operation controls and/or the operation points on the current operation page to the terminal equipment so that the terminal equipment draws and displays the thermodynamic diagram on the current operation page.
Further, the obtaining module is specifically configured to,
acquiring the quantity of second user behavior data of each event occurrence time including the identification of the operation control and/or the position information of the operation point aiming at each operation control and/or each operation point;
and determining the number of the occurrence time of each event as the behavior flow corresponding to the operation control and/or the operation point at the occurrence time of each event.
Further, the user behavior data further includes: the behavior sequence group represents user behaviors in the process from starting the software to be tested to closing the software to be tested;
the device further comprises: the device comprises a sorting module, a screening module, an analyzing module and a generating module;
the sorting module is used for acquiring third user behavior data comprising the identification of the behavior sequence group aiming at each behavior sequence group; sequencing the third user behavior data according to event occurrence time to obtain a sequential behavior sequence set corresponding to the behavior sequence group;
the screening module is used for screening the ordered behavior sequence set by adopting a width-first search algorithm BFS to obtain the shortest path from a first operation page to a target operation page of the software to be tested in the ordered behavior sequence set;
the determining module is further configured to determine a group of switching behavior sequences corresponding to the shortest path according to the shortest path and the switching sequences between the operation pages in the shortest path;
the analysis module is used for analyzing the switching behavior sequence by adopting a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence;
and the generating module is used for generating the automatic test case by combining the program fragment and the program template.
Further, the determining module is specifically configured to,
acquiring the identifiers of any two adjacent operation pages in the shortest path;
inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages;
acquiring a heat value of the at least one switching behavior within a preset time range, and determining the switching behavior with the highest corresponding heat value as the switching behavior between two adjacent operation pages;
and combining the switching behaviors between any two adjacent operation pages to obtain the switching behavior sequence.
According to the thermodynamic diagram display device, user behavior data corresponding to software to be tested are collected; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained; acquiring first user behavior data comprising an identifier of an operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data; receiving an acquisition request sent by terminal equipment; the acquisition request comprises the following steps: presetting a time period, an identifier of software to be tested and an identifier of a current operation page; determining a thermal value corresponding to each operation control and/or each operation point on a current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period; the thermodynamic values corresponding to the operation controls and/or the operation points on the current operation page are sent to the terminal equipment, so that the terminal equipment draws and displays thermodynamic diagrams on the current operation page, the thermodynamic diagrams on the pages of the software to be tested are obtained based on user behavior data corresponding to the software to be tested, and testers can easily know the important attention function of the users based on the thermodynamic diagrams, so that the automatic test cases are written in a targeted manner, and the test efficiency of the automatic test cases is improved.
In order to achieve the above object, a fourth aspect of the present invention provides a thermodynamic diagram display apparatus, including:
the acquisition module is used for acquiring a thermodynamic diagram display request of a terminal device user, wherein the thermodynamic diagram display request comprises: displaying the time period and the identifier of the software to be displayed;
the operating module is used for operating the software to be displayed on the terminal equipment according to the thermodynamic diagram display request;
the acquisition module is further configured to monitor and acquire a current operation page of the software to be displayed, report an acquisition request including the display time period, an identifier of the software to be displayed, and the identifier of the current operation page, and acquire a thermal value corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period;
and the display module is used for drawing and displaying a thermodynamic diagram on the current operation page according to the thermodynamic values corresponding to the operation controls and/or the operation points on the operation page of the software to be displayed in the display time period.
Further, the obtaining module is specifically configured to,
displaying a time period selection interface, and acquiring a display time period selected by a user on the time period selection interface;
displaying a software selection interface, and acquiring software to be displayed selected on the software selection interface by a user;
when the preset user behavior is monitored, the preset user behavior is identified as a thermodynamic diagram display request.
The thermodynamic diagram display device of the embodiment of the invention obtains a thermodynamic diagram display request of a terminal device user, wherein the thermodynamic diagram display request comprises the following components: displaying the time period and the identifier of the software to be displayed; running software to be displayed on the terminal equipment according to the thermodynamic diagram display request; monitoring and acquiring a current operation page of software to be displayed, reporting an acquisition request comprising a display time period, an identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period; according to the heat force values corresponding to the operation controls and/or the operation points on the operation page of the software to be displayed in the display time period, the thermodynamic diagrams are drawn and displayed on the current operation page, so that the corresponding thermodynamic diagrams can be displayed on the current operation page of the software to be displayed according to the display time period and the software to be displayed selected by the tester in the process that the tester uses the software to be displayed, the thermodynamic diagrams can easily know the functions focused by the user on each operation page, the automatic test cases can be written pertinently, and the test efficiency of the automatic test cases is improved.
In order to achieve the above object, a fifth embodiment of the present invention provides another thermodynamic diagram display apparatus, including: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the thermodynamic diagram showing method as described above when executing the program.
In order to achieve the above object, a sixth aspect of the present invention provides another thermodynamic diagram display apparatus, including: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the thermodynamic diagram showing method as described above when executing the program.
In order to achieve the above object, a seventh embodiment of the present invention proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the thermodynamic diagram representation method as described above.
In order to achieve the above object, an eighth aspect of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the thermodynamic diagram representation method as described above.
In order to achieve the above object, a ninth aspect of the present invention provides a computer program product, wherein when executed by an instruction processor in the computer program product, a method for displaying a thermodynamic diagram is performed, the method comprising:
collecting user behavior data corresponding to software to be tested; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of the software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained;
acquiring first user behavior data comprising the identification of the operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data;
receiving an acquisition request sent by terminal equipment; the obtaining request comprises: presetting a time period, an identifier of the software to be tested and an identifier of a current operation page;
determining a thermal value corresponding to each operation control and/or each operation point on the current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period;
and sending the thermal value corresponding to each operation control and/or each operation point on the current operation page to the terminal equipment so that the terminal equipment draws and displays a thermodynamic diagram on the current operation page.
In order to achieve the above object, a tenth aspect of the present invention provides a computer program product, wherein when executed by an instruction processor in the computer program product, a method for displaying a thermodynamic diagram is performed, the method comprising:
the method comprises the steps of obtaining a thermodynamic diagram display request of a terminal device user, wherein the thermodynamic diagram display request comprises: displaying the time period and the identifier of the software to be displayed;
running the software to be displayed on the terminal equipment according to the thermodynamic diagram display request;
monitoring and acquiring a current operation page of the software to be displayed, reporting an acquisition request comprising the display time period, the identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period;
and drawing and displaying a thermodynamic diagram on the current operation page according to the thermodynamic values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a thermodynamic diagram showing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a thermodynamic diagram representation;
fig. 3 is a schematic flow chart of another thermodynamic diagram showing method according to an embodiment of the present invention;
fig. 4 is a schematic flow chart illustrating another thermodynamic diagram showing method according to an embodiment of the present invention;
FIG. 5 is a schematic view of a software selection interface;
fig. 6 is a schematic structural diagram of a thermodynamic diagram display device according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of another thermodynamic diagram display device according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of another thermodynamic diagram display device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another thermodynamic diagram display device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
A thermodynamic diagram showing method and apparatus according to an embodiment of the present invention will be described with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart diagram illustrating a thermodynamic diagram displaying method according to an embodiment of the present invention. As shown in fig. 1, the thermodynamic diagram display method includes the following steps:
s101, collecting user behavior data corresponding to software to be tested; the user behavior data includes: the method comprises the steps of identifying terminal equipment, event occurrence time, identification of an operation page of software to be tested, event type, identification of an operation control on the operation page and position information of an operation point.
The executing body of the thermodynamic diagram display method is a thermodynamic diagram display device, and the thermodynamic diagram display device can be hardware equipment which is communicated with terminal equipment, such as one or more background servers, server clusters and the like corresponding to software to be tested, or software installed on the hardware equipment.
In this embodiment, the terminal device identifier may be a unique identifier of the terminal device in which the software to be tested is installed, for example, a mobile phone number, or a Called User IDentification number (CUID), and the like. The software to be tested can be application software such as WeChat, QQ and Baidu network disk. The event is a behavior of the user operating the software to be tested on the terminal device, that is, a start or close behavior of the user on the software to be tested, and an operation behavior of the user on each page of the software to be tested, for example, a click operation on a certain folder of the hundred-degree network disk. The operation page of the software to be tested refers to each page of the software to be tested, such as a home page of a hundred-degree network disk, a page opened after clicking a certain folder, and the like. The event type is a type of operation behavior, and may be, for example, a single click, a double click, a slide, or the like. And operating controls on the operation page, such as various folders displayed on the head page of the Baidu network disk, clickable buttons and the like. The operation point refers to a position of a single click, a position of a double click, or the like. The position information may be coordinate information of the operation point.
In this embodiment, there may be two ways to collect user behavior data corresponding to the software to be tested. The first way may be to add various event monitoring processing functions to the program code of the software to be tested, as shown in table 1, which are the corresponding relations among the events, the interfaces, and the monitoring processing functions.
TABLE 1
Figure BDA0001561746320000091
A second way may be that the HOOK of the event listener is done via the reflection + proxy mode. Taking an onlick in view as an example, a specific process may be (1) acquiring an event listener instance listenerlnfoinst of view; (2) acquiring click listener instance onClickListenerObj in the listener instance; (3) the HOOK is completed by replacing the onClickListenerProxy with the onClickListenerObj through the proxy mode.
It should be noted that, in this embodiment, the user behavior data corresponding to the software to be tested is reported by each terminal device installed with the software to be tested. The terminal equipment can read the preset configuration and determine the reporting mode of the user behavior data. The reporting mode of the user behavior data may be, for example, reporting every 15 minutes in a WIFI environment, performing compression uploading, and the like, and the terminal device may select any one or more of the reporting modes.
S102, acquiring first user behavior data comprising the identification of each operation page of the software to be tested; and determining the behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data.
In this embodiment, the process of determining, by the thermodynamic diagram display apparatus, behavior flows corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data may specifically be that, for each operation control and/or each operation point, the number of second user behavior data in which the occurrence time of each event includes the identifier of the operation control and/or the position information of the operation point is obtained; and determining the quantity of the occurrence time of each event as the behavior flow corresponding to the operation control and/or the operation point at the occurrence time of each event.
The behavior flow corresponding to each operation control and/or each operation point may include 3 situations, for example, the behavior flow corresponding to each operation control, or the behavior flow corresponding to each operation point, or the behavior flow corresponding to each operation control and operation point. In this embodiment, behavior flows corresponding to the operation controls are taken as an example for explanation, for each operation page of the software to be tested, after obtaining first user behavior data including an identifier of the operation page, for each operation control in the operation page, the thermodynamic diagram display device obtains multiple pieces of user behavior data including the operation control in the first user behavior data, divides the multiple pieces of user behavior data according to event occurrence time, obtains the number of the multiple pieces of user behavior data corresponding to each event occurrence time, and determines the number as the behavior flow corresponding to the operation control at each event occurrence time.
S103, receiving an acquisition request sent by the terminal equipment; the acquisition request comprises the following steps: the method comprises the steps of presetting a time period, identification of software to be tested and identification of a current operation page.
In this embodiment, it should be noted that, when the thermodynamic diagram display device is a background server corresponding to the software to be tested, the background server only receives an acquisition request including an identifier of the software to be tested; when the thermodynamic diagram display device is a background server corresponding to a plurality of pieces of software to be tested, the background server may receive an acquisition request including an identifier of any piece of software to be tested in the plurality of pieces of software to be tested.
In addition, in this embodiment, the obtaining request may further include: and identifying the terminal equipment so as to be identified by the thermodynamic diagram display device.
S104, determining the thermal power value corresponding to each operation control and/or each operation point on the current operation page of the software to be tested according to the behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period.
In this embodiment, the process of the thermodynamic diagram display device executing step 104 may specifically be that, according to behavior flows corresponding to each operation control and/or each operation point on the current operation page of the software to be tested within a preset time period, behavior flows corresponding to each operation control and/or each operation point on the current operation page at each event occurrence time within the preset time period are obtained; and adding the acquired behavior flow on the occurrence time of each event according to each operation control and/or each operation point to obtain the corresponding thermal value of each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period.
And S105, sending the thermal values corresponding to the operation controls and/or the operation points on the current operation page to the terminal equipment so that the terminal equipment draws and displays the thermal diagram on the current operation page.
It should be noted that, in this embodiment, the terminal device starts the software to be tested after the tester selects the software to be tested and selects the preset time period, and sends the preset time period and the identifier of the current operation page displayed by the software to be tested to the thermodynamic diagram display device, so that after the terminal device receives the thermodynamic values corresponding to each operation control and/or each operation point on the current operation page, the thermodynamic diagram can be directly drawn and displayed on the displayed current operation page. Wherein, the schematic diagram of the thermodynamic diagram can be shown as fig. 2.
According to the thermodynamic diagram display method, user behavior data corresponding to software to be tested are collected; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained; acquiring first user behavior data comprising an identifier of an operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data; receiving an acquisition request sent by terminal equipment; the acquisition request comprises the following steps: presetting a time period, an identifier of software to be tested and an identifier of a current operation page; determining a thermal value corresponding to each operation control and/or each operation point on a current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period; the thermodynamic values corresponding to the operation controls and/or the operation points on the current operation page are sent to the terminal equipment, so that the terminal equipment draws and displays thermodynamic diagrams on the current operation page, the thermodynamic diagrams on the pages of the software to be tested are obtained based on user behavior data corresponding to the software to be tested, and testers can easily know the important attention function of the users based on the thermodynamic diagrams, so that the automatic test cases are written in a targeted manner, and the test efficiency of the automatic test cases is improved.
Further, with reference to fig. 3 in combination, fig. 3 is a schematic flow chart diagram of another thermodynamic diagram displaying method provided by the embodiment of the present invention, as shown in fig. 3, on the basis of the embodiment shown in fig. 1, the user behavior data further includes: and identifying a behavior sequence group, wherein the behavior sequence group represents user behaviors in the process from starting the software to be tested to closing the software to be tested.
In this embodiment, in the process of using the software to be tested, a user may not operate for a period of time after the software to be tested is started, and continuously operates for a period of time until the software to be tested is closed.
Correspondingly, the method can further comprise the following steps:
s106, acquiring third user behavior data comprising the identification of the behavior sequence group aiming at each behavior sequence group; and sequencing the third user behavior data according to the event occurrence time to obtain an ordered behavior sequence set corresponding to the behavior sequence group.
The ordered behavior sequence set comprises user behavior data which are ordered according to event occurrence time and comprise identifications of the behavior sequence group.
S107, screening the ordered behavior sequence set by adopting a width-first search algorithm BFS, and acquiring the shortest path from the first operation page to the target operation page of the software to be tested in the ordered behavior sequence set.
As shown in fig. 4, fig. 4 is a schematic diagram of the shortest path. In fig. 4, the first operation page is Activity1, the destination operation page is Activity n, and there are two shortest paths from Activity1 to Activity n, which are Activity1-Activity2-Activity3-Activity, Activity1-Activity2-Activity 4-Activity. In the case that the shortest path is multiple, one of the multiple shortest paths may be randomly selected for subsequent operations.
And S108, determining a group of switching behavior sequences corresponding to the shortest path according to the shortest path and the switching sequences among the operation pages in the shortest path.
In this embodiment, one way for the thermodynamic diagram display apparatus to execute step 108 may be to obtain the identifiers of any two adjacent operation pages in the shortest path; inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages; randomly selecting one switching behavior from at least one switching behavior as the switching behavior between the two adjacent operation pages; and combining the switching behaviors between any two adjacent operation pages to obtain a switching behavior sequence.
The shortest path is Activity1-Activity2-Activity3-Activity as an example for explanation. Aiming at two adjacent operation pages in the shortest path, such as Activity1 and Activity2, wherein Activity1 is the previous operation page in the two adjacent operation pages, and Activity2 is the next operation page in the two adjacent operation pages; acquiring an operation page of the previous user behavior data in the ordered behavior sequence set as Activity1, and an operation page of the adjacent next user behavior data as two adjacent user behavior data of Activity2, and determining the user behavior in the user behavior data of which the operation page is Activity1 as a switching behavior for switching from Activity1 to Activity 2; and analogizing in sequence to obtain at least one switching behavior between any two operation pages, and determining the at least one switching behavior between any two operation pages as a switching sequence between any two operation pages.
In addition, in order to enable the switching behavior between two adjacent operation pages to be matched with the user behavior data, that is, the switching behavior between two adjacent operation pages is the switching behavior most frequently used when the user switches the pages, so that the test efficiency of the generated automatic test case can be improved, in this embodiment, another way for the thermodynamic diagram display device to execute step 108 may be to obtain the identifiers of any two adjacent operation pages in the shortest path; inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages; acquiring a heat value of at least one switching behavior within a preset time range, and determining the switching behavior with the highest corresponding heat value as the switching behavior between two adjacent operation pages; and combining the switching behaviors between any two adjacent operation pages to obtain a switching behavior sequence.
And S109, analyzing the switching behavior sequence by adopting a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence.
In this embodiment, the behavior parser may be, for example, a monkey test framework, a robotium test framework, an appium test framework, or the like. Taking a monkey test framework as an example, aiming at each switching behavior in the switching behavior sequence, a behavior analyzer queries the corresponding relation among the user behavior event type, monkey-API and the mapping rule to obtain a program segment corresponding to each switching behavior; and combining the program segments corresponding to the switching behaviors in the switching behavior sequence to obtain the program segments corresponding to the switching behavior sequence. The correspondence relationship between the user behavior event type, the monkey-API, and the mapping rule may be as shown in table 2.
TABLE 2
User behavior event types Monkey-API Mapping rules
ClickEvent DispatchPointer() // coordinate assignment
KeyEvent DispatchPress() // keyode conversion
In a sequence of switching behaviors including: three click operations will be described as an example, and program segments corresponding to the switching action sequence are shown below.
The # # # # user behavior data is converted into Monkey API # # # # # # # # # # # # ###
DispatchPointer(0,0,0,232.3,363.8,0,0,0,0,0,0,0)
DispatchPointer(1,1,1,232.3,363.8,0,0,0,0,0,0,0)
UserWait(54000)
DispatchPointer(0,0,0,231.3,366.2,0,0,0,0,0,0,0)
DispatchPointer(1,1,1,231.3,366.2,0,0,0,0,0,0,0)
UserWait(16000)
DispatchPointer(0,0,0,403.6,100.2,0,0,0,0,0,0,0)
DispatchPointer(1,1,1,403.6,100.2,0,0,0,0,0,0,0)
And S110, combining the program fragment and the program template to generate an automatic test case.
In addition, the automatic test case can be automatically executed through adb shell monkey-f demo.
According to the thermodynamic diagram display method, user behavior data corresponding to software to be tested are collected; the user behavior data includes: the method comprises the steps that a terminal device identifier, event occurrence time, an identifier of an operation page of software to be tested, an event type, an identifier of an operation control on the operation page, position information of an operation point and an identifier of a behavior sequence group are included, wherein the behavior sequence group represents user behaviors in the process from starting of the software to be tested to closing of the software to be tested; acquiring third user behavior data comprising the identification of the behavior sequence group aiming at each behavior sequence group; sequencing the third user behavior data according to the event occurrence time to obtain an ordered behavior sequence set corresponding to the behavior sequence group; screening the ordered behavior sequence set by adopting a width-first search algorithm BFS to obtain the shortest path from a first operation page of the software to be tested to a target operation page in the ordered behavior sequence set; determining a group of switching behavior sequences corresponding to the shortest path according to the shortest path and switching sequences among all operation pages in the shortest path; analyzing the switching behavior sequence by adopting a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence; the automatic test case is generated by combining the program fragment and the program template, so that the automatic test case corresponding to the software to be tested can be automatically generated according to the user behavior data corresponding to the software to be tested, the generation speed of the automatic test case is improved, the automatic test case is generated based on the user behavior data, the generated automatic test case can be effectively tested aiming at the functions focused by the user, and the test efficiency of the automatic test case is improved.
Fig. 4 is a schematic flow chart diagram of another thermodynamic diagram displaying method according to an embodiment of the present invention, as shown in fig. 4, the thermodynamic diagram displaying method includes the following steps:
s401, a thermodynamic diagram display request of a terminal device user is obtained, wherein the thermodynamic diagram display request comprises: and displaying the time period and the identification of the software to be displayed.
The executing body of the thermodynamic diagram display method is a thermodynamic diagram display device, and the thermodynamic diagram display device can be hardware equipment installed with software to be displayed, such as terminal equipment and the like, or thermodynamic diagram display software installed on the hardware equipment.
Specifically, in this embodiment, the process of acquiring the thermodynamic diagram display request of the terminal device user by the thermodynamic diagram display device may specifically be displaying a time period selection interface, and acquiring a display time period selected by the user on the time period selection interface; displaying a software selection interface, and acquiring software to be displayed selected on the software selection interface by a user; and when the preset user behavior is monitored, identifying the preset user behavior as a thermodynamic diagram display request.
The schematic diagram of the software selection interface may be as shown in fig. 5, a plurality of pieces of software to be selected are displayed on the software selection interface, and a "start application" button, a "close thermodynamic diagram" button, and a "display thermodynamic value" selection box are displayed below the interface. After the user selects software to be displayed and clicks an application starting button, the thermodynamic diagram display device determines to obtain a thermodynamic diagram display request of the terminal equipment user.
And S402, operating the software to be displayed on the terminal equipment according to the thermodynamic diagram display request.
S403, monitoring and acquiring a current operation page of the software to be displayed, reporting an acquisition request comprising a display time period, an identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period.
In this embodiment, after the thermodynamic diagram display device runs the software to be displayed, the thermodynamic diagram display device inherits the accessoriinityservice to monitor a page switching event, and the name of the page switching event may be, for example, TYPE _ WINDOW _ STATE _ CHANGED. When the software to be displayed is started successfully and a first operation page is displayed, or when the first operation page is switched to other operation pages, reporting an acquisition request comprising a display time period, the identifier of the software to be displayed and the identifier of the current operation page to a background server, and requesting the background server to send thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period.
S404, drawing and displaying the thermodynamic diagram on the current operation page according to the operation controls and/or the corresponding thermal force values of the operation points on the operation page of the software to be displayed in the display time period.
In addition, it should be further noted that the thermodynamic diagram display apparatus may also monitor other events of the current operation page, such as events of turning up, turning down, and the like, and after monitoring the events, obtain the moving distances and directions of the operation controls and the operation points in the current operation page, further determine the position information of the operation controls and the operation points after the events occur, and further correspondingly adjust the thermodynamic diagram on the current operation page.
According to the thermodynamic diagram display method, a thermodynamic diagram display request of a terminal device user is obtained, wherein the thermodynamic diagram display request comprises the following steps: displaying the time period and the identifier of the software to be displayed; running software to be displayed on the terminal equipment according to the thermodynamic diagram display request; monitoring and acquiring a current operation page of software to be displayed, reporting an acquisition request comprising a display time period, an identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period; according to the heat force values corresponding to the operation controls and/or the operation points on the operation page of the software to be displayed in the display time period, the thermodynamic diagrams are drawn and displayed on the current operation page, so that the corresponding thermodynamic diagrams can be displayed on the current operation page of the software to be displayed according to the display time period and the software to be displayed selected by the tester in the process that the tester uses the software to be displayed, the thermodynamic diagrams can easily know the functions focused by the user on each operation page, the automatic test cases can be written pertinently, and the test efficiency of the automatic test cases is improved.
Fig. 6 is a schematic structural diagram of a thermodynamic diagram display device according to an embodiment of the present invention. As shown in fig. 6, includes: an acquisition module 61, an acquisition module 62, a receiving module 63, a determination module 64 and a sending module 65.
The acquisition module 61 is used for acquiring user behavior data corresponding to the software to be tested; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of the software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained;
an obtaining module 62, configured to obtain, for each operation page of the software to be tested, first user behavior data including an identifier of the operation page; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data;
a receiving module 63, configured to receive an acquisition request sent by a terminal device; the obtaining request comprises: presetting a time period, an identifier of the software to be tested and an identifier of a current operation page;
the determining module 64 is configured to determine, according to behavior flows corresponding to each operation control and/or each operation point on the current operation page of the software to be tested within a preset time period, a thermal value corresponding to each operation control and/or each operation point on the current operation page of the software to be tested;
a sending module 65, configured to send the thermal value corresponding to each operation control and/or each operation point on the current operation page to the terminal device, so that the terminal device draws and displays a thermodynamic diagram on the current operation page.
The thermodynamic diagram display device provided by the invention can be a hardware device which is communicated with the terminal device, such as a background server, a server cluster and the like corresponding to one or more pieces of software to be tested, or software installed on the hardware device.
In this embodiment, the terminal device identifier may be a unique identifier of the terminal device in which the software to be tested is installed, for example, a mobile phone number, or a Called User IDentification number (CUID), and the like. The software to be tested can be application software such as WeChat, QQ and Baidu network disk. The event is a behavior of the user operating the software to be tested on the terminal device, that is, a start or close behavior of the user on the software to be tested, and an operation behavior of the user on each page of the software to be tested, for example, a click operation on a certain folder of the hundred-degree network disk. The operation page of the software to be tested refers to each page of the software to be tested, such as a home page of a hundred-degree network disk, a page opened after clicking a certain folder, and the like. The event type is a type of operation behavior, and may be, for example, a single click, a double click, a slide, or the like. And operating controls on the operation page, such as various folders displayed on the head page of the Baidu network disk, clickable buttons and the like. The operation point refers to a position of a single click, a position of a double click, or the like. The position information may be coordinate information of the operation point.
Further, the obtaining module 62 may be specifically configured to, for each operation control and/or each operation point, obtain the number of second user behavior data of each event occurrence time that includes the identifier of the operation control and/or the position information of the operation point; and determining the number of the occurrence time of each event as the behavior flow corresponding to the operation control and/or the operation point at the occurrence time of each event.
The behavior flow corresponding to each operation control and/or each operation point may include 3 situations, for example, the behavior flow corresponding to each operation control, or the behavior flow corresponding to each operation point, or the behavior flow corresponding to each operation control and operation point. In this embodiment, behavior flows corresponding to the operation controls are taken as an example for explanation, for each operation page of the software to be tested, after obtaining first user behavior data including an identifier of the operation page, for each operation control in the operation page, the thermodynamic diagram display device obtains multiple pieces of user behavior data including the operation control in the first user behavior data, divides the multiple pieces of user behavior data according to event occurrence time, obtains the number of the multiple pieces of user behavior data corresponding to each event occurrence time, and determines the number as the behavior flow corresponding to the operation control at each event occurrence time.
Further, the determining module 64 may be specifically configured to, according to behavior flows corresponding to each operation control and/or each operation point on a current operation page of the software to be tested within a preset time period, obtain behavior flows corresponding to each operation control and/or each operation point on the current operation page at occurrence time of each event within the preset time period; and adding the acquired behavior flow on the occurrence time of each event according to each operation control and/or each operation point to obtain the corresponding thermal value of each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period.
According to the thermodynamic diagram display device, user behavior data corresponding to software to be tested are collected; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained; acquiring first user behavior data comprising an identifier of an operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data; receiving an acquisition request sent by terminal equipment; the acquisition request comprises the following steps: presetting a time period, an identifier of software to be tested and an identifier of a current operation page; determining a thermal value corresponding to each operation control and/or each operation point on a current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period; the thermodynamic values corresponding to the operation controls and/or the operation points on the current operation page are sent to the terminal equipment, so that the terminal equipment draws and displays thermodynamic diagrams on the current operation page, the thermodynamic diagrams on the pages of the software to be tested are obtained based on user behavior data corresponding to the software to be tested, and testers can easily know the important attention function of the users based on the thermodynamic diagrams, so that the automatic test cases are written in a targeted manner, and the test efficiency of the automatic test cases is improved.
With reference to fig. 7, on the basis of the embodiment shown in fig. 6, the user behavior data further includes: and identifying a behavior sequence group, wherein the behavior sequence group represents user behaviors in the process from starting the software to be tested to closing the software to be tested.
In this embodiment, in the process of using the software to be tested, a user may not operate for a period of time after the software to be tested is started, and continuously operates for a period of time until the software to be tested is closed.
Correspondingly, the device can further comprise: a ranking module 66, a screening module 67, a parsing module 68, and a generating module 69.
The sorting module 66 is configured to, for each behavior sequence group, obtain third user behavior data including an identifier of the behavior sequence group; sequencing the third user behavior data according to event occurrence time to obtain a sequential behavior sequence set corresponding to the behavior sequence group;
the screening module 67 is configured to screen the ordered behavior sequence set by using a width-first search algorithm BFS, and obtain a shortest path from a first operation page to a destination operation page of the software to be tested in the ordered behavior sequence set;
the determining module 64 is further configured to determine a set of switching behavior sequences corresponding to the shortest path according to the shortest path and the switching sequences between the operation pages in the shortest path;
the analysis module 68 is configured to analyze the switching behavior sequence by using a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence;
the generating module 69 is configured to combine the program fragment and the program template to generate an automated test case.
The ordered behavior sequence set comprises user behavior data which are ordered according to event occurrence time and comprise identifications of the behavior sequence group.
Further, in the first implementation scenario, the determining module 64 may be specifically configured to obtain the identifiers of any two adjacent operation pages in the shortest path; inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages; randomly selecting one switching behavior from at least one switching behavior as the switching behavior between the two adjacent operation pages; and combining the switching behaviors between any two adjacent operation pages to obtain a switching behavior sequence.
The shortest path is Activity1-Activity2-Activity3-Activity as an example for explanation. Aiming at two adjacent operation pages in the shortest path, such as Activity1 and Activity2, wherein Activity1 is the previous operation page in the two adjacent operation pages, and Activity2 is the next operation page in the two adjacent operation pages; acquiring an operation page of the previous user behavior data in the ordered behavior sequence set as Activity1, and an operation page of the adjacent next user behavior data as two adjacent user behavior data of Activity2, and determining the user behavior in the user behavior data of which the operation page is Activity1 as a switching behavior for switching from Activity1 to Activity 2; and analogizing in sequence to obtain at least one switching behavior between any two operation pages, and determining the at least one switching behavior between any two operation pages as a switching sequence between any two operation pages.
In addition, in order to enable the switching behavior between two adjacent operation pages to be matched with the user behavior data, that is, the switching behavior between two adjacent operation pages is the switching behavior most frequently used when the user switches the pages, so that the test efficiency of the generated automatic test case can be improved, therefore, in the second real-time scenario, the determining module 64 may be specifically configured to obtain the identifiers of any two adjacent operation pages in the shortest path; inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages; acquiring a heat value of at least one switching behavior within a preset time range, and determining the switching behavior with the highest corresponding heat value as the switching behavior between two adjacent operation pages; and combining the switching behaviors between any two adjacent operation pages to obtain a switching behavior sequence.
According to the thermodynamic diagram display device, user behavior data corresponding to software to be tested are collected; the user behavior data includes: the method comprises the steps that a terminal device identifier, event occurrence time, an identifier of an operation page of software to be tested, an event type, an identifier of an operation control on the operation page, position information of an operation point and an identifier of a behavior sequence group are included, wherein the behavior sequence group represents user behaviors in the process from starting of the software to be tested to closing of the software to be tested; acquiring third user behavior data comprising the identification of the behavior sequence group aiming at each behavior sequence group; sequencing the third user behavior data according to the event occurrence time to obtain an ordered behavior sequence set corresponding to the behavior sequence group; screening the ordered behavior sequence set by adopting a width-first search algorithm BFS to obtain the shortest path from a first operation page of the software to be tested to a target operation page in the ordered behavior sequence set; determining a group of switching behavior sequences corresponding to the shortest path according to the shortest path and switching sequences among all operation pages in the shortest path; analyzing the switching behavior sequence by adopting a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence; the automatic test case is generated by combining the program fragment and the program template, so that the automatic test case corresponding to the software to be tested can be automatically generated according to the user behavior data corresponding to the software to be tested, the generation speed of the automatic test case is improved, the automatic test case is generated based on the user behavior data, the generated automatic test case can be effectively tested aiming at the functions focused by the user, and the test efficiency of the automatic test case is improved.
Fig. 8 is a schematic structural diagram of another thermodynamic diagram display device according to an embodiment of the present invention, as shown in fig. 8, including: an acquisition module 81, an execution module 82, and a presentation module 83.
The obtaining module 81 is configured to obtain a thermodynamic diagram display request of a terminal device user, where the thermodynamic diagram display request includes: displaying the time period and the identifier of the software to be displayed;
the running module 82 is used for running the software to be displayed on the terminal equipment according to the thermodynamic diagram display request;
the obtaining module 81 is further configured to monitor and obtain a current operation page of the software to be displayed, report an obtaining request including the display time period, an identifier of the software to be displayed, and an identifier of the current operation page, and obtain a thermal value corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period;
and the display module 83 is configured to draw and display a thermodynamic diagram on the current operation page according to the thermodynamic values corresponding to the operation controls and/or the operation points on the operation page of the software to be displayed in the display time period.
The thermodynamic diagram display device provided by the invention can be hardware equipment installed with software to be displayed, such as terminal equipment and the like, or thermodynamic diagram display software installed on the hardware equipment.
Specifically, the obtaining module 81 may be specifically configured to display a time period selection interface, and obtain a display time period selected by a user on the time period selection interface; displaying a software selection interface, and acquiring software to be displayed selected on the software selection interface by a user; and when the preset user behavior is monitored, identifying the preset user behavior as a thermodynamic diagram display request.
In this embodiment, after the thermodynamic diagram display device runs the software to be displayed, the thermodynamic diagram display device inherits the accessoriinityservice to monitor a page switching event, and the name of the page switching event may be, for example, TYPE _ WINDOW _ STATE _ CHANGED. When the software to be displayed is started successfully and a first operation page is displayed, or when the first operation page is switched to other operation pages, reporting an acquisition request comprising a display time period, the identifier of the software to be displayed and the identifier of the current operation page to a background server, and requesting the background server to send thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period.
In addition, it should be further noted that the thermodynamic diagram display apparatus may also monitor other events of the current operation page, such as events of turning up, turning down, and the like, and after monitoring the events, obtain the moving distances and directions of the operation controls and the operation points in the current operation page, further determine the position information of the operation controls and the operation points after the events occur, and further correspondingly adjust the thermodynamic diagram on the current operation page.
The thermodynamic diagram display device of the embodiment of the invention obtains a thermodynamic diagram display request of a terminal device user, wherein the thermodynamic diagram display request comprises the following components: displaying the time period and the identifier of the software to be displayed; running software to be displayed on the terminal equipment according to the thermodynamic diagram display request; monitoring and acquiring a current operation page of software to be displayed, reporting an acquisition request comprising a display time period, an identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period; according to the heat force values corresponding to the operation controls and/or the operation points on the operation page of the software to be displayed in the display time period, the thermodynamic diagrams are drawn and displayed on the current operation page, so that the corresponding thermodynamic diagrams can be displayed on the current operation page of the software to be displayed according to the display time period and the software to be displayed selected by the tester in the process that the tester uses the software to be displayed, the thermodynamic diagrams can easily know the functions focused by the user on each operation page, the automatic test cases can be written pertinently, and the test efficiency of the automatic test cases is improved.
Fig. 9 is a schematic structural diagram of another thermodynamic diagram display device according to an embodiment of the present invention. This thermodynamic diagram display device includes:
memory 1001, processor 1002, and computer programs stored on memory 1001 and executable on processor 1002.
The processor 1002 executes the program to implement the thermodynamic diagram showing method provided in the above-described embodiment.
Further, the thermodynamic diagram display device further comprises:
a communication interface 1003 for communicating between the memory 1001 and the processor 1002.
A memory 1001 for storing computer programs that may be run on the processor 1002.
Memory 1001 may include high-speed RAM memory and may also include non-volatile memory (e.g., at least one disk memory).
The processor 1002 is configured to implement the thermodynamic diagram displaying method according to the foregoing embodiment when executing the program.
If the memory 1001, the processor 1002, and the communication interface 1003 are implemented independently, the communication interface 1003, the memory 1001, and the processor 1002 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
Optionally, in a specific implementation, if the memory 1001, the processor 1002, and the communication interface 1003 are integrated on one chip, the memory 1001, the processor 1002, and the communication interface 1003 may complete communication with each other through an internal interface.
The processor 1002 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of thermodynamic diagram representation as described above.
The invention also provides a computer program product, wherein when executed by an instruction processor, the computer program product performs a method for displaying a thermodynamic diagram, the method comprising:
collecting user behavior data corresponding to software to be tested; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of the software to be tested, event types, identification of operation controls on the operation page and position information of operation points are obtained;
acquiring first user behavior data comprising the identification of the operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data;
receiving an acquisition request sent by terminal equipment; the obtaining request comprises: presetting a time period, an identifier of the software to be tested and an identifier of a current operation page;
determining a thermal value corresponding to each operation control and/or each operation point on the current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period;
and sending the thermal value corresponding to each operation control and/or each operation point on the current operation page to the terminal equipment so that the terminal equipment draws and displays a thermodynamic diagram on the current operation page.
The invention also provides another computer program product, which when executed by an instruction processor performs a method of thermodynamic diagram demonstration, the method comprising:
the method comprises the steps of obtaining a thermodynamic diagram display request of a terminal device user, wherein the thermodynamic diagram display request comprises: displaying the time period and the identifier of the software to be displayed;
running the software to be displayed on the terminal equipment according to the thermodynamic diagram display request;
monitoring and acquiring a current operation page of the software to be displayed, reporting an acquisition request comprising the display time period, the identifier of the software to be displayed and the identifier of the current operation page, and acquiring thermal values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period;
and drawing and displaying a thermodynamic diagram on the current operation page according to the thermodynamic values corresponding to each operation control and/or each operation point on the operation page of the software to be displayed in the display time period.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A thermodynamic diagram display method is characterized by comprising the following steps:
collecting user behavior data corresponding to software to be tested; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of the software to be tested, an event type, identification of an operation control on the operation page, position information of an operation point and identification of a behavior sequence group are carried out; the behavior sequence group represents user behaviors in the process from the starting of the software to be tested to the closing of the software to be tested, and is used for generating a switching behavior sequence and further generating an automatic test case;
acquiring first user behavior data comprising the identification of the operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data;
receiving an acquisition request sent by terminal equipment; the obtaining request comprises: presetting a time period, an identifier of the software to be tested and an identifier of a current operation page;
determining a thermal value corresponding to each operation control and/or each operation point on the current operation page of the software to be tested according to behavior flow corresponding to each operation control and/or each operation point on the current operation page of the software to be tested in a preset time period;
and sending the thermal value corresponding to each operation control and/or each operation point on the current operation page to the terminal equipment so that the terminal equipment draws and displays a thermodynamic diagram on the current operation page.
2. The method according to claim 1, wherein the determining, according to the first user behavior data, behavior traffic corresponding to each operation control and/or each operation point on the operation page includes:
acquiring the quantity of second user behavior data of each event occurrence time including the identification of the operation control and/or the position information of the operation point aiming at each operation control and/or each operation point;
and determining the number of the occurrence time of each event as the behavior flow corresponding to the operation control and/or the operation point at the occurrence time of each event.
3. The method of claim 1, further comprising:
acquiring third user behavior data comprising the identification of the behavior sequence group aiming at each behavior sequence group; sequencing the third user behavior data according to event occurrence time to obtain a sequential behavior sequence set corresponding to the behavior sequence group;
screening the ordered behavior sequence set by adopting a width-first search algorithm BFS to obtain the shortest path from a first operation page of the software to be tested to a target operation page in the ordered behavior sequence set;
determining a group of switching behavior sequences corresponding to the shortest path according to the shortest path and switching sequences among all operation pages in the shortest path;
analyzing the switching behavior sequence by adopting a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence;
and combining the program fragment and the program template to generate an automatic test case.
4. The method of claim 3, wherein determining a set of switching behavior sequences corresponding to the shortest path according to the shortest path and the switching sequences between the operation pages in the shortest path comprises:
acquiring the identifiers of any two adjacent operation pages in the shortest path;
inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages;
acquiring a heat value of the at least one switching behavior within a preset time range, and determining the switching behavior with the highest corresponding heat value as the switching behavior between two adjacent operation pages;
and combining the switching behaviors between any two adjacent operation pages to obtain the switching behavior sequence.
5. A thermodynamic diagram display device, comprising:
the acquisition module is used for acquiring user behavior data corresponding to the software to be tested; the user behavior data includes: the method comprises the steps that terminal equipment identification, event occurrence time, identification of an operation page of the software to be tested, an event type, identification of an operation control on the operation page, position information of an operation point and identification of a behavior sequence group are carried out; the behavior sequence group represents user behaviors in the process from the starting of the software to be tested to the closing of the software to be tested, and is used for generating a switching behavior sequence and further generating an automatic test case;
the acquisition module is used for acquiring first user behavior data comprising the identification of the operation page aiming at each operation page of the software to be tested; determining behavior flow corresponding to each operation control and/or each operation point on the operation page according to the first user behavior data;
the receiving module is used for receiving an acquisition request sent by the terminal equipment; the obtaining request comprises: presetting a time period, an identifier of the software to be tested and an identifier of a current operation page;
the determining module is used for determining the thermal value corresponding to each operation control and/or each operating point on the current operation page of the software to be tested according to the behavior flow corresponding to each operation control and/or each operating point on the current operation page of the software to be tested in a preset time period;
and the sending module is used for sending the thermal values corresponding to the operation controls and/or the operation points on the current operation page to the terminal equipment so that the terminal equipment draws and displays the thermodynamic diagram on the current operation page.
6. The apparatus of claim 5, wherein the obtaining module is specifically configured to,
acquiring the quantity of second user behavior data of each event occurrence time including the identification of the operation control and/or the position information of the operation point aiming at each operation control and/or each operation point;
and determining the number of the occurrence time of each event as the behavior flow corresponding to the operation control and/or the operation point at the occurrence time of each event.
7. The apparatus of claim 5, further comprising: the device comprises a sorting module, a screening module, an analyzing module and a generating module;
the sorting module is used for acquiring third user behavior data comprising the identification of the behavior sequence group aiming at each behavior sequence group; sequencing the third user behavior data according to event occurrence time to obtain a sequential behavior sequence set corresponding to the behavior sequence group;
the screening module is used for screening the ordered behavior sequence set by adopting a width-first search algorithm BFS to obtain the shortest path from a first operation page to a target operation page of the software to be tested in the ordered behavior sequence set;
the determining module is further configured to determine a group of switching behavior sequences corresponding to the shortest path according to the shortest path and the switching sequences between the operation pages in the shortest path;
the analysis module is used for analyzing the switching behavior sequence by adopting a behavior analyzer to obtain a program segment corresponding to the switching behavior sequence;
and the generating module is used for generating the automatic test case by combining the program fragment and the program template.
8. The apparatus of claim 7, wherein the means for determining is configured to,
acquiring the identifiers of any two adjacent operation pages in the shortest path;
inquiring user behavior data corresponding to the software to be tested according to the identifications of the two adjacent operation pages, and acquiring at least one switching behavior for switching from the previous operation page to the next operation page in the two adjacent operation pages;
acquiring a heat value of the at least one switching behavior within a preset time range, and determining the switching behavior with the highest corresponding heat value as the switching behavior between two adjacent operation pages;
and combining the switching behaviors between any two adjacent operation pages to obtain the switching behavior sequence.
9. A thermodynamic diagram display device, comprising:
memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the thermodynamic diagram representation method according to one of claims 1 to 4 when executing the program.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the thermodynamic diagram representation method according to any one of claims 1-4.
CN201810083613.4A 2018-01-29 2018-01-29 Thermodynamic diagram display method and device Active CN108255691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810083613.4A CN108255691B (en) 2018-01-29 2018-01-29 Thermodynamic diagram display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810083613.4A CN108255691B (en) 2018-01-29 2018-01-29 Thermodynamic diagram display method and device

Publications (2)

Publication Number Publication Date
CN108255691A CN108255691A (en) 2018-07-06
CN108255691B true CN108255691B (en) 2021-08-10

Family

ID=62742107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810083613.4A Active CN108255691B (en) 2018-01-29 2018-01-29 Thermodynamic diagram display method and device

Country Status (1)

Country Link
CN (1) CN108255691B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189878B (en) * 2018-09-18 2019-08-23 图普科技(广州)有限公司 A kind of crowd's thermodynamic chart preparation method and device
CN111125592B (en) * 2018-11-01 2023-06-20 百度在线网络技术(北京)有限公司 Thermodynamic diagram rendering method and device for application program
CN111222067B (en) * 2018-11-23 2024-03-15 北京易数科技有限公司 Information generation method and device
CN110032597B (en) * 2018-11-30 2023-04-11 创新先进技术有限公司 Visual processing method and device for operation behaviors of application program
CN109660669B (en) * 2018-12-25 2021-05-04 成都运力科技有限公司 Method, system, equipment and storage medium for collecting user operation information
CN111078330A (en) * 2019-07-23 2020-04-28 南京航空航天大学 Mobile phone traffic data visualization tool
CN110659188B (en) * 2019-08-14 2023-03-21 平安普惠企业管理有限公司 Page portrait data processing method and device, computer equipment and storage medium
CN112148413A (en) * 2020-09-29 2020-12-29 无线生活(杭州)信息科技有限公司 Page optimization method and device
CN112632541A (en) * 2020-12-29 2021-04-09 网神信息技术(北京)股份有限公司 Method and device for determining malicious degree of behavior, computer equipment and storage medium
CN112631947B (en) * 2021-01-15 2023-04-25 抖音视界有限公司 Test control method and device for application program, electronic equipment and storage medium
CN113010831A (en) * 2021-04-06 2021-06-22 金宝贝网络科技(苏州)有限公司 Thermodynamic diagram optimization method, thermodynamic diagram optimization system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713989A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Test case generating method and test case generating device for user terminal
CN104503910A (en) * 2014-12-22 2015-04-08 合一网络技术(北京)有限公司 Product test method by monitoring users' using behavior
WO2015080691A1 (en) * 2013-11-26 2015-06-04 Hewlett-Packard Development Company, L.P. Recommending application modifications using image area counts
CN104765679A (en) * 2014-01-08 2015-07-08 中国科学院声学研究所 Online business test method and device based on user behaviors
CN107391538A (en) * 2017-04-26 2017-11-24 阿里巴巴集团控股有限公司 Click data collection, processing and methods of exhibiting, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713989A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Test case generating method and test case generating device for user terminal
WO2015080691A1 (en) * 2013-11-26 2015-06-04 Hewlett-Packard Development Company, L.P. Recommending application modifications using image area counts
CN104765679A (en) * 2014-01-08 2015-07-08 中国科学院声学研究所 Online business test method and device based on user behaviors
CN104503910A (en) * 2014-12-22 2015-04-08 合一网络技术(北京)有限公司 Product test method by monitoring users' using behavior
CN107391538A (en) * 2017-04-26 2017-11-24 阿里巴巴集团控股有限公司 Click data collection, processing and methods of exhibiting, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于大数据的智慧政府门户建设分析》;王庆春等;《计算机时代》;20170607(第5期);79-82,90页 *

Also Published As

Publication number Publication date
CN108255691A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108255691B (en) Thermodynamic diagram display method and device
CN108073519B (en) Test case generation method and device
WO2016008398A1 (en) Program performance test method and device
CN110908888B (en) Server testing method and device
CN111371638A (en) Intelligent equipment testing method and device, server and storage medium
CN111400186A (en) Performance test method and system
CN104951400B (en) The method and apparatus that product is tested
CN111639002B (en) Sleep power consumption testing method, system, computer equipment and storage medium
CN111045879B (en) Method, device and storage medium for generating pressure test report
CN106980572B (en) Online debugging method and system for distributed system
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN103678380A (en) Test state presentation and anomaly indexing system and method
CN112965912B (en) Interface test case generation method and device and electronic equipment
CN104123397A (en) Automatic test device and method for Web page
CN110943887B (en) Probe scheduling method, device, equipment and storage medium
CN111598403A (en) Method and device for determining automobile test result, server and storage medium
CN111597111A (en) Application program starting speed monitoring method and device
CN116719750A (en) Software testing method and device, server equipment and storage medium
CN107341196B (en) Relation map display method and device
CN112765041B (en) Game automation testing method and device and electronic equipment
CN113839825B (en) Equipment fault detection method, system, device, computer equipment and storage medium
CN114326677A (en) Vehicle machine testing method and device
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
CN111329420A (en) Data processing method, device and equipment of dish washing machine
CN111796578A (en) Vehicle controller testing method, device and system and storage medium

Legal Events

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