CN113515441A - Application information acquisition method and system, electronic equipment and storage medium - Google Patents

Application information acquisition method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113515441A
CN113515441A CN202110265943.7A CN202110265943A CN113515441A CN 113515441 A CN113515441 A CN 113515441A CN 202110265943 A CN202110265943 A CN 202110265943A CN 113515441 A CN113515441 A CN 113515441A
Authority
CN
China
Prior art keywords
application
information
dynamic link
page
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110265943.7A
Other languages
Chinese (zh)
Inventor
刘旭东
张谷亮
郑伟平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aspire Digital Technologies Shenzhen Co Ltd
Original Assignee
Aspire Digital Technologies Shenzhen 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 Aspire Digital Technologies Shenzhen Co Ltd filed Critical Aspire Digital Technologies Shenzhen Co Ltd
Priority to CN202110265943.7A priority Critical patent/CN113515441A/en
Publication of CN113515441A publication Critical patent/CN113515441A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an application information acquisition method, an application information acquisition system, electronic equipment and a storage medium. The method of the present application comprises: the method comprises the steps of obtaining an initial link project, application information of an application program and page initial information of the application program, then importing the obtained application information and the page initial information into the initial link project to generate a dynamic link project, compiling the dynamic link project to obtain a dynamic link library, and finally loading the dynamic link library into the application program, so that the application program can acquire page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when developing the application, and the page initial information of the application is rapidly obtained according to the user requirements.

Description

Application information acquisition method and system, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of automated testing, and in particular, to a method and system for collecting application information, an electronic device, and a storage medium.
Background
The automated frameworks of some operating systems usually acquire the positions and information of primitive elements in an application page of the operating system through a UI (user interface) control retrieval technology, so that test scripts corresponding to the controls can be written conveniently to simulate clicking or other operations, thereby achieving the purpose of automated testing. Because some operating systems are not open source systems, providing customized services is very limited, and automatic testing usually requires developers to manually add corresponding page elements, such as scripts for specifying control buttons, texts, and the like, in a development stage, and then to test a frame through a native UI of the operating system, but this cannot effectively collect all information of the page elements.
Currently, a native framework of an operating system may be linked by a third-party cross-platform test automation tool, so as to obtain information of native elements in an application page started by an operating system device, such as a control name, a control type, a width, a height, coordinates, and the like. However, the page data returned by the third-party cross-platform test tool is not all attributes of the control, but is custom data output according to the functions of the automatic test tool, and the custom data output by the automatic test tool may not collect element attribute data required by the user, so that the test requirement of a certain depth cannot be met.
Disclosure of Invention
The present application is directed to solving at least one of the problems in the prior art. Therefore, the application information acquisition method, the application information acquisition system, the electronic device and the storage medium are provided, a native test framework of an operating system is not needed, developers can be ensured not to specially develop test scripts corresponding to the page controls when developing applications, and page initial information of the applications can be rapidly acquired according to user requirements.
According to the application information acquisition method of the embodiment of the first aspect of the application, the method comprises the following steps:
acquiring initial link engineering, application information of an application program and page initial information;
importing the application information and the page initial information into the initial link project to generate a dynamic link project;
compiling the dynamic link engineering to obtain a dynamic link library;
and loading the dynamic link library to the application program so that the application program collects page target information according to the dynamic link library.
The application information acquisition method according to the embodiment of the application has at least the following beneficial effects:
the method comprises the steps of obtaining an initial link project, application information of an application program and page initial information of the application program, then importing the obtained application information and the page initial information into the initial link project to generate a dynamic link project, compiling the dynamic link project to obtain a dynamic link library, and finally loading the dynamic link library into the application program, so that the application program can acquire page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when the application is developed, and the page initial information of the application is rapidly obtained according to the user requirements.
According to some embodiments of the application, the page initial information of the application is obtained by:
acquiring a page view of a preset application;
filtering internal child controls in the page view;
and extracting page initial information in the page view, wherein the page initial information comprises control information.
According to some embodiments of the application, the method further comprises:
acquiring a control variable corresponding to the control information and a control method called by the control variable;
and serializing the control variable and the control method to generate sequence information.
According to some embodiments of the application, the loading the dynamically linked library to the application comprises:
determining an operating system applied by the application program based on the application information;
acquiring a development tool of the operating system;
and loading the dynamic link library into the preset application through the development tool.
According to some embodiments of the present application, said enabling the application program to collect the page target information according to the dynamic link library includes:
establishing communication service in the dynamic link library;
and acquiring page target information in the application program based on the communication service.
According to some embodiments of the application, the loading the dynamically linked library to the application comprises:
acquiring an executable file generated after the application program is compiled and packaged;
and loading the dynamic link library into the executable file.
According to some embodiments of the application, the method further comprises:
acquiring a first signature certificate corresponding to the dynamic link library and a second signature certificate corresponding to the executable file;
judging whether the signatures of the first signature certificate and the second signature certificate are the same;
and if so, determining that the dynamic link library is loaded normally.
According to the application information acquisition system of the second aspect embodiment of this application, including:
an acquisition module: the acquisition module is used for acquiring initial link engineering, application information of an application program and page initial information;
an importing module: the import module is used for importing the application information and the page initial information into the initial link project to generate a dynamic link project;
a compiling module: the compiling module is used for compiling the dynamic link engineering to obtain a dynamic link library; (ii) a
An acquisition module: the acquisition module is used for loading the dynamic link library to the application program so that the application program acquires page target information according to the dynamic link library.
The application information acquisition system according to the embodiment of the application has at least the following beneficial effects:
the application information acquisition system comprises an acquisition module, an introduction module, a compiling module and an acquisition module, wherein the acquisition module acquires initial link engineering, application information of an application program and page initial information of the application program, the introduction module introduces the acquired application information and the page initial information into the initial link engineering to generate dynamic link engineering, the compiling module compiles the dynamic link engineering to obtain a dynamic link library, and the acquisition module loads the dynamic link library into the application program so that the application program can acquire page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when the application is developed, and the page initial information of the application is rapidly obtained according to the user requirements.
An electronic device according to an embodiment of a third aspect of the present application includes:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions that are executed by the at least one processor, so that the at least one processor, when executing the instructions, implements the application information acquisition method according to any one of the embodiments of the first aspect of the present application.
According to the electronic equipment of the embodiment of the application, at least the following beneficial effects are achieved: the method for acquiring the application information includes acquiring an initial link project, application information of an application program and page initial information of the application program by executing the method for acquiring the application information according to the first aspect, then importing the acquired application information and page initial information into the initial link project to generate a dynamic link project, compiling the dynamic link project to obtain a dynamic link library, and finally loading the dynamic link library into the application program, so that the application program can acquire page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when the application is developed, and the page initial information of the application is rapidly obtained according to the user requirements.
A computer-readable storage medium according to a fourth aspect embodiment of the present application, comprising:
the computer-readable storage medium stores computer-executable instructions for performing the application information acquisition method according to the embodiment of the first aspect of the present application.
The computer-readable storage instructions according to the embodiments of the present application have at least the following advantages: the method for acquiring the application information includes acquiring an initial link project, application information of an application program and page initial information of the application program by executing the method for acquiring the application information according to the first aspect, then importing the acquired application information and page initial information into the initial link project to generate a dynamic link project, compiling the dynamic link project to obtain a dynamic link library, and finally loading the dynamic link library into the application program, so that the application program can acquire page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when the application is developed, and the page initial information of the application is rapidly obtained according to the user requirements.
Additional aspects and advantages of the present application 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 present application.
Drawings
The present application is further described with reference to the following figures and examples, in which:
FIG. 1 is a first flowchart of an application information gathering method provided by some embodiments of the present application;
fig. 2 is a first flowchart of step S400 in an application information collecting method according to some embodiments of the present application;
fig. 3 is a second flowchart of step S400 in the application information collecting method according to some embodiments of the present application;
fig. 4 is a third flowchart of step S400 in the application information collecting method according to some embodiments of the present application;
FIG. 5 is a second flowchart of an application information gathering method provided by some embodiments of the present application;
FIG. 6 is a third flowchart of an application information collection method provided by some embodiments of the present application;
fig. 7 is a flowchart illustrating a specific application of an application information collecting method according to another embodiment of the present application;
fig. 8 is a block diagram of a module structure of a resource allocation apparatus according to some embodiments of the present application.
Reference numerals:
the system comprises an acquisition module 100, an import module 200, a compiling module 300 and an acquisition module 400.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, 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 exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and larger, smaller, larger, etc. are understood as excluding the present number, and larger, smaller, inner, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means 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 present application. In this specification, the schematic representations of the terms used above do not necessarily 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.
Currently, a native framework of an operating system may be linked by a third-party cross-platform test automation tool, so as to obtain information of native elements in an application page started by an operating system device, such as a control name, a control type, a width, a height, coordinates, and the like. However, the page data returned by the third-party cross-platform test tool is not all attributes of the control, but is custom data output according to the functions of the automatic test tool, and the custom data output by the automatic test tool may not collect element attribute data required by the user, so that the test requirement of a certain depth cannot be met.
Based on this, the application information acquisition method, system, electronic device and storage medium can acquire an initial link project, application information of an application program and page initial information of the application program, then import the acquired application information and page initial information into the initial link project, generate a dynamic link project, compile the dynamic link project to obtain a dynamic link library, and finally load the dynamic link library into the application program, so that the application program can acquire page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when the application is developed, and the page initial information of the application is rapidly obtained according to the user requirements.
It should be noted that, in the embodiment of the present application, an ios operating system is taken as an example, and is used to solve the problem that the ios operating system is a non-open source system.
In a first aspect, an embodiment of the present application provides an application information acquisition method.
Referring to fig. 1, fig. 1 is a method for acquiring application information according to some embodiments of the present application, which specifically includes the steps of:
s100, acquiring initial link engineering, application information of an application program and page initial information;
s200, importing the application information and the page initial information into an initial link project to generate a dynamic link project;
s300, compiling a dynamic link project to obtain a dynamic link library;
s400, loading the dynamic link library to the application program so that the application program collects page target information according to the dynamic link library.
In step S100, in the embodiment of the present application, an initial link project, application information of an application program, and page initial information need to be obtained, where the initial link project is created in a manner of normally developing a native dynamic library, and an application information acquisition method mentioned in the embodiment of the present application takes an ios system as an example, first, an ios dynamic library, that is, the initial link project mentioned in the embodiment of the present application, is created in a manner of normally developing a native dynamic library, and then, application information of the application program is obtained, where the application information includes an application name, a package name, a version, a device type, a screen width and a screen height, a screen ratio, a currently obtained screenshot, and the like, and data of an application to be tested is provided for a test page, and the package name is a unique ID of an application package, which is a unique identifier of each ios application. In practical applications, the ios native framework UIKit can be used to read the mainBundle, and obtain the application information of the application program through the mainBundle, wherein the UIKit framework provides a series of classes to establish and manage the user interface, the application object, the event control, the drawing model, the window, the view of the iPhone OS application program, and the interface for controlling the touch screen, etc., and the mainBundle is the location of the resources used by the application program, such as code, graphics, music, etc., in the file system. The page initial information of the application program is a page element in the application program, and in practical application, the page element in the ios application to be tested can be obtained by using a recurvedescription function of keyWindow in a UIkit frame through a UIkit frame native to ios.
In some embodiments, the page initial information of the application program in the embodiments of the present application is obtained by the following steps:
acquiring a page view of a preset application; and filtering the internal sub-controls in the page view, and extracting page initial information in the page view, wherein the page initial information comprises control information. The page view is used for displaying the distribution condition of all contents of a document in the application program on the whole page and the position of the whole document on each page, and can be edited to achieve the effect of visualization operation. In practical applications, because the view of the ios application running the current interface is loaded into Window, all elements of the view are obtained from Window, where Window represents a Window opened in a browser. The views acquired in the embodiment of the application are sorted according to the adding sequence and level, an internal sub-control with a prefix, such as the UILayoutguide, is filtered, each layer of view of a page is read in a traversing mode, the class name, the memory address, the control coordinate, the user interaction attribute, the gesture recognition and the like of the control are acquired, the UILayoutguide is a virtual view, the internal sub-control with the prefix is acquired, and the internal sub-control does not need to be acquired in acquired data, so that the internal sub-control needs to be filtered. The user interaction attributes in the embodiment of the application include user interaction, a control state and multi-touch, wherein the user interaction indicates whether the control enables the user interaction, if not, for example, a button is clicked, an event is not triggered, the control state indicates whether the control enables the state, if not, neither a control selection state nor a highlight state is displayed, and the multi-touch indicates that a plurality of touch events are supported. The gesture recognition in the embodiment of the application comprises the following steps: the gesture comprises a click gesture, a pinch gesture, a rotation gesture, a slide gesture, a drag gesture and a long press gesture, wherein the click gesture processes click touch recognition and supports single-point and multi-point gestures; the pinch gesture handles recognition of the proportion and speed of finger pinching; the rotation gesture is used for processing the identification of the rotation gesture, the rotation angle and the rotation speed; the sliding gesture is used for processing the sliding gesture, the processor is set to process the swipe in the direction, and the gesture processor is appointed to process the touch events of a plurality of fingers; the dragging gesture is used for processing the dragging gesture, the dragging gesture can be carried out by a plurality of fingers at most, the dragging by a plurality of fingers at least, the displacement of the dragging gesture on the appointed control and the dragging speed of the dragging gesture on the appointed control are supported at least; the long-press gesture handles the long-press gesture, which starts out for at least as many seconds as it is pressed down, and must be pressed down with several fingers, specifying the maximum distance the long-press gesture allows the user to move.
In step S200, the application information and the page initial information are imported into an initial link project to generate a dynamic link project, that is, the application information and the page initial information acquired in step S100 are imported into the initial link project to obtain the dynamic link project.
In step S300, the dynamic link project is compiled to obtain a dynamic link library.
In step S400, the dynamic link library is loaded to the application program, so that the application program collects page target information according to the dynamic link library, where the page target information is that the user acquires page elements in the application program according to actual needs.
In some embodiments, as shown in fig. 2, the "loading the dynamic link library into the application program" in step S400 specifically includes:
s410, determining an operating system applied by the application program based on the application information;
s420, acquiring a development tool of the operating system;
and S430, loading the dynamic link library into a preset application through a development tool.
In step S410, an operating system, such as an android system or an ios system, to which the application program is applied is determined based on the application information of the application program.
In step S420, a development tool corresponding to the operating system is obtained, taking the ios operating system as an example, and the dynamic library is loaded into the ios application through an Xcode, where the Xcode is an integrated development tool running on the ios. After the dynamic link library is compiled, the dynamic link library needs to be loaded into the process of the application program, so that the page structure in the Window can be read, and the obtained initial page information can be dynamically integrated and linked to the application program based on the information mechanism in the RunTime. In the embodiment of the application, a message mechanism in RunTime is utilized, a structure is dynamically acquired through the message mechanism RunTime of ios during running, a basic framework of ios is basically realized by an Objective-C language (an object-oriented programming language (OBjC) or OC) which extends C, the Objective-C language is a dynamic language, a lot of things which are done by a static language during compiling and linking periods are put into running for processing, which function is really called cannot be determined during compiling, a corresponding function is found according to the name of the function for calling only during real running, and any function can be called during a compiling stage, even if the function is not realized, no error is reported as long as the function is declared.
In step S430, the dynamic link library is loaded into the preset application through the development tool, for example, in the ios system, the dynamic link library is loaded into the application program through the Xcode.
In some embodiments, as shown in fig. 3, the step S400 of "enabling the application to collect the page target information according to the dynamic link library" specifically includes:
s440, establishing communication service in the dynamic link library;
s450, acquiring page target information in the application program based on the communication service.
In step S440, a communication service is established in the dynamic link library, taking a mobile phone using an ios system as an example, an ios terminal device is used as a server, a third-party component usbmux d is used to create a USB (Universal Serial Bus) service support, a third-party component gcdasync Socket is used to create a Socket, and a third-party component is used to create an HTTP (Hypertext Transfer Protocol) and the like, so that service communication supporting multiple protocols can be realized, a flow of customizing interactive data is simplified, and access development cost is quickly and efficiently realized. The usbmuxd service is mainly used for realizing multi-path TCP connection on a USB protocol, USB communication is abstracted into TCP communication, GCDAsyncsocket is asynchronous interactive Socket communication completed by a multitasking mechanism of apples, Socket is Socket, and is an abstraction of an endpoint for bidirectional communication between application processes on different hosts in a network, and is an interface for communication and interaction between an application program and a network protocol root.
In step S450, the page target information in the application program is acquired based on the communication service, for example, in the case of an ios application program active code, a dynamic link library may be loaded into the application program through an Xcode, then the application program is directly packaged, a direct running application program may be installed after the compiling and packaging are completed, and a communication service interface protocol established in the dynamic link library is requested to acquire a page element, that is, a page target element, in the application program.
In some embodiments, as shown in fig. 4, the "loading a dynamic link library into an application" in step S400 specifically includes:
s460, acquiring an executable file generated after the application program is compiled and packaged;
s470, loading the dynamic link library into the executable file.
In step S460, an executable file generated by the application after compiling and packaging is obtained.
In step S470, the dynamic link library is loaded into the executable file, in practical applications, the dynamic link library needs to be manually injected under the condition that the ios application program has no application source code, and at this time, a third-party tool needs to be used to inject the dynamic link library into a binary file of the application program, where the binary file is obtained by translating program data into machine code and outputting the machine code to a disk for storage, and after the ios application is compiled and packaged, a corresponding binary executable file of the ios system is generated.
In some embodiments, as shown in fig. 5, the application information collecting method mentioned in the present application specifically further includes the steps of:
s500, acquiring a control variable corresponding to the control information and a control method called by the control variable;
s600, serializing the control variables and the control methods to generate sequence information.
In step S500, in the embodiment of the present application, control attributes need to be read, and at this time, control information in initial page information needs to be acquired, and a control variable corresponding to the control information and a control method called by the control variable need to be acquired.
In step S600, the control variables and the control methods are serialized to generate sequence information, where the sequence information indicates that the control variables and the control methods are obtained by being arranged according to a certain format after being processed by a certain amount. For example, the control variables and the control methods are serialized into a json (JavaScript Object Notation) structure, readability is enhanced, the json is conveniently sent to a service page through an interface, that is, a page where a user needs to view sequence information, and then the service page is converted and displayed into control elements convenient to understand according to corresponding fields.
In some embodiments, as shown in fig. 6, the application information collecting method mentioned in the present application specifically further includes the steps of:
s700, acquiring a first signature certificate corresponding to the dynamic link library and a second signature certificate corresponding to the executable file;
s800, judging whether the signatures of the first signature certificate and the second signature certificate are the same;
and S900, if yes, determining that the dynamic link library is loaded normally.
In step S700, in the embodiment of the present application, a signature needs to be performed on the dynamic link library to obtain a first signature certificate, and a signature needs to be performed on the executable file to obtain a second signature certificate.
In step S800, it is determined whether the signatures of the first signature certificate and the second signature certificate are the same, and if not, it indicates that the dynamic link library is not loaded normally.
In step S900, if the signatures of the first signature certificate and the second signature are the same, it is determined that the dynamic link library is normally loaded, and since the non-jail-crossing device must be signed by the same certificate, the first signature certificate and the second signature certificate must both be signed by the same certificate before normal operation can be performed.
In some embodiments, as shown in fig. 7, in practical applications, an ios dynamic link library is created first, then basic information of an application program is read, then all elements in a page view are obtained from windows in a memory, then a function list and attributes of the elements are obtained based on RunTime, data is derived after a communication service is created, and finally, dynamic library connection is performed, so that page target information of a page can be obtained through the application program after an active code link of the application program or an installation package link of the application program is tested.
In the embodiment of the application, an initial link project, application information of an application program and page initial information of the application program are obtained, the obtained application information and the obtained page initial information are imported into the initial link project to generate a dynamic link project, the dynamic link project is compiled to obtain a dynamic link library, and the dynamic link library is loaded into the application program, so that the application program can acquire page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when the application is developed, and the page initial information of the application is rapidly obtained according to the user requirements.
In a second aspect, an embodiment of the present application further provides an application information collecting system for executing the application information collecting method mentioned in the embodiment of the first aspect.
In some embodiments, as shown in fig. 8, the application information collecting system includes an obtaining module 100, an importing module 200, a compiling module 300, and a collecting module 400, where the obtaining module 100 obtains an initial link project, application information of an application program, and page initial information of the application program, the importing module 200 imports the obtained application information and page initial information into the initial link project to generate a dynamic link project, the compiling module 300 compiles the dynamic link project to obtain a dynamic link library, and the collecting module 400 loads the dynamic link library into the application program, so that the application program can collect page target information of the application program according to the dynamic link library. According to the method and the device, the dynamic link library is linked after the application program is developed, the page target information is collected through the dynamic link library, the function code of the application program does not need to be invaded, a native test framework of an operating system does not need to be used, a developer can be ensured not to specially develop a test script corresponding to the page control when the application is developed, and the page initial information of the application is rapidly obtained according to the user requirements.
In a third aspect, an embodiment of the present application further provides an electronic device.
In some embodiments, an electronic device includes: at least one processor, and a memory communicatively coupled to the at least one processor; the storage stores instructions, and the instructions are executed by the at least one processor, so that when the at least one processor executes the instructions, the application information acquisition method in any one of the embodiments of the present application is implemented.
The processor and memory may be connected by a bus or other means.
The memory, which is a non-transitory computer readable storage medium, may be used to store a non-transitory software program and a non-transitory computer executable program, such as the application information collection method described in the embodiments of the present application. The processor implements the above-described application information acquisition method by running non-transitory software programs and instructions stored in the memory.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area can store and execute the application information acquisition method. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions needed to implement the application information collection method described above are stored in a memory and, when executed by one or more processors, perform the application information collection method mentioned in the first aspect embodiment above.
In a fourth aspect, the present application further provides a computer-readable storage medium.
In some embodiments, the computer-readable storage medium stores computer-executable instructions for performing the application information acquisition method mentioned in the embodiments of the first aspect.
In some embodiments, the storage medium stores computer-executable instructions that, when executed by one or more control processors, for example, by a processor in the electronic device, cause the one or more processors to perform the application information collection method.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present application. Furthermore, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.

Claims (10)

1. The application information acquisition method is characterized by comprising the following steps:
acquiring initial link engineering, application information of an application program and page initial information;
importing the application information and the page initial information into the initial link project to generate a dynamic link project;
compiling the dynamic link engineering to obtain a dynamic link library;
and loading the dynamic link library to the application program so that the application program collects page target information according to the dynamic link library.
2. The method for acquiring application information according to claim 1, wherein the page initial information of the application program is obtained by the following steps:
acquiring a page view of a preset application;
filtering internal child controls in the page view;
and extracting page initial information in the page view, wherein the page initial information comprises control information.
3. The application information acquisition method according to claim 2, characterized in that the method further comprises:
acquiring a control variable corresponding to the control information and a control method called by the control variable;
and serializing the control variable and the control method to generate sequence information.
4. The method for acquiring application information according to claim 1, wherein the loading the dynamic link library into the application program comprises:
determining an operating system applied by the application program based on the application information;
acquiring a development tool of the operating system;
and loading the dynamic link library into the preset application through the development tool.
5. The method for acquiring application information according to claim 4, wherein the enabling the application program to acquire the page target information according to the dynamic link library comprises:
establishing communication service in the dynamic link library;
and acquiring page target information in the application program based on the communication service.
6. The method for acquiring application information according to claim 1, wherein the loading the dynamic link library into the application program comprises:
acquiring an executable file generated after the application program is compiled and packaged;
and loading the dynamic link library into the executable file.
7. The application information acquisition method of claim 6, further comprising:
acquiring a first signature certificate corresponding to the dynamic link library and a second signature certificate corresponding to the executable file;
judging whether the signatures of the first signature certificate and the second signature certificate are the same;
and if so, determining that the dynamic link library is loaded normally.
8. An application information acquisition system comprising:
an acquisition module: the acquisition module is used for acquiring initial link engineering, application information of an application program and page initial information;
an importing module: the import module is used for importing the application information and the page initial information into the initial link project to generate a dynamic link project;
a compiling module: the compiling module is used for compiling the dynamic link engineering to obtain a dynamic link library; (ii) a
An acquisition module: the acquisition module is used for loading the dynamic link library to the application program so that the application program acquires page target information according to the dynamic link library.
9. An electronic device, comprising:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions for execution by the at least one processor to cause the at least one processor, when executing the instructions, to implement the application information gathering method as recited in any one of claims 1 to 7.
10. Computer-readable storage media, characterized in that the computer-readable storage media stores computer-executable instructions for performing the application information acquisition method according to any one of claims 1 to 7.
CN202110265943.7A 2021-03-11 2021-03-11 Application information acquisition method and system, electronic equipment and storage medium Pending CN113515441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110265943.7A CN113515441A (en) 2021-03-11 2021-03-11 Application information acquisition method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110265943.7A CN113515441A (en) 2021-03-11 2021-03-11 Application information acquisition method and system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113515441A true CN113515441A (en) 2021-10-19

Family

ID=78061230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110265943.7A Pending CN113515441A (en) 2021-03-11 2021-03-11 Application information acquisition method and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113515441A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114510308A (en) * 2022-01-28 2022-05-17 北京百度网讯科技有限公司 Method, device, equipment and medium for storing application page by mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114510308A (en) * 2022-01-28 2022-05-17 北京百度网讯科技有限公司 Method, device, equipment and medium for storing application page by mobile terminal
CN114510308B (en) * 2022-01-28 2023-10-03 北京百度网讯科技有限公司 Method, device, equipment and medium for storing application page by mobile terminal

Similar Documents

Publication Publication Date Title
CN109976761B (en) Software development kit generation method and device and terminal equipment
CN107291438B (en) Automatic script generation method and device and electronic equipment
US9983892B2 (en) Deep linking to mobile application states through programmatic replay of user interface events
CN107423048B (en) Data collection method, device, medium and computing equipment
CN106326104B (en) Terminal control testing method and device
US9053241B2 (en) Scripting application with role identification
CN107368420A (en) API method of testings, device and electronic equipment
CN111488109A (en) Method, device, terminal and storage medium for acquiring control information of user interface
CN113515441A (en) Application information acquisition method and system, electronic equipment and storage medium
CN114217789A (en) Function component expansion method, device, equipment, storage medium and program product
US20220334853A1 (en) System and method for accelerating modernization of user interfaces in a computing environment
CN114297700A (en) Dynamic and static combined mobile application privacy protocol extraction method and related equipment
CN108037914B (en) Method and device for developing android native system by combining js
CN115509913A (en) Software automation test method, device, machine readable medium and equipment
CN113515263B (en) Industrial APP mechanism model deployment method, device, equipment and readable storage medium
CN115437608A (en) Intelligent research and development assisting method and device
CN110297647B (en) Method and terminal for updating npm packet by front-end engineering
KR20150099318A (en) A recording media recognized by computer for providing an application developing environment program
CN108733279A (en) Drop-down list display methods and device
CN107506299B (en) Code analysis method and terminal equipment
Smyth Android Studio 3.4 Development Essentials-Kotlin Edition
WO2022237826A1 (en) User interface testing method and system, cluster, medium, and program product
Li et al. Design and Implementation of API Automation Testing System for Mobile Hybrid Mode Based on Appium Technology
CN112559311B (en) Interface adaptation method and device for mobile terminal automatic test
CN117971638A (en) Application testing method, device, equipment, program product and 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