CN113342702B - Application program testing method, device, equipment and readable storage medium - Google Patents

Application program testing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113342702B
CN113342702B CN202110891961.6A CN202110891961A CN113342702B CN 113342702 B CN113342702 B CN 113342702B CN 202110891961 A CN202110891961 A CN 202110891961A CN 113342702 B CN113342702 B CN 113342702B
Authority
CN
China
Prior art keywords
application program
layer
virtual
application
tested
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
CN202110891961.6A
Other languages
Chinese (zh)
Other versions
CN113342702A (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.)
Wuhan Tianyu Information Industry Co Ltd
Original Assignee
Wuhan Tianyu Information Industry 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 Wuhan Tianyu Information Industry Co Ltd filed Critical Wuhan Tianyu Information Industry Co Ltd
Priority to CN202110891961.6A priority Critical patent/CN113342702B/en
Publication of CN113342702A publication Critical patent/CN113342702A/en
Application granted granted Critical
Publication of CN113342702B publication Critical patent/CN113342702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

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

Abstract

The application relates to an application program testing method, device, equipment and readable storage medium, relating to the technical field of application program testing and comprising the following steps: constructing a virtual drive layer, wherein the virtual drive layer is used for simulating a hardware drive layer of an application program to be tested; importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program; and sending a test instruction to the virtual application program for testing the virtual application program. By the method and the device, the application program can be directly tested in the virtual machine without entity equipment and a simulator, so that the testing efficiency can be improved, and the loss of the entity equipment due to the defect of a program code can be reduced.

Description

Application program testing method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of application testing technologies, and in particular, to an application testing method, an application testing device, an application testing apparatus, and a readable storage medium.
Background
In the development process of embedded software, the importance of program debugging is not inferior to writing codes, because a designed better program can also inevitably generate errors which need to be eliminated by debugging; generally, the more complex the function of a program is, the more workload the debugging process is, and the more important it is.
Currently, the simulation debugging of the application program is often completed by means of an external simulation device. Although the simulator can completely simulate the running environment of the application program on the intelligent device, the following problems exist in the test of the application program through the simulator: the simulator is low in starting and running speed, and the running is easily stopped due to unforeseen problems in the debugging process, so that the simulator can be continuously used after being restarted, and the problem of low testing efficiency exists.
Disclosure of Invention
The application provides an application program testing method, device, equipment and readable storage medium, and aims to solve the problem of low testing efficiency caused by application program testing through a simulator in the related art.
In a first aspect, an application program testing method is provided, which includes the following steps:
constructing a virtual drive layer, wherein the virtual drive layer is used for simulating a hardware drive layer of an application program to be tested;
importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
and sending a test instruction to the virtual application program for testing the virtual application program.
In some embodiments, the virtual drive layer is used for read and write operations, arithmetic operations, and communication operations.
In some embodiments, the method further comprises creating a storage file, and the read and write operations comprise:
and the virtual drive layer carries out read and write operations on the storage file so as to simulate the access of the hardware drive layer to the storage space of a hardware chip.
In some embodiments, after the step of sending the test instruction to the virtual application for testing the virtual application, the method further includes:
replacing the code of the virtual drive layer with the code of the hardware drive layer of the application program to be tested;
and importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the hardware drive layer for compiling, and generating firmware for hardware equipment to run.
In a second aspect, an application testing apparatus is provided, including:
the device comprises a construction unit, a detection unit and a control unit, wherein the construction unit is used for constructing a virtual drive layer, and the virtual drive layer is used for simulating a hardware drive layer of an application program to be detected;
the compiling unit is used for importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
the testing unit is used for sending a testing instruction to the virtual application program so as to test the virtual application program.
In a third aspect, another application program testing method is provided, which includes the following steps:
constructing a virtual drive layer, wherein the virtual drive layer is used for simulating a hardware drive layer of an application program to be tested;
importing the codes of the OS layer and the platform layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
importing the compiled code of the application layer of the application program to be tested into the virtual application program in a byte code mode;
performing interpretation operation on the bytecode based on the virtual application program;
obtaining a Trace log file based on an explanation operation process, wherein the Trace log file comprises diagnosis information and debugging information;
and determining the accuracy of the application layer code of the application program to be tested based on the Trace log file.
In some embodiments, the bytecode is binary data.
In a fourth aspect, there is provided another application testing apparatus, including:
the device comprises a construction unit, a detection unit and a control unit, wherein the construction unit is used for constructing a virtual drive layer, and the virtual drive layer is used for simulating a hardware drive layer of an application program to be detected;
the compiling unit is used for importing the codes of the OS layer and the platform layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
the import unit is used for importing the compiled codes of the application layer of the application program to be tested into the virtual application program in a byte code mode;
the processing unit is used for a platform layer in the virtual application program to perform interpretation and operation on the byte codes;
the test unit is used for obtaining a Trace log file based on an explanation operation process, wherein the Trace log file comprises diagnosis information and debugging information; and determining the accuracy of the application layer code of the application program to be tested based on the Trace log file.
In a fifth aspect, an application test apparatus is provided, including: the device comprises a memory and a processor, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to realize the application program testing method.
In a sixth aspect, a computer-readable storage medium is provided, which stores computer instructions that, when executed by a computer, cause the computer to perform the aforementioned application testing method.
The application provides an application program testing method, device, equipment and readable storage medium, comprising the following steps: constructing a virtual drive layer, wherein the virtual drive layer is used for simulating a hardware drive layer of an application program to be tested; importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program; and sending a test instruction to the virtual application program for testing the virtual application program. By the method and the device, the application program can be directly tested in the virtual machine without entity equipment and a simulator, so that the testing efficiency can be improved, and the loss of the entity equipment due to the defect of a program code can be reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an application testing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another application testing method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an application test device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
The embodiment of the application program testing method, device and equipment and the readable storage medium can solve the problem of low testing efficiency caused by application program testing through a simulator in the related art.
Fig. 1 is a method for testing an application program according to an embodiment of the present application, including the following steps:
step S10: constructing a virtual drive layer, wherein the virtual drive layer is used for simulating a hardware drive layer of an application program to be tested;
step S20: importing a code of an OS (operating system) layer, a code of a platform layer and a code of an application layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
step S30: and sending a test instruction to the virtual application program for testing the virtual application program.
By the method and the device, the application program can be directly tested in the virtual machine without entity equipment and a simulator, so that the testing efficiency can be improved, and the loss of the entity equipment due to the defect of a program code can be reduced.
Furthermore, in the embodiment of the present application, the virtual driver layer is used for read-write operations, arithmetic operations, and communication operations.
Further, in this embodiment of the present application, the method further includes creating a storage file, and the read-write operation includes:
and the virtual drive layer carries out read and write operations on the storage file so as to simulate the access of the hardware drive layer to the storage space of a hardware chip.
Further, in the embodiment of the present application, after the step S30, the method further includes the following steps:
replacing the code of the virtual drive layer with the code of the hardware drive layer of the application program to be tested;
and importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the hardware drive layer for compiling, and generating firmware for hardware equipment to run.
The following describes embodiments of the application test method in further detail with reference to specific examples.
The virtual machine system can be formed by respectively building 4 layers such as a virtual drive layer, an OS layer, a platform layer and an application layer in a Visual Studio environment from bottom to top. The Visual Studio is the most popular integrated development environment of the Windows platform application program, is a basically complete development tool set and comprises most of tools required in the whole software life cycle, and the tools are used for building the virtual drive layer in the application; the OS layer is identical to the OS layer of the application to be tested (the application to be tested is equivalent to an entity smart device), the platform layer is identical to the platform layer of the application to be tested, and the application layer is identical to the application layer of the application to be tested.
The virtual drive layer is used for simulating a hardware drive layer of the application program to be tested, namely, the function of the hardware drive layer on the entity intelligent equipment is realized in a simulation mode without carrying an intelligent chip, so that the application program to be tested can normally run various functions without depending on the entity equipment; in addition, a read/write function, an arithmetic function, a communication function, and the like are provided for the virtual drive layer. The reading and writing function is not to access the storage space of the chip, but to read and write the storage file; the operation function is to realize various algorithm functions supported in the chip by a pure software coding mode; the communication function is to use the own communication interface on the windows, such as a TCP/IP interface, to realize communication with other applications (such as a test tool for sending test data) on the PC by transceiving a specific data format. Whether simulation debugging and running environment on the entity intelligent equipment can be realized, the virtual driving layer plays a decisive role.
The OS layer is used for realizing the connection of the driver layer and the platform layer, namely an abstract layer for providing service for the upper code and playing a role in connecting the bottom driver with the upper code; the platform layer is used for providing a running environment, an interpreter and an API (Application Programming Interface), namely an Application running environment, an interpreter of Application bytecode and an Interface for Application calling, so that the platform layer can be integrated into a common Java virtual machine and the like; the application layer is loaded on the platform layer and used for realizing the preset function of the application program to be tested, and can be understood as upper-layer application written in various languages (such as C/C + +) and the like.
Because part of the application programs are pure native applications (namely native applications), the bottom layer codes and the upper layer codes can be directly led into the driver layer for integral compiling and debugging; therefore, taking the application program as a pure native application as an example, after the virtual driver layer, the OS layer, the platform layer and the application layer are built, the codes of the OS layer, the platform layer and the application layer are transplanted into the virtual driver layer to be compiled, and after the compilation is passed, an executable virtual application program is generated.
When the virtual application program is started for the first time, a storage file with the size consistent with that of a chip storage space is created, and the initial value of the storage file can be preset to 000000; because the virtual drive layer has a read-write function, addresses transmitted in the read-write interface can be mapped to corresponding logical addresses of the storage files one by one, so that the storage files are read and written, and access to the storage space of the hardware chip is simulated.
Sending the test instruction to the virtual application program so that the virtual application program can perform function test; the test instruction may be an instruction sent by a virtual machine, or may be an instruction sent by a special test tool (the test tool may be an application program, or may be other test equipment capable of providing a test instruction), and is not limited herein. Taking a test tool as an example for sending a test instruction to a test application program, writing a test script in the test application program, then running a virtual application program (equivalent to running a virtual intelligent device), selecting the virtual application program in the test application program (the virtual application program and the test application program can establish communication connection through TCP/IP), and sending the test instruction to the virtual application program or receiving a response by running the test script on the test application program, thereby completing the software debugging work of simulating an entity intelligent device by using the virtual application program.
In addition, because the OS layer, the platform layer and the application layer are completely the same as the programs of all layers running on the application program to be tested, the virtual application program after debugging and testing can be quickly transplanted to the entity intelligent equipment to run only by replacing the bottom layer driving code; therefore, after debugging and testing are completed, only the codes of the virtual drive layer need to be replaced by the codes of the hardware drive layer of the application program to be tested, and then the codes are wholly compiled and passed under the embedded software development environment to generate firmware, so that the firmware can be directly downloaded to the entity intelligent equipment to run, and the software development efficiency is greatly improved.
In order to solve the problem that embedded software is inconvenient to debug, the debugging of the application program is realized in a mode that a virtual drive layer simulates a hardware drive layer of the application program to be tested, so that entity equipment does not need to participate, any simulation device does not need to be used, the debugging can be simple and efficient, and the loss caused to the entity equipment due to the fact that program codes have defects can be reduced.
An embodiment of the present application further provides an application program testing apparatus, including:
the device comprises a construction unit, a detection unit and a control unit, wherein the construction unit is used for constructing a virtual drive layer, and the virtual drive layer is used for simulating a hardware drive layer of an application program to be detected;
the compiling unit is used for importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
the testing unit is used for sending a testing instruction to the virtual application program so as to test the virtual application program.
Furthermore, in the embodiment of the present application, the virtual driver layer is used for read-write operations, arithmetic operations, and communication operations.
Furthermore, in this embodiment of the present application, the test unit is further configured to create a storage file, and specifically, to enable the virtual driver layer to perform read and write operations on the storage file, so as to simulate an access of the hardware driver layer to a storage space of a hardware chip.
Further, in an embodiment of the present application, the apparatus further includes a replacement unit configured to: replacing the code of the virtual drive layer with the code of the hardware drive layer of the application program to be tested; and importing the codes of the OS layer, the platform layer and the application layer of the application program to be tested into the hardware drive layer for compiling, and generating firmware for hardware equipment to run.
It should be noted that, as is clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the apparatus and the units described above may refer to the corresponding processes in the foregoing embodiment of the application program testing method, and are not described herein again.
Referring to fig. 2, an embodiment of the present application further provides another application program testing method, including the following steps:
step N10: constructing a virtual drive layer, wherein the virtual drive layer is used for simulating a hardware drive layer of an application program to be tested;
step N20: importing the codes of the OS layer and the platform layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
step N30: importing the compiled code of the application layer of the application program to be tested into the virtual application program in a byte code mode;
step N40: performing interpretation operation on the bytecode based on the virtual application program;
step N50: obtaining a Trace log file based on an explanation operation process, wherein the Trace log file comprises diagnosis information and debugging information;
step N60: and determining the accuracy of the application layer code of the application program to be tested based on the Trace log file.
Another embodiment of the application test method of the present application is described in further detail below with reference to specific examples.
The virtual machine system can be formed by respectively building 3 layers such as a virtual drive layer, an OS layer, a platform layer and the like in a Visual Studio environment from bottom to top. The OS layer is identical to the OS layer of the application to be tested (the application to be tested is equivalent to an entity smart device), and the platform layer is identical to the platform layer of the application to be tested, so that the codes of the OS layer and the platform layer of the application to be tested can be directly transplanted to the OS layer and the platform layer in the present application, respectively.
It should be noted that, the structures and the working principles of the virtual driver layer and the OS layer in this embodiment are the same as or similar to those of the virtual driver layer and the OS layer in the previous embodiment of the application program testing method, and for convenience and simplicity of description, the specific working processes of the virtual driver layer and the OS layer described in this embodiment may refer to the corresponding processes in the previous embodiment of the application program testing method, and are not described herein again.
The platform layer is used to provide a runtime environment, an interpreter and an API (Application Programming Interface), that is, an Application runtime environment, an interpreter of Application bytecode, and an Interface for Application calls, so that the platform layer can be integrated into a virtual machine or the like for executing interpretation of binary file data.
After the virtual drive layer, the OS layer and the platform layer are built, the codes of the OS layer and the platform layer are transplanted into the virtual drive layer to be compiled, and after the compiling is passed, an executable virtual application program can be generated; when the virtual application program is started for the first time, a storage file with the size consistent with that of a chip storage space is created, and the initial value of the storage file can be preset to 000000; because the virtual drive layer has a read-write function, addresses transmitted in the read-write interface can be mapped to corresponding logical addresses of the storage files one by one, so that the storage files are read and written, and access to the storage space of the hardware chip is simulated.
However, since a part of the application programs (for example, the application programs written by programming languages such as JAVA, Python, and the like) need to be compiled separately, an external compiling tool needs to compile codes of an application layer of the application program to be tested (the application program to be tested needs to be compiled separately) to obtain byte code data, then load the byte code data into the virtual application program, and separately debug the bottom layer (i.e., the OS layer and the platform layer) codes and the application layer codes. The bytecode may be a binary data file generated by compiling in various programming languages.
Specifically, the breakpoint single step operation trace can be used to view data in a RAM and a virtual EEPROM (Electrically Erasable Programmable read only memory), so as to implement debugging of the OS layer and the platform layer; then, the binary data file is interpreted and run through a platform layer in the virtual application program, and a function of recording Trace is provided in the process of interpreting and running, namely, a Trace log file is generated when the virtual application program runs, and input and output parameters, diagnostic information, debugging information and the like of an important API called in the running process are recorded for being analyzed by developers, so that the codes of the application program loaded in a byte code form are called and tested; therefore, if the application program to be tested is loaded into the virtual application program in the form of byte codes, the accuracy of the application layer code of the application program to be tested can be determined based on the Trace log file.
In addition, because the OS layer and the platform layer are completely the same as the programs of all layers running on the application program to be tested, the virtual application program after debugging and testing can be quickly transplanted to the entity intelligent equipment to run only by replacing the bottom layer driving code; therefore, after debugging and testing are completed, only the codes of the virtual drive layer need to be replaced by the codes of the hardware drive layer of the application program to be tested, and then the codes are wholly compiled and passed under the embedded software development environment to generate firmware, so that the firmware can be directly downloaded to the entity intelligent equipment to run, and the software development efficiency is greatly improved.
In order to solve the problem that embedded software is inconvenient to debug, the debugging of the application program is realized in a mode that a virtual drive layer simulates a hardware drive layer of the application program to be tested, so that entity equipment does not need to participate, any simulation device does not need to be used, the debugging can be simple and efficient, and the loss caused to the entity equipment due to the fact that program codes have defects can be reduced.
The embodiment of the present application further provides another application program testing apparatus, including:
the device comprises a construction unit, a detection unit and a control unit, wherein the construction unit is used for constructing a virtual drive layer, and the virtual drive layer is used for simulating a hardware drive layer of an application program to be detected;
the compiling unit is used for importing the codes of the OS layer and the platform layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
the import unit is used for importing the compiled codes of the application layer of the application program to be tested into the virtual application program in a byte code mode;
the processing unit is used for a platform layer in the virtual application program to perform interpretation and operation on the byte codes; wherein the byte code is binary data;
the test unit is used for obtaining a Trace log file based on an explanation operation process, wherein the Trace log file comprises diagnosis information and debugging information; and determining the accuracy of the application layer code of the application program to be tested based on the Trace log file.
It should be noted that, as is clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the apparatus and the units described above may refer to the corresponding processes in the foregoing embodiment of the application program testing method, and are not described herein again.
The apparatus provided by the above embodiment may be implemented in the form of a computer program, which can run on the application testing device as shown in fig. 3.
An embodiment of the present application further provides an application program testing device, including: the system comprises a memory, a processor and a network interface which are connected through a system bus, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor so as to realize all steps or part of steps of the application program testing method.
The network interface is used for performing network communication, such as sending distributed tasks. Those skilled in the art will appreciate that the architecture shown in fig. 3 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The Processor may be a CPU, other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a video playing function, an image playing function, etc.), and the like; the storage data area may store data (such as video data, image data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements all or part of the steps of the foregoing application program testing method.
The embodiments of the present application may implement all or part of the foregoing processes, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the foregoing methods. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer memory, Read-Only memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunication signals, software distribution medium, etc., capable of carrying computer program code. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, server, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (5)

1. An application program testing method is characterized by comprising the following steps:
constructing a virtual drive layer, wherein the virtual drive layer is used for simulating a hardware drive layer of an application program to be tested;
importing the codes of the OS layer and the platform layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
importing the compiled code of the application layer of the application program to be tested into the virtual application program in a byte code mode;
performing interpretation operation on the bytecode based on the virtual application program;
obtaining a Trace log file based on an explanation operation process, wherein the Trace log file comprises diagnosis information and debugging information;
and determining the accuracy of the application layer code of the application program to be tested based on the Trace log file.
2. The application testing method of claim 1, wherein: the byte code is binary data.
3. An application testing apparatus, comprising:
the device comprises a construction unit, a detection unit and a control unit, wherein the construction unit is used for constructing a virtual drive layer, and the virtual drive layer is used for simulating a hardware drive layer of an application program to be detected;
the compiling unit is used for importing the codes of the OS layer and the platform layer of the application program to be tested into the virtual drive layer for compiling to obtain a virtual application program;
the import unit is used for importing the compiled codes of the application layer of the application program to be tested into the virtual application program in a byte code mode;
the processing unit is used for a platform layer in the virtual application program to perform interpretation and operation on the byte codes;
the test unit is used for obtaining a Trace log file based on an explanation operation process, wherein the Trace log file comprises diagnosis information and debugging information; and determining the accuracy of the application layer code of the application program to be tested based on the Trace log file.
4. An application test apparatus, comprising: a memory and a processor, the memory having stored therein at least one instruction that is loaded and executed by the processor to implement the application testing method of claim 1 or 2.
5. A computer-readable storage medium characterized by: the computer storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the application testing method of claim 1 or 2.
CN202110891961.6A 2021-08-04 2021-08-04 Application program testing method, device, equipment and readable storage medium Active CN113342702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110891961.6A CN113342702B (en) 2021-08-04 2021-08-04 Application program testing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110891961.6A CN113342702B (en) 2021-08-04 2021-08-04 Application program testing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113342702A CN113342702A (en) 2021-09-03
CN113342702B true CN113342702B (en) 2021-11-16

Family

ID=77480652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110891961.6A Active CN113342702B (en) 2021-08-04 2021-08-04 Application program testing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113342702B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327648B (en) * 2021-12-16 2024-02-02 北京安天网络安全技术有限公司 Driving debugging method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729235A (en) * 2013-12-24 2014-04-16 华为技术有限公司 Java virtual machine (JVM) and compiling method thereof
CN108898008A (en) * 2018-04-27 2018-11-27 北京奇艺世纪科技有限公司 The operation method and device of application program

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7788644B2 (en) * 2005-03-24 2010-08-31 Sap Ag Method and system for monitoring performance on a mobile device
CN103631228A (en) * 2013-11-27 2014-03-12 上海慧控信息技术有限公司 Control system virtualization method
CN105893234B (en) * 2014-12-30 2019-05-07 伊姆西公司 Method and calculating equipment for software test
CN104699523B (en) * 2015-03-24 2018-06-01 北京深思数盾科技股份有限公司 For the adjustment method and system of the application program that hardware platform is developed
CN106649074A (en) * 2015-10-30 2017-05-10 北京数码视讯科技股份有限公司 Method and device for program debugging of intelligent card
CN109684027B (en) * 2017-10-18 2020-11-24 北京京东尚科信息技术有限公司 Method and device for dynamically tracking running of Java virtual machine
CN108228461A (en) * 2018-01-08 2018-06-29 平安科技(深圳)有限公司 A kind of daily record generation method, device, computer equipment and storage medium
US11074153B2 (en) * 2019-04-01 2021-07-27 Microsoft Technology Licensing, Llc Collecting application state in a runtime environment for reversible debugging
TWI742432B (en) * 2019-09-19 2021-10-11 英業達股份有限公司 Testing system based on virtualization device and method thereof
CN112994954B (en) * 2021-04-21 2021-11-02 北京国科天迅科技有限公司 Network test system, test network construction method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729235A (en) * 2013-12-24 2014-04-16 华为技术有限公司 Java virtual machine (JVM) and compiling method thereof
CN108898008A (en) * 2018-04-27 2018-11-27 北京奇艺世纪科技有限公司 The operation method and device of application program

Also Published As

Publication number Publication date
CN113342702A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN110134386B (en) Program editing method and device
US9697109B2 (en) Dynamically configurable test doubles for software testing and validation
US9274930B2 (en) Debugging system using static analysis
US20180107585A1 (en) Using edit and continue to dynamically set and unset optimizations in source code while debugging
KR20150024842A (en) Adaptive portable libraries
CN107832059B (en) Code static analysis method and device based on Makefile
CN103049371A (en) Testing method and testing device of Android application programs
CN108170465B (en) Version information management method, electronic equipment and readable storage medium
US9824000B1 (en) Testing calling code dynamically with random error injection based on user-specified configuration
US11030074B2 (en) Code update based on detection of change in runtime code during debugging
CN111178512A (en) Device operation neural network test method and device
CN101030241A (en) Method and system based on Keil C51 software protecting development
CN112328229A (en) Method for quickly creating Jenkins assembly line
CN111338925A (en) Applet test method, device and system, electronic equipment and storage medium
CN115952758A (en) Chip verification method and device, electronic equipment and storage medium
CN113342702B (en) Application program testing method, device, equipment and readable storage medium
CN111427782A (en) Operation method, device, equipment and storage medium of android dynamic link library
CN113032246A (en) SSD (solid State disk) firmware operation method and device, readable storage medium and electronic equipment
CN112882690A (en) Application development method and device
CN110018831B (en) Program processing method, program processing apparatus, and computer-readable storage medium
CN109189671B (en) Layer-by-layer approximation type variable positioning method and system and terminal equipment
CN113094252A (en) Test case generation method and device, computer equipment and storage medium
CN106294143B (en) Debugging method and device for chip register
CN112765018B (en) Instrument and meter debugging system and method
CN110502439B (en) Debugging method, device, electronic 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