CN110688173B - Positioning method and device of components in cross-platform interface framework and electronic equipment - Google Patents

Positioning method and device of components in cross-platform interface framework and electronic equipment Download PDF

Info

Publication number
CN110688173B
CN110688173B CN201910936908.6A CN201910936908A CN110688173B CN 110688173 B CN110688173 B CN 110688173B CN 201910936908 A CN201910936908 A CN 201910936908A CN 110688173 B CN110688173 B CN 110688173B
Authority
CN
China
Prior art keywords
interface
jump action
component
action occurs
monitoring log
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
CN201910936908.6A
Other languages
Chinese (zh)
Other versions
CN110688173A (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 Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201910936908.6A priority Critical patent/CN110688173B/en
Publication of CN110688173A publication Critical patent/CN110688173A/en
Application granted granted Critical
Publication of CN110688173B publication Critical patent/CN110688173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a method and a device for positioning a component in a cross-platform interface frame and electronic equipment, wherein the method comprises the following steps: when the interface jump action of the currently running application program is monitored, determining a component corresponding to the interface after the interface jump action occurs; generating a monitoring log based on the component corresponding to the interface, wherein the monitoring log comprises interface identifications of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs; and analyzing the monitoring log based on the system type of the application program, and determining components corresponding to the interface before and after the interface jump action. When a problem occurs or a component corresponding to the interface needs to be determined, the monitoring log can be analyzed to determine the components corresponding to the front and the back of the interface jump action, and the component corresponding to the currently displayed interface can be positioned.

Description

Positioning method and device of components in cross-platform interface framework and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for positioning a component in a cross-platform interface framework and electronic equipment.
Background
Currently, the operating systems of two types of terminal devices which are mainstream are Android (Android) and ios. Due to the incompatibility of the two platforms, different manpower needs to be allocated to respectively develop the two application programs suitable for the Android platform and the ios platform when the application programs are developed. Due to the adoption of the cross-platform architecture of the Flutter, the application program developed by the Flutter can be simultaneously applied to Android and ios platforms, a large amount of labor can be saved, and therefore the Flutter is more and more applied to important fields.
Flutter is a widget-based architecture, that is, an application developed by Flutter is composed of various widget components, and each interface of the application corresponds to a tree structure composed of multiple widget components.
When an application program based on the Flutter runs, the widget corresponding to the interface currently being displayed cannot be displayed, so that the widget corresponding to the interface currently being displayed cannot be positioned when the application program is tested, and great difficulty is brought to the positioning code problem.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for positioning a component in a cross-platform interface frame and electronic equipment, so as to position the component corresponding to the currently displayed interface. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for positioning a component in a cross-platform interface framework, where the method includes:
when the interface jump action of the currently running application program is monitored, determining a component corresponding to the interface after the interface jump action, wherein the application program is generated through the cross-platform interface framework;
generating a monitoring log based on the component corresponding to the interface, wherein the monitoring log comprises interface identifications of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs;
and analyzing the monitoring log based on the system type of the application program, and determining components corresponding to the front and the back of the interface jump action.
Optionally, the step of determining a component corresponding to the interface after the interface jump action occurs includes:
and acquiring a component corresponding to the interface after the interface jump action occurs through a preset instruction in the cross-platform interface frame.
Optionally, the step of analyzing the monitoring log based on the system type of the application program and determining components corresponding to the interface jump action before and after the interface jump action, includes:
establishing bridging of a system platform corresponding to the system type of the application program;
and sending the monitoring log to the system platform through the bridge connection so that the system platform analyzes the monitoring log and determines components corresponding to the front and the back of the interface jump action.
Optionally, the step of analyzing the monitoring log and determining components corresponding to the interface jump action before and after the interface jump action, includes:
analyzing the monitoring log, and determining the interface identifiers before and after the interface jump action occurs;
searching a component corresponding to the interface after the interface jump action occurs last time recorded by the monitoring log based on the interface identifier before the interface jump action occurs this time, and taking the component as the component corresponding to the interface before the interface jump action occurs this time;
searching a component corresponding to the interface which is recorded by the monitoring log and is subjected to the interface jump action on the basis of the interface identifier which is subjected to the interface jump action;
and determining the components corresponding to the interface before the interface jump action occurs this time and the components corresponding to the interface after the interface jump action occurs this time as the components corresponding to the interface before and after the interface jump action occurs.
Optionally, the method further includes:
and outputting visual prompt information, wherein the visual prompt information comprises information for identifying components corresponding to the determined interface jump action.
Optionally, the step of outputting the visual cue information includes:
creating a corresponding floating window according to the system type of the application program;
and displaying visual prompt information in the floating window.
In a second aspect, an embodiment of the present invention provides a device for positioning a component in a cross-platform interface frame, where the device includes:
the interface jump monitoring module is used for determining a component corresponding to an interface after the interface jump action occurs when the interface jump action of the currently running application program is monitored, wherein the application program is generated through the cross-platform interface framework;
the monitoring log generating module is used for generating a monitoring log based on the component corresponding to the interface, wherein the monitoring log comprises interface identifications of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs;
and the component positioning module is used for analyzing the monitoring log based on the system type of the application program and determining components corresponding to the front and the back of the interface jump action.
Optionally, the interface skip monitoring module includes:
and the component acquisition unit is used for acquiring a component corresponding to the interface after the interface jump action occurs through a preset instruction in the cross-platform interface frame.
Optionally, the component positioning module includes:
the bridging establishing unit is used for establishing bridging of a system platform corresponding to the system type of the application program;
and the component positioning unit is used for sending the monitoring log to the system platform through the bridge connection so that the system platform analyzes the monitoring log and determines components corresponding to the front and the back of the interface jump action.
Optionally, the component positioning module includes:
the interface identification determining unit is used for analyzing the monitoring log and determining the interface identification before and after the interface jump action occurs;
a first component determining unit, configured to search, based on the interface identifier before the interface jump action occurs this time, a component corresponding to an interface after the last interface jump action occurs, which is recorded by the monitoring log, and use the component as a component corresponding to the interface before the interface jump action occurs this time;
the second component determining unit is used for searching a component corresponding to the interface which is recorded by the monitoring log and is subjected to the interface jump action on the basis of the interface identifier which is subjected to the interface jump action at this time;
and the third component determining unit is used for determining the component corresponding to the interface before the interface jump action occurs this time and the component corresponding to the interface after the interface jump action occurs this time as the components corresponding to the interface before and after the interface jump action occurs.
Optionally, the apparatus further comprises:
and the prompt information output module is used for outputting visual prompt information, wherein the visual prompt information comprises information used for identifying components corresponding to the determined interface jump action.
Optionally, the prompt information output module includes:
the floating window creating unit is used for creating a corresponding floating window according to the system type of the application program;
and the prompt information output unit is used for displaying visual prompt information in the floating window.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the positioning method of the assembly in the cross-platform interface framework when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for positioning a component in a cross-platform interface framework is implemented as any one of the above-mentioned steps.
In the scheme provided by the embodiment of the invention, when monitoring that the interface jump action occurs in the currently running application program, the electronic device determines the component corresponding to the interface after the interface jump action occurs, wherein the application program is generated through a cross-platform interface framework, and then generates a monitoring log based on the component corresponding to the interface, wherein the monitoring log comprises interface identifications of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs, and further analyzes the monitoring log based on the system type of the application program to determine the component corresponding to the interface before and after the interface jump action occurs. The components corresponding to the relevant interfaces can be recorded in the monitoring logs when the interface jump action occurs, so that when problems occur or the components corresponding to the interfaces need to be determined, the components corresponding to the front and the back of the interface jump action occur can be determined by analyzing the monitoring logs, and the components corresponding to the back of the interface jump action occur are the components corresponding to the currently displayed interface, so that the components corresponding to the currently displayed interface can be positioned.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for positioning components in a cross-platform interface framework according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the step S103 in FIG. 1;
FIG. 3 is another detailed flowchart of step S103 in the embodiment shown in FIG. 1;
FIG. 4 is a flowchart illustrating a manner of outputting visual cue information according to the embodiment shown in FIG. 1;
FIG. 5 is a schematic structural diagram of a positioning apparatus for a component in a cross-platform interface framework according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to position a component corresponding to an interface currently being displayed so as to position a code problem, embodiments of the present invention provide a method and an apparatus for positioning a component in a cross-platform interface framework, an electronic device, and a computer-readable storage medium.
The following describes a method for positioning a component in a cross-platform interface framework according to an embodiment of the present invention.
The method for positioning a component in a cross-platform interface framework provided by the embodiment of the invention can be applied to electronic equipment running an application program generated by the cross-platform interface framework, such as a mobile phone, a computer, a tablet computer, a smart watch, and the like, and is not particularly limited herein and is hereinafter referred to as electronic equipment. Wherein, the cross-platform interface framework may be a Flutter architecture.
As shown in fig. 1, a method for positioning a component in a cross-platform interface framework, the method comprising:
s101, when monitoring that the interface jump action occurs in the currently running application program, determining a component corresponding to the interface after the interface jump action occurs;
wherein the application is generated through the cross-platform interface framework.
S102, generating a monitoring log based on the component corresponding to the interface;
and the monitoring log comprises interface identifications of the interfaces before and after the interface jump action occurs and components corresponding to the interfaces after the interface jump action occurs.
S103, analyzing the monitoring log based on the system type of the application program, and determining components corresponding to the front and the back of the interface jump action.
It can be seen that in the scheme provided in the embodiment of the present invention, when monitoring that an interface jump action occurs in a currently running application program, an electronic device determines a component corresponding to an interface after the interface jump action occurs, where the application program is generated through a cross-platform interface framework, and then generates a monitoring log based on the component corresponding to the interface, where the monitoring log includes interface identifiers of interfaces before and after the interface jump action occurs, and a component corresponding to the interface after the interface jump action occurs, and further, based on a system type of the application program, analyzes the monitoring log to determine the components before and after the interface jump action occurs. The components corresponding to the relevant interfaces can be recorded in the monitoring logs when the interface jump action occurs, so that when a problem occurs or the components corresponding to the interfaces need to be determined, the components corresponding to the front and the back of the interface jump action occur can be determined by analyzing the monitoring logs, and the components corresponding to the back of the interface jump action occur are the components corresponding to the currently displayed interface, so that the components corresponding to the currently displayed interface can be positioned.
The positioning method of the components in the cross-platform interface framework provided by the embodiment of the invention can be used for the application program generated by the Flutter architecture. One process in the electronic equipment and the process for running the application program can be called to run simultaneously, and the positioning method of the component in the cross-platform interface framework provided by the embodiment of the invention is realized. The application program may be an application program that needs to be tested, and the like.
When the application program is run, the electronic device may monitor the interface jump action of the currently running application program, that is, may take over the interface jump action of the application program, and all the interface jump actions of the application program may be monitored. The specific monitoring mode can adopt any mode capable of monitoring the interface jump action.
When the application test is performed, interface jump is generally realized by clicking each button in the interface, and the like, so as to test whether each function of the application program is normal, that is, the running process of one application program is formed by jumping among the interfaces. Therefore, in order to locate the position of the code when the application program has a problem, when monitoring that the currently running application program has an interface jump action, the electronic device may determine the component corresponding to the interface after the interface jump action occurs, that is, the widget, that is, perform step S101 described above.
Therefore, during the running of the application program, the electronic device can monitor a series of interface jump actions, and when the interface jump action of the currently running application program is monitored, the component corresponding to the interface after the interface jump action is carried out is determined.
Furthermore, the electronic device may generate a monitoring log based on the component corresponding to the determined interface, so as to record the component corresponding to each interface jump action. The monitoring log at least comprises interface marks of the interface before and after the interface jump action, namely the interface mark of the interface before the interface jump action and the interface mark of the interface after the interface jump rotation. And the component corresponding to the interface after the interface jump action occurs.
For example, if the interface identifier of the interface before the interface jump action occurs is a, the interface identifier of the interface after the interface jump action occurs is B, and the component corresponding to the interface with the interface identifier of B is component 2, the monitoring log corresponding to the interface jump action may be: a; b; and (3) a component 2.
The system types corresponding to the application programs may be different, for example, the system types may be an android system or an ios system, and then, because log analysis manners corresponding to different system types may be different, the monitoring log may be analyzed based on the system type of the application program, so that components corresponding to before and after the interface jump action occurs, that is, the component corresponding to before the interface jump action occurs and the component corresponding to after the interface jump action occurs may be determined.
In the first case, if the application program has a problem during the interface jump, the reason may be that the code of the interface before and/or after the interface jump action occurs has a problem, and then the determined components corresponding to the components before and after the interface jump action occurs are the components which may have the problem.
In the second case, if the application program has a problem after the interface jump, the reason may be that the code of the interface after the interface jump action has a problem, and at this time, the component corresponding to the interface after the interface jump action is the component which may have a problem, from the determined components corresponding to the front and the back of the interface jump action. In either case, the component in question can be located.
As an implementation manner of the embodiment of the present invention, the step of determining a component corresponding to the interface after the interface jump action occurs may include:
and acquiring a component corresponding to the interface after the interface jump action occurs through a preset instruction in the cross-platform interface frame.
Since the application program is written based on the Flutter architecture, in the Flutter architecture, the Flutter dump instruction may be used to acquire a component that is desired to be acquired, in this embodiment, the electronic device may generate the Flutter dump instruction, that is, a preset instruction, and further acquire, through the Flutter dump instruction, a component corresponding to the interface after the interface jump action occurs.
Therefore, in this embodiment, the electronic device may obtain, through the Flutter dump instruction, the component corresponding to the interface after the interface jump action has occurred, and because the Flutter dump instruction is an instruction for the component provided by the Flutter framework, the component corresponding to the interface after the interface jump action has occurred may be accurately and quickly obtained through the Flutter dump instruction.
As an implementation manner of the embodiment of the present invention, as shown in fig. 2, the step of analyzing the monitoring log based on the system type of the application program and determining components corresponding to the interface jump action before and after the interface jump action occurs may include:
s201, establishing bridging of a system platform corresponding to the system type of the application program;
because log analysis modes corresponding to different system types may be different, in order to accurately analyze the monitoring log, the electronic device may establish a bridge connection with a system platform corresponding to the system type of the application program, that is, the electronic device may establish a communication connection with the system platform corresponding to the system type of the application program, so as to perform data interaction. The method for establishing the bridge connection may adopt any method for establishing the bridge connection with the system platform, and is not particularly limited herein.
For example, assuming the system type of the application is android, the electronic device may establish a bridge with the android system platform; assuming that the system type of the application is ios, the electronic device can establish a bridge with the ios system platform.
S202, the monitoring logs are sent to the system platform through the bridge connection, so that the system platform analyzes the monitoring logs and determines components corresponding to the front and the back of the interface jump action.
After the bridge connection with the system platform is established, the electronic equipment can send the monitoring log to the system platform, and then the system platform can analyze the monitoring log to obtain components corresponding to the front and the back of the interface jump action, namely the components corresponding to the front of the interface jump action and the components corresponding to the back of the interface jump action.
Therefore, in this embodiment, the electronic device may establish bridging of the system platform corresponding to the system type of the application program, and then send the monitoring log to the system platform through the bridging, so that the system platform analyzes the monitoring log and determines components corresponding to the interface jump before and after the interface jump occurs. Therefore, the monitoring log can be accurately analyzed, and the accuracy of the positioning assembly is ensured.
As an implementation manner of the embodiment of the present invention, as shown in fig. 3, the step of analyzing the monitoring log and determining components corresponding to the interface jump action before and after the interface jump action occurs may include:
s301, analyzing the monitoring log, and determining the interface identifiers before and after the interface jump action occurs;
because the interface identifications before and after the interface jump action occurs are recorded in the monitoring log, when the component needs to be positioned, the monitoring log can be analyzed, and then the interface identifications before and after the interface jump action occurs at this time are determined. Of course, it is reasonable to perform this step every time the interface jump action is completed.
S302, searching a component corresponding to the interface which is recorded by the monitoring log and is subjected to the interface jump action last time based on the interface identifier before the interface jump action occurs at this time, and taking the component corresponding to the interface before the interface jump action occurs at this time;
after the interface identifiers before and after the interface jump action is determined, the electronic equipment can search the component corresponding to the interface after the last interface jump action is recorded by the monitoring log because the interface before the interface jump action is the interface after the last interface jump action is performed. Namely, the interface identifier after the interface jump action occurs is the same as the interface identifier before the determined interface jump action occurs, and the component corresponds to the interface identifier.
For example, the monitoring log is recorded in a table form, which is as follows:
interface jump sequence number Interface identification before interface jump action Interface identification after interface jump action Widget
1 P1 P2 widget a2
2 P2 P3 widget a3
3 P3 P2 widget a2
4 P2 P4 widget a4
5 P4 P5 widget a5
Then, if the serial number of the interface jump action is 5, in step S301, the electronic device may determine, according to the monitoring log, that the interface identifiers before and after the interface jump action occurs are P4 and P5, respectively. Furthermore, the electronic device may determine, based on the interface identifier P4, from the monitoring log, that the widget corresponding to the interface identifier after the interface jump action is the interface identifier P4 after the last interface jump action is widget a4.
S303, searching a component corresponding to the interface which is recorded by the monitoring log and is subjected to the interface jump action on the basis of the interface identifier which is subjected to the interface jump action at this time;
after the interface identifiers before and after the interface jump action is determined, the component corresponding to the interface after the interface jump action is generated and recorded by the monitoring log can be searched. For example, still taking the monitoring log recorded in the table as an example, if the serial number of the interface jump action is 5, the electronic device may determine, according to the monitoring log, that the interface identifiers before and after the interface jump action occurs this time are P4 and P5, respectively, and further may determine that the component a5 corresponding to the interface identifier P5 is the component corresponding to the interface after the interface jump action occurs this time.
S304, determining the component corresponding to the interface before the interface jump action occurs this time and the component corresponding to the interface after the interface jump action occurs this time as the components corresponding to the interface before and after the interface jump action occurs.
After determining the component corresponding to the interface before the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs, the components can be determined to be the components corresponding to the interface before and after the interface jump action occurs, namely the component corresponding to the interface before the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs. Further, the electronic device can locate the code problem.
It can be seen that, in this embodiment, the electronic device may analyze the monitoring log, determine the interface identifiers before and after the interface jump action occurs this time, and search, based on the interface identifier before the interface jump action occurs this time, a component corresponding to the interface after the last interface jump action occurs, which is recorded by the monitoring log, as a component corresponding to the interface before the interface jump action occurs this time; and searching a component corresponding to the interface after the interface jump action occurs, which is recorded by a monitoring log, based on the interface identifier after the interface jump action occurs, and further determining the component corresponding to the interface before the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs as the components corresponding to the interface before and after the interface jump action occurs. The components corresponding to the front and the back of the interface jump action can be accurately and quickly positioned.
As an implementation manner of the embodiment of the present invention, the method may further include:
and outputting visual prompt information.
In order to facilitate a tester and the like to view the positioned component for further debugging and other operations, the electronic device may output visual prompt information, where the visual prompt information includes information for identifying the component corresponding to the determined interface jump action before and after the interface jump action occurs.
Since the component components are a series of codes, and the output information amount is very large when the component components are all output, information for identifying the components corresponding to the determined interface jump action before and after the interface jump action occurs can be set and output as visual information.
In an embodiment, even if the currently displayed interface has no problem, the electronic device may output corresponding visual prompt information when the interface jump action occurs each time, so that a tester can conveniently view the component corresponding to the current interface.
In another embodiment, when no problem occurs in the currently displayed interface, the electronic device may output corresponding visual prompt information, so that a tester can conveniently view the component corresponding to the current interface and process the problem.
Therefore, in this embodiment, after determining the components corresponding to the front and the back of the interface jump action, the electronic device may output visual prompt information, so that a user can conveniently view the information of the components corresponding to the front and the back of the determined interface jump action.
As an implementation manner of the embodiment of the present invention, as shown in fig. 4, the step of outputting the visual cue information may include:
s401, creating a corresponding floating window according to the system type of the application program;
s402, displaying visual prompt information in the floating window.
The electronic device can create a corresponding floating window according to the creating mode of the floating window corresponding to the system type of the application program, and then display the visual prompt information in the floating window.
Therefore, when the application program is operated, personnel such as a tester can see the information of the component corresponding to the currently displayed interface in the floating window, and the problem is conveniently and quickly positioned.
Corresponding to the positioning method of the component in the cross-platform interface frame, the embodiment of the invention also provides a positioning device of the component in the cross-platform interface frame.
The following describes a positioning apparatus for a component in a cross-platform interface frame according to an embodiment of the present invention.
As shown in fig. 5, a positioning apparatus for a component in a cross-platform interface frame, the apparatus comprising:
the interface jump monitoring module 510 is configured to determine, when it is monitored that an interface jump action occurs in a currently running application program, a component corresponding to the interface after the interface jump action occurs;
wherein the application is generated through the cross-platform interface framework.
A monitoring log generating module 520, configured to generate a monitoring log based on a component corresponding to the interface;
the monitoring log comprises interface identifications of the front interface and the rear interface before the interface jump action occurs and components corresponding to the interface after the interface jump action occurs.
And the component positioning module 530 is configured to analyze the monitoring log based on the system type of the application program, and determine components corresponding to the interface jump action before and after the interface jump action occurs.
Therefore, in the scheme provided by the embodiment of the invention, when monitoring that the interface jump action occurs in the currently running application program, the electronic device determines the component corresponding to the interface after the interface jump action occurs, wherein the application program is generated through a cross-platform interface framework, then generates a monitoring log based on the component corresponding to the interface, wherein the monitoring log comprises interface identifiers of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs, and further analyzes the monitoring log based on the system type of the application program to determine the components corresponding to the interface before and after the interface jump action occurs. The components corresponding to the relevant interfaces can be recorded in the monitoring logs when the interface jump action occurs, so that when a problem occurs or the components corresponding to the interfaces need to be determined, the components corresponding to the front and the back of the interface jump action occur can be determined by analyzing the monitoring logs, and the components corresponding to the back of the interface jump action occur are the components t corresponding to the currently displayed interface, so that the components t corresponding to the currently displayed interface can be positioned.
As an implementation manner of the embodiment of the present invention, the interface skip monitoring module 510 may include:
and a component obtaining unit (not shown in fig. 5) configured to obtain, through a preset instruction in the cross-platform interface frame, a component corresponding to the interface after the interface jump action occurs.
As an implementation manner of the embodiment of the present invention, the component positioning module 530 may include:
a bridge establishing unit (not shown in fig. 5) for establishing a bridge of the system platform corresponding to the system type of the application;
and the component positioning unit (not shown in fig. 5) is configured to send the monitoring log to the system platform through the bridge, so that the system platform analyzes the monitoring log and determines components corresponding to the interface before and after the interface jump action occurs.
As an implementation manner of the embodiment of the present invention, the component positioning module 530 may include:
an interface identifier determining unit (not shown in fig. 5) configured to analyze the monitoring log and determine interface identifiers before and after the interface jump action occurs this time;
a first component determining unit (not shown in fig. 5) configured to search, based on the interface identifier before the interface jump action occurs this time, a component corresponding to the interface after the last interface jump action occurs, where the component is recorded by the monitoring log, and serve as the component corresponding to the interface before the interface jump action occurs this time;
a second component determining unit (not shown in fig. 5) configured to search, based on the interface identifier after the interface jump action occurs this time, a component corresponding to the interface after the interface jump action occurs this time, which is recorded by the monitoring log;
a third component determining unit (not shown in fig. 5), configured to determine the component corresponding to the interface before the interface jump action occurs this time and the component corresponding to the interface after the interface jump action occurs this time as components corresponding to before and after the interface jump action occurs.
As an implementation manner of the embodiment of the present invention, the apparatus may further include:
and a prompt information output module (not shown in fig. 5) for outputting visual prompt information, wherein the visual prompt information includes information for identifying components corresponding to the determined interface jump action.
As an implementation manner of the embodiment of the present invention, the prompt information output module may include:
a floating window creating unit (not shown in fig. 5) configured to create a corresponding floating window according to a system type of the application program;
and a prompt message output unit (not shown in fig. 5) for displaying the visual prompt message in the floating window.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, the electronic device may include a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
when the interface jump action of the currently running application program is monitored, determining a component corresponding to the interface after the interface jump action is carried out;
wherein the application is generated through the cross-platform interface framework.
Generating a monitoring log based on the component corresponding to the interface;
and the monitoring log comprises interface identifications of the interfaces before and after the interface jump action occurs and components corresponding to the interfaces after the interface jump action occurs.
And analyzing the monitoring log based on the system type of the application program, and determining components corresponding to the front and the back of the interface jump action.
It can be seen that in the scheme provided in the embodiment of the present invention, when monitoring that an interface jump action occurs in a currently running application program, an electronic device determines a component corresponding to an interface after the interface jump action occurs, where the application program is generated through a cross-platform interface framework, and then generates a monitoring log based on the component corresponding to the interface, where the monitoring log includes interface identifiers of interfaces before and after the interface jump action occurs, and a component corresponding to the interface after the interface jump action occurs, and further, based on a system type of the application program, analyzes the monitoring log to determine the components before and after the interface jump action occurs. The components corresponding to the relevant interfaces can be recorded in the monitoring logs when the interface jump action occurs, so that when a problem occurs or the components corresponding to the interfaces need to be determined, the components corresponding to the front and the back of the interface jump action occur can be determined by analyzing the monitoring logs, and the components corresponding to the back of the interface jump action occur are the components corresponding to the currently displayed interface, so that the components corresponding to the currently displayed interface can be positioned.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication 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, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
As an implementation manner of the embodiment of the present invention, the step of determining a component corresponding to the interface after the interface jump action occurs may include:
and acquiring a component corresponding to the interface after the interface jump action occurs through a preset instruction in the cross-platform interface frame.
As an implementation manner of the embodiment of the present invention, the step of analyzing the monitoring log based on the system type of the application program and determining components corresponding to the interface jump action before and after the interface jump action occurs may include:
establishing bridging of a system platform corresponding to the system type of the application program;
and sending the monitoring log to the system platform through the bridge connection so that the system platform analyzes the monitoring log and determines components corresponding to the front and the back of the interface jump action.
As an implementation manner of the embodiment of the present invention, the step of analyzing the monitoring log and determining components corresponding to the interface before and after the interface jump action occurs may include:
analyzing the monitoring log, and determining the interface identification before and after the interface jump action occurs;
based on the interface identifier before the interface jump action occurs this time, searching a component corresponding to the interface after the last interface jump action occurs, which is recorded by the monitoring log, and taking the component as a component corresponding to the interface before the interface jump action occurs this time;
searching a component corresponding to the interface which is recorded by the monitoring log and is subjected to the interface jump action on the basis of the interface identifier which is subjected to the interface jump action;
and determining the component corresponding to the interface before the interface jump action occurs this time and the component corresponding to the interface after the interface jump action occurs this time as the components corresponding to the interface before and after the interface jump action occurs.
As an implementation manner of the embodiment of the present invention, the method may further include:
outputting visual prompt information;
and the visual prompt information comprises information for identifying components corresponding to the determined interface jump action.
As an implementation manner of the embodiment of the present invention, the step of outputting the visual cue information may include:
creating a corresponding floating window according to the system type of the application program;
and displaying visual prompt information in the floating window.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when executed by a processor, the computer program implements the following steps:
when the interface jump action of the currently running application program is monitored, determining a component corresponding to the interface after the interface jump action occurs;
wherein the application is generated through the cross-platform interface framework.
Generating a monitoring log based on the component corresponding to the interface;
the monitoring log comprises interface identifications of the front interface and the rear interface before the interface jump action occurs and components corresponding to the interface after the interface jump action occurs.
And analyzing the monitoring log based on the system type of the application program, and determining components corresponding to the front and the back of the interface jump action.
It can be seen that in the solution provided in the embodiment of the present invention, when the computer program is executed by the processor, and when it is monitored that the currently running application program has an interface jump action, the component corresponding to the interface after the interface jump action occurs is determined, where the application program is generated through a cross-platform interface framework, and then a monitoring log is generated based on the component corresponding to the interface, where the monitoring log includes interface identifiers of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs, and further, based on the system type of the application program, the monitoring log is analyzed to determine the component before and after the interface jump action occurs. The components corresponding to the relevant interfaces can be recorded in the monitoring logs when the interface jump action occurs, so that when a problem occurs or the components corresponding to the interfaces need to be determined, the components corresponding to the front and the back of the interface jump action occur can be determined by analyzing the monitoring logs, and the components corresponding to the back of the interface jump action occur are the components t corresponding to the currently displayed interface, so that the components t corresponding to the currently displayed interface can be positioned.
As an implementation manner of the embodiment of the present invention, the step of determining a component corresponding to the interface after the interface jump action occurs may include:
and acquiring a component corresponding to the interface after the interface jump action occurs through a preset instruction in the cross-platform interface frame.
As an implementation manner of the embodiment of the present invention, the step of analyzing the monitoring log based on the system type of the application program and determining components corresponding to the interface jump action before and after the interface jump action occurs may include:
establishing bridging of a system platform corresponding to the system type of the application program;
and sending the monitoring log to the system platform through the bridge connection so that the system platform analyzes the monitoring log and determines components corresponding to the front and the back of the interface jump action.
As an implementation manner of the embodiment of the present invention, the step of analyzing the monitoring log and determining components corresponding to the interface before and after the interface jump action occurs may include:
analyzing the monitoring log, and determining the interface identification before and after the interface jump action occurs;
searching a component corresponding to the interface after the interface jump action occurs last time recorded by the monitoring log based on the interface identifier before the interface jump action occurs this time, and taking the component as the component corresponding to the interface before the interface jump action occurs this time;
searching a component corresponding to the interface after the interface jump action occurs based on the interface identification after the interface jump action occurs at this time, which is recorded by the monitoring log;
and determining the components corresponding to the interface before the interface jump action occurs this time and the components corresponding to the interface after the interface jump action occurs this time as the components corresponding to the interface before and after the interface jump action occurs.
As an implementation manner of the embodiment of the present invention, the method may further include:
outputting visual prompt information;
and the visual prompt information comprises information for identifying components corresponding to the determined interface jump action.
As an implementation manner of the embodiment of the present invention, the step of outputting the visual cue information may include:
creating a corresponding floating window according to the system type of the application program;
and displaying visual prompt information in the floating window.
It should be noted that, for the above-mentioned apparatus, electronic device and computer-readable storage medium embodiments, since they are substantially similar to the corresponding method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A method for positioning a component in a cross-platform interface framework, the method comprising:
when the interface jump action of the currently running application program is monitored, determining a component corresponding to the interface after the interface jump action occurs, wherein the application program is generated through the cross-platform interface framework;
generating a monitoring log based on the component corresponding to the interface, wherein the monitoring log comprises interface identifications of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs;
analyzing the monitoring log based on the system type of the application program, and determining components corresponding to the front and the back of the interface jump action;
the step of analyzing the monitoring log and determining the components corresponding to the interface jump action comprises the following steps:
analyzing the monitoring log, and determining the interface identifiers before and after the interface jump action occurs;
searching a component corresponding to the interface after the interface jump action occurs last time recorded by the monitoring log based on the interface identifier before the interface jump action occurs this time, and taking the component as the component corresponding to the interface before the interface jump action occurs this time;
searching a component corresponding to the interface which is recorded by the monitoring log and is subjected to the interface jump action on the basis of the interface identifier which is subjected to the interface jump action;
and determining the component corresponding to the interface before the interface jump action occurs this time and the component corresponding to the interface after the interface jump action occurs this time as the components corresponding to the interface before and after the interface jump action occurs.
2. The method of claim 1, wherein the step of determining the component corresponding to the interface after the interface jump action occurs comprises:
and acquiring a component corresponding to the interface after the interface jump action occurs through a preset instruction in the cross-platform interface frame.
3. The method of claim 1, wherein the step of parsing the monitoring log based on the system type of the application program to determine components corresponding to the front and back of the occurrence of the interface jump action comprises:
establishing bridging of a system platform corresponding to the system type of the application program;
and sending the monitoring log to the system platform through the bridge connection so that the system platform analyzes the monitoring log and determines components corresponding to the front and the back of the interface jump action.
4. The method of any one of claims 1-3, further comprising:
and outputting visual prompt information, wherein the visual prompt information comprises information for identifying the components corresponding to the determined interface jump action.
5. The method of claim 4, wherein the step of outputting visual cue information comprises:
creating a corresponding floating window according to the system type of the application program;
and displaying visual prompt information in the floating window.
6. An apparatus for positioning a component in a cross-platform interface frame, the apparatus comprising:
the interface jump monitoring module is used for determining a component corresponding to an interface after the interface jump action occurs when the interface jump action of the currently running application program is monitored, wherein the application program is generated through the cross-platform interface framework;
the monitoring log generating module is used for generating a monitoring log based on the component corresponding to the interface, wherein the monitoring log comprises interface identifications of the interface before and after the interface jump action occurs and the component corresponding to the interface after the interface jump action occurs;
the component positioning module is used for analyzing the monitoring log based on the system type of the application program and determining components corresponding to the front and the back of the interface jump action;
the component positioning module includes:
the interface identifier determining unit is used for analyzing the monitoring log and determining the interface identifiers before and after the interface jump action occurs at this time;
a first component determining unit, configured to search, based on the interface identifier before the interface jump action occurs this time, a component corresponding to an interface after the last interface jump action occurs, which is recorded by the monitoring log, and use the component as a component corresponding to the interface before the interface jump action occurs this time;
the second component determining unit is used for searching a component corresponding to the interface which is recorded by the monitoring log and is subjected to the interface jump action on the basis of the interface identifier which is subjected to the interface jump action at this time;
and the third component determining unit is used for determining the component corresponding to the interface before the interface jump action occurs this time and the component corresponding to the interface after the interface jump action occurs this time as the components corresponding to the interface before and after the interface jump action occurs.
7. The apparatus of claim 6, wherein the interface hop monitoring module comprises:
and the component acquisition unit is used for acquiring a component corresponding to the interface after the interface jump action occurs through a preset instruction in the cross-platform interface frame.
8. The apparatus of claim 6, wherein the component positioning module comprises:
the bridging establishing unit is used for establishing bridging of a system platform corresponding to the system type of the application program;
and the component positioning unit is used for sending the monitoring log to the system platform through the bridge connection so that the system platform analyzes the monitoring log and determines components corresponding to the front and the back of the interface jump action.
9. The apparatus of any of claims 6-8, further comprising:
and the prompt information output module is used for outputting visual prompt information, wherein the visual prompt information comprises information used for identifying components corresponding to the determined interface jump action.
10. The apparatus of claim 9, wherein the hint information output module comprises:
the floating window creating unit is used for creating a corresponding floating window according to the system type of the application program;
and the prompt information output unit is used for displaying visual prompt information in the floating window.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN201910936908.6A 2019-09-29 2019-09-29 Positioning method and device of components in cross-platform interface framework and electronic equipment Active CN110688173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910936908.6A CN110688173B (en) 2019-09-29 2019-09-29 Positioning method and device of components in cross-platform interface framework and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910936908.6A CN110688173B (en) 2019-09-29 2019-09-29 Positioning method and device of components in cross-platform interface framework and electronic equipment

Publications (2)

Publication Number Publication Date
CN110688173A CN110688173A (en) 2020-01-14
CN110688173B true CN110688173B (en) 2023-01-20

Family

ID=69111215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910936908.6A Active CN110688173B (en) 2019-09-29 2019-09-29 Positioning method and device of components in cross-platform interface framework and electronic equipment

Country Status (1)

Country Link
CN (1) CN110688173B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464858A (en) * 2020-03-09 2020-07-28 五八有限公司 Video playing method and device
CN113900893A (en) * 2021-09-30 2022-01-07 土巴兔集团股份有限公司 Log obtaining method and related equipment thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140069936A (en) * 2012-11-30 2014-06-10 주식회사 알투소프트 Method for upgrading hypervisor component and system thereof
CN107729106A (en) * 2017-10-09 2018-02-23 北京京东尚科信息技术有限公司 It is a kind of that the method and apparatus quickly redirected are realized between application component
CN107992398A (en) * 2017-12-22 2018-05-04 宜人恒业科技发展(北京)有限公司 The monitoring method and monitoring system of a kind of operation system
CN108958708A (en) * 2017-05-25 2018-12-07 河南理工大学 A kind of software system architecture component-based and software implementation method
CN109522082A (en) * 2018-11-27 2019-03-26 北京微播视界科技有限公司 Interface jump method, device, electronic equipment and the medium of application software
CN109783309A (en) * 2018-12-14 2019-05-21 平安普惠企业管理有限公司 The abnormality monitoring method and device of webpage load

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140069936A (en) * 2012-11-30 2014-06-10 주식회사 알투소프트 Method for upgrading hypervisor component and system thereof
CN108958708A (en) * 2017-05-25 2018-12-07 河南理工大学 A kind of software system architecture component-based and software implementation method
CN107729106A (en) * 2017-10-09 2018-02-23 北京京东尚科信息技术有限公司 It is a kind of that the method and apparatus quickly redirected are realized between application component
CN107992398A (en) * 2017-12-22 2018-05-04 宜人恒业科技发展(北京)有限公司 The monitoring method and monitoring system of a kind of operation system
CN109522082A (en) * 2018-11-27 2019-03-26 北京微播视界科技有限公司 Interface jump method, device, electronic equipment and the medium of application software
CN109783309A (en) * 2018-12-14 2019-05-21 平安普惠企业管理有限公司 The abnormality monitoring method and device of webpage load

Also Published As

Publication number Publication date
CN110688173A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN108388514B (en) Interface automation test method, device, equipment and computer readable storage medium
US9317400B2 (en) Code coverage rate determination method and system
CN109871326B (en) Script recording method and device
CN107506300B (en) User interface testing method, device, server and storage medium
CN110580226B (en) Object code coverage rate testing method, system and medium for operating system level program
CN110543420B (en) Software testing method, system, terminal and storage medium
CN111274154A (en) Automatic testing method, device, equipment and storage medium
CN110688173B (en) Positioning method and device of components in cross-platform interface framework and electronic equipment
CN110990274A (en) Data processing method, device and system for generating test case
CN111427771A (en) Code coverage rate analysis method, equipment, server and readable storage medium
CN105404574B (en) Smart card and mobile terminal consistency test method and device
CN108009085B (en) Channel package testing method
CN106557419B (en) Program testing method and device
JP2017084082A (en) Simulation device, test scenario file creation method, and test method using test scenario file
CN110633220A (en) Debugging information display method and device, storage medium and electronic equipment
CN110889116B (en) Advertisement interception method and device and electronic equipment
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN116431467A (en) Page test method, device, equipment and medium
CN109688025B (en) Test monitoring method, device, terminal and storage medium based on digital KVM
CN107402883A (en) A kind of data test treating method and apparatus
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN115129575A (en) Code coverage result generation method and device
CN112486802A (en) Flutter test auxiliary method and device
CN111309598A (en) Test case execution environment recovery method, system, terminal and storage medium
CN111274143B (en) Buried point test method, buried point test device, buried point test equipment 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