[go: up one dir, main page]

CN109144876B - Automatic testing method, device, server and storage medium - Google Patents

Automatic testing method, device, server and storage medium Download PDF

Info

Publication number
CN109144876B
CN109144876B CN201811003103.8A CN201811003103A CN109144876B CN 109144876 B CN109144876 B CN 109144876B CN 201811003103 A CN201811003103 A CN 201811003103A CN 109144876 B CN109144876 B CN 109144876B
Authority
CN
China
Prior art keywords
apks
apk
behavior
confusion
behavior logs
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
CN201811003103.8A
Other languages
Chinese (zh)
Other versions
CN109144876A (en
Inventor
李兴波
牛耕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811003103.8A priority Critical patent/CN109144876B/en
Publication of CN109144876A publication Critical patent/CN109144876A/en
Application granted granted Critical
Publication of CN109144876B publication Critical patent/CN109144876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • G06F8/434Pointers; Aliasing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3624Debugging of software by performing operations on the source code, e.g. via a compiler

Landscapes

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

Abstract

The embodiment of the invention discloses an automatic testing method, an automatic testing device, a server and a storage medium. The method comprises the following steps: obtaining confusion behavior logs corresponding to the android installation packages APK; performing defrobulation on the confusion behavior logs corresponding to the APKs to determine the un-confusion behavior logs corresponding to the APKs; and testing each APK according to the un-confused behavior log corresponding to each APK. The APKs can be automatically tested in the hybrid compiling mode, so that the problem that the automatically generated test cases have no universality and portability can be solved.

Description

Automatic testing method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to an automatic testing method, an automatic testing device, a server and a storage medium.
Background
Code Obfuscated code, also known as floral instructions, is the act of transforming the code of a computer program into a functionally equivalent, but difficult to read and understand, form. In particular, the names of various elements in the code, such as variables, functions, classes, may be rewritten to meaningless names in the code obfuscation process. Such as overwriting as a single letter, or a short nonsense letter combination, or even a symbol such as "__," so that the reader cannot guess what he is going to use by name. Code obfuscation may be used for program source code or for intermediate code into which a program is compiled.
In the development process of the Android client, the server side usually performs obfuscation operation on the application resources due to the requirement of keeping the application resources secret. The control ID after confusion can be displayed as an identifier without readability by grabbing the control ID through a tool such as a UiAutomator, and the difficulty of reverse engineering of application resources is increased.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in a schema of obfuscated compilation, code obfuscation makes automatically generated test cases less versatile and portable. Specifically, a test case on the android installation package APK a cannot run on APK B. Particularly in the branch development mode, the problem that installation packages produced by different branches are mixed up to have different results becomes serious.
Disclosure of Invention
In view of this, embodiments of the present invention provide an automatic testing method, an automatic testing device, a server, and a storage medium, which can automatically test each APK in a hybrid compiling mode, so as to solve the problem that an automatically generated test case has no universality and portability.
In a first aspect, an embodiment of the present invention provides an automated testing method, where the method includes:
obtaining confusion behavior logs corresponding to the android installation packages APK;
performing defrobulation on the confusion behavior logs corresponding to the APKs to determine the un-confusion behavior logs corresponding to the APKs;
and testing each APK according to the un-confused behavior log corresponding to each APK.
In the above embodiment, the obtaining the confusion behavior log corresponding to each android installation package APK includes:
receiving APK test requests sent by various clients; each APK test request carries a client identifier of each client;
and responding to the APK test request sent by each client to obtain the confusion behavior log corresponding to each APK.
In the above embodiment, the testing each APK according to the un-obfuscated behavior log corresponding to each APK includes:
aggregating the un-obfuscated behavior logs corresponding to the APKs to determine the un-obfuscated behavior logs corresponding to all the APKs;
determining target test cases corresponding to all APKs according to the undistorted behavior logs corresponding to all APKs;
and testing each APK according to the target test cases corresponding to all APKs.
In the above embodiment, the determining target test cases corresponding to all APKs according to the un-obfuscated behavior logs corresponding to all APKs includes:
re-obfuscating the un-obfuscated behavior logs corresponding to all APKs to determine re-obfuscated behavior logs corresponding to all APKs;
and determining target test cases corresponding to all APKs according to the re-confusion behavior logs corresponding to all APKs.
In the above embodiment, the confusion behavior log comprises: at least one protection control identification and an operation sequence corresponding to each protection control identification; the unaliased behavior log comprises: at least one resource control identification and an operation sequence corresponding to each resource control identification.
In a second aspect, an embodiment of the present invention provides an automated testing apparatus, where the apparatus includes: the device comprises an acquisition module, a determination module and a test module; wherein,
the obtaining module is used for obtaining confusion behavior logs corresponding to the android installation packages APK;
the determining module is used for performing defrobbing on the confusion behavior logs corresponding to the APKs and determining the un-confusion behavior logs corresponding to the APKs;
and the testing module is used for testing each APK according to the undistorted behavior log corresponding to each APK.
In the above embodiment, the obtaining module includes: a receiving sub-module and an obtaining sub-module, wherein,
the receiving submodule is used for receiving the APK test request sent by each client; each APK test request carries a client identifier of each client;
and the obtaining submodule is used for responding to the APK test request sent by each client to obtain the confusion behavior log corresponding to each APK.
In the above embodiment, the test module includes: determining a submodule and a testing submodule; wherein,
the determining submodule is used for aggregating the unapproved behavior logs corresponding to the APKs and determining the unapproved behavior logs corresponding to all the APKs; determining target test cases corresponding to all APKs according to the undistorted behavior logs corresponding to all APKs;
and the test submodule is used for testing each APK according to the target test cases corresponding to all APKs.
In the above embodiment, the determining submodule is specifically configured to re-obfuscate the unaliased behavior logs corresponding to all the APKs, and determine re-obfuscated behavior logs corresponding to all the APKs; and determining target test cases corresponding to all APKs according to the re-confusion behavior logs corresponding to all APKs.
In the above embodiment, the confusion behavior log comprises: at least one protection control identification and an operation sequence corresponding to each protection control identification; the unaliased behavior log comprises: at least one resource control identification and an operation sequence corresponding to each resource control identification.
In a third aspect, an embodiment of the present invention provides a server, including:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the automated testing methods of any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an automated testing method according to any embodiment of the present invention.
The embodiment of the invention provides an automatic testing method, an automatic testing device, a server and a storage medium, wherein a confusion behavior log corresponding to each android installation package (APK) is obtained; then, the confusion behavior logs corresponding to the APKs are subjected to confusion resolution, and the un-confusion behavior logs corresponding to the APKs are determined; and testing each APK according to the undistorted behavior log corresponding to each APK. That is to say, in the technical solution of the present invention, the obfuscated behavior logs corresponding to the APKs may be defragmented to determine the un-obfuscated behavior logs corresponding to the APKs; therefore, each APK can be tested according to the un-obfuscated behavior log corresponding to each APK. In the existing automatic test method, the confusion behavior logs corresponding to the APKs are not subjected to confusion resolution, so that the code confusion causes the automatically generated test cases to have no universality and portability. Therefore, compared with the prior art, the automatic testing method, the automatic testing device, the automatic testing server and the storage medium provided by the embodiment of the invention can automatically test each APK in the mixed compiling mode, so that the problem that the automatically generated testing case has no universality and portability can be solved; moreover, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Drawings
Fig. 1 is a schematic flow chart of an automated testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an automated testing method according to a second embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating an automated testing method according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of a first structure of an automatic test apparatus according to a fourth embodiment of the present invention;
fig. 5 is a second schematic structural diagram of an automatic test apparatus according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings.
Example one
Fig. 1 is a flowchart of an automated testing method according to an embodiment of the present invention, where the method may be executed by an automated testing apparatus or a server, where the apparatus or the server may be implemented by software and/or hardware, and the apparatus or the server may be integrated in any intelligent device with a network communication function. As shown in fig. 1, the automated testing method may include the steps of:
s101, obtaining confusion behavior logs corresponding to the android installation packages APK.
In a specific embodiment of the present invention, a server may obtain an obfuscation behavior log corresponding to each android installation package APK. Specifically, the server may receive an APK test request sent by each client; each APK test request carries a client identifier of each client; and then responding to the APK test request sent by each client to obtain the confusion behavior log corresponding to each APK.
And S102, performing confusion resolution on the confusion behavior logs corresponding to the APKs to determine the non-confusion behavior logs corresponding to the APKs.
In the specific embodiment of the present invention, the server may perform defrobulation on the obfuscated behavior logs corresponding to the APKs, and determine the un-obfuscated behavior logs corresponding to the APKs. Specifically, the server may determine an obfuscation mode corresponding to each obfuscation behavior log; then determining a de-obfuscating mode corresponding to each obfuscated behavior log according to the obfuscating mode corresponding to each obfuscated behavior log; and then, the confusion behavior logs corresponding to the APKs are subjected to confusion resolution by using the confusion resolution mode corresponding to the confusion behavior logs, and the un-confusion behavior logs corresponding to the APKs are determined.
S103, testing each APK according to the un-obfuscated behavior log corresponding to each APK.
In a specific embodiment of the present invention, the server may test each APK according to an un-obfuscated behavior log corresponding to each APK. Specifically, the server may aggregate the unapproved behavior logs corresponding to each APK, and determine unapproved behavior logs corresponding to all APKs; then determining target test cases corresponding to all APKs according to the undistorted behavior logs corresponding to all APKs; and then testing each APK according to the target test cases corresponding to all APKs.
Preferably, in an embodiment of the present invention, the confusion behavior log comprises: at least one protection control identification and an operation sequence corresponding to each protection control identification; the unabraded behavior log includes: at least one resource control identification and an operation sequence corresponding to each resource control identification.
The automatic testing method provided by the embodiment of the invention comprises the steps of firstly obtaining confusion behavior logs corresponding to all android installation packages APKs; then, the confusion behavior logs corresponding to the APKs are subjected to confusion resolution, and the un-confusion behavior logs corresponding to the APKs are determined; and testing each APK according to the undistorted behavior log corresponding to each APK. That is to say, in the technical solution of the present invention, the obfuscated behavior logs corresponding to the APKs may be defragmented to determine the un-obfuscated behavior logs corresponding to the APKs; therefore, each APK can be tested according to the un-obfuscated behavior log corresponding to each APK. In the existing automatic test method, the confusion behavior logs corresponding to the APKs are not subjected to confusion resolution, so that the code confusion causes the automatically generated test cases to have no universality and portability. Therefore, compared with the prior art, the automatic testing method provided by the embodiment of the invention can automatically test each APK in a mixed compiling mode, thereby solving the problem that the automatically generated testing case has no universality and portability; moreover, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 2 is a schematic flow chart of an automated testing method according to a second embodiment of the present invention. The automated testing method as shown in fig. 2 may comprise the steps of:
s201, receiving APK test requests sent by various clients; and each APK test request carries the client identifier of each client.
In the specific embodiment of the present invention, the server may receive the APK test request sent by each client; and each APK test request carries the client identifier of each client. Specifically, the server may receive an APK test request 1 sent by the client 1; wherein, the APK test request 1 carries the client identifier of the client 1; the server can also receive an APK test request 2 sent by the client 2; wherein, the APK test request 2 carries the client identifier of the client 2; …, respectively; the server can receive an APK test request N sent by the client N; the APK test request N carries a client identifier of the client N; wherein N is a natural number of 1 or more.
S202, responding to the APK test requests sent by the clients to obtain confusion behavior logs corresponding to the APKs.
In the specific embodiment of the present invention, the server may obtain the confusion behavior log corresponding to each APK in response to the APK test request sent by each client. Specifically, the server may obtain a confusion behavior log corresponding to the APK1 in response to the APK test request 1 sent by the client 1; the server may obtain the confusion behavior log corresponding to the APK2 in response to the APK test request 2 sent by the client 2; …, respectively; the server can respond to the APK test request N sent by the client N to obtain the confusion behavior log corresponding to the APKN.
S203, performing confusion resolution on the confusion behavior logs corresponding to the APKs, and determining the non-confusion behavior logs corresponding to the APKs.
In the specific embodiment of the present invention, the server may perform defrobulation on the obfuscated behavior logs corresponding to the APKs, and determine the un-obfuscated behavior logs corresponding to the APKs. Specifically, the server may determine an obfuscation mode corresponding to each obfuscation behavior log; then determining a de-obfuscating mode corresponding to each obfuscated behavior log according to the obfuscating mode corresponding to each obfuscated behavior log; and then, the confusion behavior logs corresponding to the APKs are subjected to confusion resolution by using the confusion resolution mode corresponding to the confusion behavior logs, and the un-confusion behavior logs corresponding to the APKs are determined.
And S204, testing each APK according to the un-obfuscated behavior log corresponding to each APK.
In a specific embodiment of the present invention, the server may test each APK according to an un-obfuscated behavior log corresponding to each APK. Specifically, the server may aggregate the unapproved behavior logs corresponding to each APK, and determine unapproved behavior logs corresponding to all APKs; then determining target test cases corresponding to all APKs according to the undistorted behavior logs corresponding to all APKs; and then testing each APK according to the target test cases corresponding to all APKs.
Preferably, in an embodiment of the present invention, the confusion behavior log comprises: at least one protection control identification and an operation sequence corresponding to each protection control identification; the unabraded behavior log includes: at least one resource control identification and an operation sequence corresponding to each resource control identification.
The automatic testing method provided by the embodiment of the invention comprises the steps of firstly obtaining confusion behavior logs corresponding to all android installation packages APKs; then, the confusion behavior logs corresponding to the APKs are subjected to confusion resolution, and the un-confusion behavior logs corresponding to the APKs are determined; and testing each APK according to the undistorted behavior log corresponding to each APK. That is to say, in the technical solution of the present invention, the obfuscated behavior logs corresponding to the APKs may be defragmented to determine the un-obfuscated behavior logs corresponding to the APKs; therefore, each APK can be tested according to the un-obfuscated behavior log corresponding to each APK. In the existing automatic test method, the confusion behavior logs corresponding to the APKs are not subjected to confusion resolution, so that the code confusion causes the automatically generated test cases to have no universality and portability. Therefore, compared with the prior art, the automatic testing method provided by the embodiment of the invention can automatically test each APK in a mixed compiling mode, thereby solving the problem that the automatically generated testing case has no universality and portability; moreover, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
EXAMPLE III
Fig. 3 is a schematic flow chart of an automated testing method according to a third embodiment of the present invention. As shown in fig. 3, the automated testing method may include the steps of:
s301, receiving APK test requests sent by various clients; and each APK test request carries the client identifier of each client.
In the specific embodiment of the present invention, the server may receive the APK test request sent by each client; and each APK test request carries the client identifier of each client. Specifically, the server may receive an APK test request 1 sent by the client 1; wherein, the APK test request 1 carries the client identifier of the client 1; the server can also receive an APK test request 2 sent by the client 2; wherein, the APK test request 2 carries the client identifier of the client 2; …, respectively; the server can receive an APK test request N sent by the client N; the APK test request N carries a client identifier of the client N; wherein N is a natural number of 1 or more.
S302, responding to the APK test request sent by each client to obtain the confusion behavior log corresponding to each APK.
In the specific embodiment of the present invention, the server may obtain the confusion behavior log corresponding to each APK in response to the APK test request sent by each client. Specifically, the server may obtain a confusion behavior log corresponding to the APK1 in response to the APK test request 1 sent by the client 1; the server may obtain the confusion behavior log corresponding to the APK2 in response to the APK test request 2 sent by the client 2; …, respectively; the server can respond to the APK test request N sent by the client N to obtain the confusion behavior log corresponding to the APKN.
And S303, performing confusion resolution on the confusion behavior logs corresponding to the APKs to determine the non-confusion behavior logs corresponding to the APKs.
In the specific embodiment of the present invention, the server may perform defrobulation on the obfuscated behavior logs corresponding to the APKs, and determine the un-obfuscated behavior logs corresponding to the APKs. Specifically, the server may determine an obfuscation mode corresponding to each obfuscation behavior log; then determining a de-obfuscating mode corresponding to each obfuscated behavior log according to the obfuscating mode corresponding to each obfuscated behavior log; and then, the confusion behavior logs corresponding to the APKs are subjected to confusion resolution by using the confusion resolution mode corresponding to the confusion behavior logs, and the un-confusion behavior logs corresponding to the APKs are determined.
And S304, aggregating the unapproved behavior logs corresponding to the APKs to determine the unapproved behavior logs corresponding to all the APKs.
In a specific embodiment of the present invention, the server may aggregate the unapproved behavior logs corresponding to each APK, and determine the unapproved behavior logs corresponding to all the APKs. Specifically, the server may aggregate the unapproved behavior log corresponding to the APK1, the unapproved behavior log corresponding to the APK2, and the unapproved behavior logs corresponding to the … and the APKN, and determine the unapproved behavior logs corresponding to all the APKs.
S305, re-obfuscating the un-obfuscated behavior logs corresponding to all the APKs to determine re-obfuscated behavior logs corresponding to all the APKs.
In the specific embodiment of the present invention, the server may re-obfuscate the un-obfuscated behavior logs corresponding to all APKs, and determine re-obfuscated behavior logs corresponding to all APKs. Specifically, the server may re-obfuscate the un-obfuscated behavior logs corresponding to all the APKs by using a predetermined obfuscation method, to determine re-obfuscated behavior logs corresponding to all the APKs.
And S306, determining target test cases corresponding to all APKs according to the re-obfuscating behavior logs corresponding to all APKs.
In the specific embodiment of the invention, the server can determine the target test cases corresponding to all the APKs according to the re-obfuscating behavior logs corresponding to all the APKs. Target test cases corresponding to all APKs can be tested against APK1, APK2, …, APKN, respectively.
And S307, testing each APK according to the target test cases corresponding to all APKs.
In the embodiment of the present invention, the server may test each APK according to the target test cases corresponding to all APKs. Specifically, the server may test the APK1 according to the target test cases corresponding to all APKs; the server can test the APK2 according to the target test cases corresponding to all APKs; …, respectively; the server can test the APKN according to the target test cases corresponding to all the APKs.
The automatic testing method provided by the embodiment of the invention comprises the steps of firstly obtaining confusion behavior logs corresponding to all android installation packages APKs; then, the confusion behavior logs corresponding to the APKs are subjected to confusion resolution, and the un-confusion behavior logs corresponding to the APKs are determined; and testing each APK according to the undistorted behavior log corresponding to each APK. That is to say, in the technical solution of the present invention, the obfuscated behavior logs corresponding to the APKs may be defragmented to determine the un-obfuscated behavior logs corresponding to the APKs; therefore, each APK can be tested according to the un-obfuscated behavior log corresponding to each APK. In the existing automatic test method, the confusion behavior logs corresponding to the APKs are not subjected to confusion resolution, so that the code confusion causes the automatically generated test cases to have no universality and portability. Therefore, compared with the prior art, the automatic testing method provided by the embodiment of the invention can automatically test each APK in a mixed compiling mode, thereby solving the problem that the automatically generated testing case has no universality and portability; moreover, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Example four
Fig. 4 is a schematic view of a first structure of an automatic testing apparatus according to a fourth embodiment of the present invention. As shown in fig. 4, an automated testing apparatus according to an embodiment of the present invention may include: an acquisition module 401, a determination module 402 and a test module 403; wherein,
the obtaining module 401 is configured to obtain confusion behavior logs corresponding to the android installation packages APK;
the determining module 402 is configured to perform de-obfuscation on the obfuscated behavior logs corresponding to the APKs, and determine un-obfuscated behavior logs corresponding to the APKs;
the testing module 403 is configured to test each APK according to the un-obfuscated behavior log corresponding to each APK.
Fig. 5 is a second schematic structural diagram of an automatic testing apparatus according to a fourth embodiment of the present invention. As shown in fig. 5, the obtaining module 401 includes: a receiving sub-module 4011 and an obtaining sub-module 4012, wherein,
the receiving submodule 4011 is configured to receive an APK test request sent by each client; each APK test request carries a client identifier of each client;
the obtaining sub-module 4012 is configured to obtain confusion behavior logs corresponding to the APKs in response to the APK test requests sent by the clients.
Further, the test module 403 includes: a determination sub-module 4031 and a test sub-module 4032; wherein,
the determining submodule 4031 is configured to aggregate the unapproved behavior logs corresponding to the APKs, and determine unapproved behavior logs corresponding to all the APKs; determining target test cases corresponding to all APKs according to the undistorted behavior logs corresponding to all APKs;
the test sub-module 4032 is configured to test each APK according to the target test cases corresponding to all APKs.
Further, the determining submodule 4031 is specifically configured to re-obfuscate the unaliased behavior logs corresponding to all the APKs, and determine re-obfuscated behavior logs corresponding to all the APKs; and determining target test cases corresponding to all APKs according to the re-confusion behavior logs corresponding to all APKs.
Further, the confusion behavior log comprises: at least one protection control identification and an operation sequence corresponding to each protection control identification; the unaliased behavior log comprises: at least one resource control identification and an operation sequence corresponding to each resource control identification.
The automatic test device can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to an automated testing method provided in any embodiment of the present invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a server according to a fifth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary server suitable for use in implementing embodiments of the present invention. The server 12 shown in fig. 6 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 6, the server 12 is in the form of a general purpose computing device. The components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by server 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The server 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The server 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the server 12, and/or with any devices (e.g., network card, modem, etc.) that enable the server 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the server 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the server 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the server 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, such as implementing the automated testing methods provided by embodiments of the present invention, by running programs stored in the system memory 28.
EXAMPLE six
The sixth embodiment of the invention provides a computer storage medium.
The computer-readable storage media of embodiments of the invention may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An automated testing method, the method comprising:
obtaining confusion behavior logs corresponding to the android installation packages APK;
performing defrobulation on the confusion behavior logs corresponding to the APKs to determine the un-confusion behavior logs corresponding to the APKs;
testing each APK according to the undistorted behavior log corresponding to each APK;
the testing each APK according to the un-obfuscated behavior log corresponding to each APK includes:
aggregating the un-obfuscated behavior logs corresponding to the APKs to determine the un-obfuscated behavior logs corresponding to all the APKs;
determining target test cases corresponding to all APKs according to the undistorted behavior logs corresponding to all APKs;
and testing each APK according to the target test cases corresponding to all APKs.
2. The method according to claim 1, wherein the obtaining the confusion behavior log corresponding to each android installation package APK comprises:
receiving APK test requests sent by various clients; each APK test request carries a client identifier of each client;
and responding to the APK test request sent by each client to obtain the confusion behavior log corresponding to each APK.
3. The method of claim 1, wherein the determining the target test cases corresponding to all the APKs according to the un-obfuscated behavior logs corresponding to all the APKs comprises:
re-obfuscating the un-obfuscated behavior logs corresponding to all APKs to determine re-obfuscated behavior logs corresponding to all APKs;
and determining target test cases corresponding to all APKs according to the re-confusion behavior logs corresponding to all APKs.
4. The method of claim 1, wherein the obfuscated behavior log comprises: at least one protection control identification and an operation sequence corresponding to each protection control identification; the unaliased behavior log comprises: at least one resource control identification and an operation sequence corresponding to each resource control identification.
5. An automated testing apparatus, the apparatus comprising: the device comprises an acquisition module, a determination module and a test module; wherein,
the obtaining module is used for obtaining confusion behavior logs corresponding to the android installation packages APK;
the determining module is used for performing defrobbing on the confusion behavior logs corresponding to the APKs and determining the un-confusion behavior logs corresponding to the APKs;
the test module is used for testing each APK according to the undistorted behavior log corresponding to each APK;
wherein the test module comprises: determining a submodule and a testing submodule; wherein,
the determining submodule is used for aggregating the unapproved behavior logs corresponding to the APKs and determining the unapproved behavior logs corresponding to all the APKs; determining target test cases corresponding to all APKs according to the undistorted behavior logs corresponding to all APKs;
and the test submodule is used for testing each APK according to the target test cases corresponding to all APKs.
6. The apparatus of claim 5, wherein the obtaining module comprises: a receiving sub-module and an obtaining sub-module, wherein,
the receiving submodule is used for receiving the APK test request sent by each client; each APK test request carries a client identifier of each client;
and the obtaining submodule is used for responding to the APK test request sent by each client to obtain the confusion behavior log corresponding to each APK.
7. The apparatus of claim 5, wherein:
the determining submodule is specifically configured to re-obfuscate the un-obfuscated behavior logs corresponding to all the APKs, and determine re-obfuscated behavior logs corresponding to all the APKs; and determining target test cases corresponding to all APKs according to the re-confusion behavior logs corresponding to all APKs.
8. The apparatus of claim 5, wherein the confusion behavior log comprises: at least one protection control identification and an operation sequence corresponding to each protection control identification; the unaliased behavior log comprises: at least one resource control identification and an operation sequence corresponding to each resource control identification.
9. A server, comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the automated testing method of any of claims 1-4.
10. A storage medium on which a computer program is stored, which program, when being executed by a processor, carries out an automated testing method according to one of claims 1 to 4.
CN201811003103.8A 2018-08-30 2018-08-30 Automatic testing method, device, server and storage medium Active CN109144876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811003103.8A CN109144876B (en) 2018-08-30 2018-08-30 Automatic testing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811003103.8A CN109144876B (en) 2018-08-30 2018-08-30 Automatic testing method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN109144876A CN109144876A (en) 2019-01-04
CN109144876B true CN109144876B (en) 2021-02-19

Family

ID=64829419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811003103.8A Active CN109144876B (en) 2018-08-30 2018-08-30 Automatic testing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN109144876B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203007A (en) * 2015-05-08 2016-12-07 腾讯科技(深圳)有限公司 A kind of code process method, device and the equipment of calculating
US9830478B1 (en) * 2015-07-20 2017-11-28 Semmle Limited Logging from obfuscated code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203007A (en) * 2015-05-08 2016-12-07 腾讯科技(深圳)有限公司 A kind of code process method, device and the equipment of calculating
US9830478B1 (en) * 2015-07-20 2017-11-28 Semmle Limited Logging from obfuscated code

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Deobfuscation Reverse Engineering Obfuscated Code;Sharath K. Udupa;《12th Working Conference on Reverse Engineering (WCRE’05)》;20060103;第1-10页 *
基于smali 代码混淆的Android 应用保护方法;刘方圆;《山东大学学报》;20170331;第52卷(第3期);第1-7页 *

Also Published As

Publication number Publication date
CN109144876A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN110414268B (en) Access control method, device, equipment and storage medium
CN111416811A (en) Unauthorized vulnerability detection method, system, equipment and storage medium
CN110597704B (en) Pressure test method, device, server and medium for application program
US11005877B2 (en) Persistent cross-site scripting vulnerability detection
CN112363753A (en) Data verification method and device, electronic equipment and storage medium
US20150095305A1 (en) Detecting multistep operations when interacting with web applications
CN113495498B (en) Simulation method, simulator, device and medium for hardware device
CN110929128A (en) Data crawling method, device, equipment and medium
US9026612B2 (en) Generating a custom parameter rule based on a comparison of a run-time value to a request URL
CN111680313A (en) Data processing method, device, equipment and storage medium
CN114205156A (en) Message detection method and device for tangent plane technology, electronic equipment and medium
CN110716960A (en) Database query method, device, equipment and storage medium
CN110727476B (en) Method, device, equipment and storage medium for generating authorization configuration file
CN110896489B (en) Authentication method, device, equipment and storage medium
CN108399128A (en) A kind of generation method of user data, device, server and storage medium
CN109189332A (en) A kind of disk hanging method, device, server and storage medium
CN109086097A (en) A kind of starting method, apparatus, server and the storage medium of small routine
CN109144876B (en) Automatic testing method, device, server and storage medium
US8752026B2 (en) Efficient code instrumentation
US9703676B2 (en) Testing application internal modules with instrumentation
CN110858143B (en) Installation package generation method, device, equipment and storage medium
CN110958243A (en) Network vulnerability submitting method and device, storage medium and electronic equipment
CN112596838B (en) Method, device, equipment and storage medium for displaying universal Web page
CN112364268A (en) Resource acquisition method and device, electronic equipment and storage medium
CN115203178A (en) Data quality inspection method and 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