CN110471840A - Applied program testing method, device, computer-readable medium and electronic equipment - Google Patents
Applied program testing method, device, computer-readable medium and electronic equipment Download PDFInfo
- Publication number
- CN110471840A CN110471840A CN201910625687.0A CN201910625687A CN110471840A CN 110471840 A CN110471840 A CN 110471840A CN 201910625687 A CN201910625687 A CN 201910625687A CN 110471840 A CN110471840 A CN 110471840A
- Authority
- CN
- China
- Prior art keywords
- sample
- initial sample
- trimming
- tested
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 claims abstract description 165
- 238000009966 trimming Methods 0.000 claims abstract description 104
- 238000000034 method Methods 0.000 claims abstract description 15
- 239000000523 sample Substances 0.000 claims description 311
- 238000012545 processing Methods 0.000 claims description 14
- 239000012723 sample buffer Substances 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 235000013399 edible fruits Nutrition 0.000 claims description 2
- 230000008439 repair process Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 7
- 230000002159 abnormal effect Effects 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 5
- 230000006854 communication Effects 0.000 description 4
- 244000141353 Prunus domestica Species 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000002716 delivery method Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000009412 basement excavation Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
- 238000011076 safety test Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Present disclose provides a kind of applied program testing method, Application testing device, computer-readable medium and electronic equipments, are related to field of computer technology.This method comprises: initial sample is trimmed, so that the sample volume of the initial sample after trimming is less than the sample volume of the initial sample before trimming;Multiple test samples are generated according to the initial sample after trimming;It controls application program to be tested and executes multiple test samples, to obtain implementing result;It is determined to lead to the target sample of application exception to be tested and the corresponding execution route of target sample from multiple test samples according to implementing result;The content to be repaired in application program to be tested is determined by target sample and execution route.Applied program testing method in the disclosure can overcome the problems, such as that manual testing's application program efficiency is lower to a certain extent, and then promote the testing efficiency to application program.
Description
Technical field
This disclosure relates to which field of computer technology, is surveyed in particular to a kind of applied program testing method, application program
Trial assembly sets, computer-readable medium and electronic equipment.
Background technique
Currently, the considerations of for safety problem, usually can all carry out safety test before software publication, to pass through leakage
Hole, which is excavated, to be found loophole in advance as far as possible and is repaired.Bug excavation generallys use fuzz testing mode;Fuzz testing
It (Fuzzing), is that one kind finds that application program is leaked by providing unexpected input to goal systems and monitoring abnormal results
The method in hole, it is understood that be to continue on random bad data input target program, to monitor journey by observation program behavior
Sequence is abnormal (e.g., collapse, assertfail or log exception etc.).
Currently, the product for fuzz testing is mainly used in Linux, Windows or Mac operating system, and for IOS
The application program of platform usually carries out manual testing by the way of manually carrying out reverse-engineering, with mining application
In loophole.But it there is a problem that efficiency is lower by the way of manually carrying out Application testing.
It should be noted that information is only used for reinforcing the reason to the background of the disclosure disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The disclosure is designed to provide a kind of applied program testing method, Application testing device, computer-readable
Medium and electronic equipment, and then overcome the problems, such as that manual testing's application program efficiency is lower at least to a certain extent, Jin Erti
Rise the testing efficiency to application program.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure
Practice and acquistion.
The first aspect of the disclosure provides a kind of applied program testing method, comprising: initial sample is trimmed, so that repairing
The sample volume of initial sample after cutting is less than the sample volume of the initial sample before trimming;It is raw according to the initial sample after trimming
At multiple test samples;It controls application program to be tested and executes multiple test samples, to obtain implementing result;According to implementing result
It determines to lead to the target sample of application exception to be tested and the corresponding execution of target sample from multiple test samples
Path;The content to be repaired in application program to be tested is determined by target sample and execution route.
In a kind of exemplary embodiment of the disclosure, trim initial sample, comprising: trim in initial sample wait trim
Part;It controls application program to be tested and executes initial sample, and determine the first execution route corresponding with initial sample;Control to
Test application program executes the initial sample after trimming, and determines the second execution route corresponding with the initial sample after trimming;
If the second execution route is identical as the first execution route, continue to trim initial sample, until the sample volume of initial sample reaches
Until default smallest sample volume.
In a kind of exemplary embodiment of the disclosure, multiple test samples, packet are generated according to the initial sample after trimming
It includes: the initial sample after trimming is generated into multiple test samples by variation processing.
In a kind of exemplary embodiment of the disclosure, controls application program to be tested and executes multiple test samples, comprising:
It controls application program to be tested and executes and/or serially execute multiple test samples parallel.
In a kind of exemplary embodiment of the disclosure, initial sample is trimmed, comprising:
Denoising is carried out to initial sample, wherein the initial sample is image pattern;
Initial sample after denoising is folded, and one is trimmed every default position pixel to folded initial sample
It is secondary, trim every time area that area be default position pixel with.
In a kind of exemplary embodiment of the disclosure, the applied program testing method further include: by multiple test samples
It is loaded onto the sample buffer of application program to be tested.
According to the second aspect of the disclosure, a kind of Application testing device, including initial sample trimming unit, survey are provided
Try sample generation unit, test sample execution unit, target sample determination unit and content determining unit to be repaired, in which:
Initial sample trims unit, for trimming initial sample, so that before the sample volume of the initial sample after trimming is less than trimming
Initial sample sample volume;Test sample generation unit, for generating multiple test specimens according to the initial sample after trimming
This;Test sample execution unit executes multiple test samples for controlling application program to be tested, to obtain implementing result;Mesh
This determination unit of standard specimen leads to application exception to be tested for determining from multiple test samples according to implementing result
Target sample and the corresponding execution route of target sample;Content determining unit to be repaired, for passing through target sample and execution
Path determines the content to be repaired in application program to be tested.
In a kind of exemplary embodiment of the disclosure, the mode that initial sample trimming unit trims initial sample is specific
Are as follows: initial sample trimming unit trims the part to be trimmed in initial sample;Initial sample trimming unit controls application to be tested
Program executes initial sample, and determines the first execution route corresponding with initial sample;Initial sample trimming unit control is to be measured
It tries application program and executes the initial sample after trimming, and determine the second execution route corresponding with the initial sample after trimming;If
Second execution route is identical as the first execution route, and initial sample trimming unit continues to trim initial sample, until initial sample
Sample volume reach default smallest sample volume until.
In a kind of exemplary embodiment of the disclosure, test sample generation unit is generated according to the initial sample after trimming
The mode of multiple test samples specifically: test sample generation unit generates the initial sample after trimming by variation processing more
A test sample.
In a kind of exemplary embodiment of the disclosure, it is more that test sample execution unit controls application program execution to be tested
The mode of a test sample specifically: test sample execution unit controls application program to be tested and executes or serially execute more parallel
A test sample.
In a kind of exemplary embodiment of the disclosure, the mode that initial sample trimming unit trims initial sample is specific
Are as follows: the initial initial sample trimming unit of sample trimming unit carries out denoising to initial sample, wherein initial sample is image
Sample;Initial sample trimming unit folds the initial sample after denoising, and to folded initial sample every default
Position pixel trimming is primary, trim every time area that area be default position pixel with.
In a kind of exemplary embodiment of the disclosure, which can also include: that sample load is single
Member, for multiple test samples to be loaded onto the sample buffer of application program to be tested.
According to the third aspect of the disclosure, a kind of computer-readable medium is provided, is stored thereon with computer program, journey
The applied program testing method as described in first aspect in above-described embodiment is realized when sequence is executed by processor.
According to the fourth aspect of the disclosure, a kind of electronic equipment is provided, comprising: one or more processors;Storage dress
Set, for storing one or more programs, when one or more programs are executed by one or more processors so that one or
Multiple processors realize the applied program testing method as described in first aspect in above-described embodiment.
Technical solution provided by the present disclosure can include the following benefits:
In the technical solution provided by embodiment of the disclosure, terminal device or server can be carried out initial sample
Trimming, so that the initial sample volume after trimming is less than the initial sample volume before trimming, and then according to initial after trimming
Sample generates multiple test samples, controls application program to be tested and executes multiple test samples, and then can obtain and execute knot
Fruit, if there is some test sample for leading to application exception to be tested, then, this test sample can then be confirmed as
Target sample, further, execution route when by target sample and application program performance objective sample to be tested can be with
Determine the content to be repaired in application program to be tested, that is, loophole.It is described according to above scheme, the disclosure on the one hand can
By trimming initial sample, the sample volume of initial sample is reduced, and then reduce the quantity of test sample, to improve test effect
Rate;In addition, multiple test samples on the other hand can be executed by application program to be tested, and then it is different to promote capture application program
Normal or collapse probability, and then promote the test effect for application program to be tested.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.It should be evident that the accompanying drawings in the following description is only the disclosure
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 shows a kind of flow diagram of applied program testing method according to one exemplary embodiment of the disclosure;
Fig. 2 shows the structural block diagrams according to the Application testing device of the disclosure one exemplary embodiment;
Fig. 3 shows the structure for being suitable for the computer system for the electronic equipment for being used to realize one exemplary embodiment of the disclosure
Schematic diagram.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner
In example.In the following description, many details are provided to provide and fully understand to embodiment of the disclosure.However,
It will be appreciated by persons skilled in the art that can with technical solution of the disclosure without one or more in specific detail,
Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side
Method, device, realization or operation are to avoid fuzzy all aspects of this disclosure.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity.
I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit
These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step,
It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close
And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
Referring to Fig. 1, Fig. 1 shows a kind of stream of applied program testing method according to one exemplary embodiment of the disclosure
Journey schematic diagram, the applied program testing method can be realized by server or terminal device.
As shown in Figure 1, according to the applied program testing method of one embodiment of the disclosure, include the following steps S110,
Step S120, step S130, step S140 and step S150, in which:
Step S110: trimming initial sample, so that the sample volume of the initial sample after trimming is less than first before trimming
The sample volume of beginning sample.
Step S120: multiple test samples are generated according to the initial sample after trimming.
Step S130: it controls application program to be tested and executes multiple test samples, to obtain implementing result.
Step S140: the mesh for leading to application exception to be tested is determined from multiple test samples according to implementing result
Standard specimen sheet and the corresponding execution route of target sample.
Step S150: the content to be repaired in application program to be tested is determined by target sample and execution route.
Each step is described in detail below:
In step s 110, optionally, the mode of terminal device or the initial sample of server prunes can be for initial sample
This progress is repeatedly trimmed, and repeatedly the sample volume of the initial sample after trimming is less than the sample volume of the initial sample before trimming.
If initial sample is image pattern, sample volume can be understood as the size of image pattern file.
In an exemplary embodiment of the disclosure, it before terminal device or the initial sample of server prunes, can also be performed
Following steps: the storage location of application program to be tested is determined according to the identification information of application program to be tested, and is determined
Temporary folder is initialized for testing the initial sample of application program to be tested, and then in application program to be tested, so as to
Test application program is treated to be tested;Wherein, temporary folder can be used for the initial sample after storing initial sample, trimming
And test sample.In addition, the identification information of application program to be tested can be Bundle ID, Bundle ID (Bundle
It identifier is) that the ID of system application unique identification and shows application program to be operated and its for bundling identification
The difference of his application program, each application program only have a Bundle ID.
In the step s 120, any test sample and the sample content of initial sample can part it is identical, can also be complete
It is identical, can also be entirely different, the embodiment of the present invention is not construed as limiting;Sample content between multiple test samples is different.
In step s 130, if application program to be tested is the application program for carrying out image procossing, test specimens
It originally can be image pattern;If application program to be tested is the application program for carrying out audio processing, test sample can
Think audio sample;If application program to be tested is the application program for carrying out word processing, test sample can be
Text sample.
In step S140, optionally, the mesh for leading to application exception to be tested is determined from multiple test samples
The mode of standard specimen sheet is specifically as follows: the target sample for leading to application exception to be tested is determined from multiple test samples
And execute, to record the execution route of target sample;Wherein, application exception to be tested may include collapse, assertfail
And log exception etc.
In step S150, it can be determined by target sample and execution route in the mistake for executing application program to be tested
There is application program to be tested abnormal, thus by this partial content
It is determined as content to be repaired, content to be repaired can be not construed as limiting for one or more, the embodiment of the present invention.
As it can be seen that implementing applied program testing method shown in FIG. 1, initial sample can be reduced by trimming initial sample
Sample volume, and then reduce test sample quantity, to improve testing efficiency.Furthermore it is possible to pass through application program to be tested
Multiple test samples are executed, and then promote the probability of capture application exception or collapse, and then are promoted for application to be tested
The test effect of program.
Property embodiment as an example, the applied program testing method can be the following steps are included: control be to be tested
Application program executes initial sample, and determines the first execution route corresponding with initial sample.
In an exemplary embodiment of the disclosure, optionally, determine corresponding with initial sample the first execution route it
It afterwards, can be with the following steps are included: generate corresponding with the first execution route Hash, so that terminal device or server are by first
The Hash of execution route is compared with the Hash of the second execution route.
As it can be seen that implementing the exemplary embodiment, corresponding first execution route of initial sample can be obtained, so as to trimming
Initial sample afterwards is compared, and then promotes the testing efficiency for application program to be tested.
As another exemplary embodiment, the mode for trimming initial sample is specifically as follows: trimming in initial sample
Part to be trimmed;It controls application program to be tested and executes the initial sample after trimming, and determine and the initial sample pair after trimming
The second execution route answered;If the second execution route is identical as the first execution route, continue to trim initial sample, until initial
Until the sample volume of sample reaches default smallest sample volume.
It in an exemplary embodiment of the disclosure, optionally, can be the following steps are included: generating and the second execution route
Corresponding Hash.
Further, since the first execution route and the second execution route are respectively present corresponding cryptographic Hash, terminal
Equipment or server detect the second execution route and the whether identical mode of the first execution route can be with are as follows: the first execution of comparison road
Diameter and the corresponding cryptographic Hash of the second execution route, if the first execution route and the corresponding cryptographic Hash phase of the second execution route
Together, then determine that the second execution route is identical as the first execution route;If the first execution route and the second execution route are corresponding
Cryptographic Hash is different, then determines that the second execution route is different from the first execution route.
As it can be seen that implementing the exemplary embodiment, mostly wheel trimming can be carried out to initial sample, and guarantee after trimming every time
Initial sample execution route it is all identical as the execution route of initial sample, to be promoted the insignificant part in initial sample
All probability that trimming is completed can reduce the sample volume of initial sample in this way, and then promote the survey of application program to be tested
Try efficiency.
As another exemplary embodiment, the mode for generating multiple test samples according to the initial sample after trimming is specific
It can be with are as follows: the initial sample after trimming is generated into multiple test samples by variation processing.
In an exemplary embodiment of the disclosure, variation processing may include the corresponding data of initial sample are carried out 1,
2,4,8,16 or 32 bit reversals, also may include the corresponding data of initial sample are carried out 8,16 or
32 bit plus-minuss, the embodiment of the present invention are not construed as limiting.
In an exemplary embodiment of the disclosure, optionally, the initial sample after trimming is generated by variation processing more
The mode of a test sample is specifically as follows: multithreading variation processing is carried out to the initial sample after trimming, to generate multiple surveys
Sample sheet.It is able to ascend the formation efficiency of test sample in this way.
As it can be seen that implement the exemplary embodiment, it can be anti-by carrying out bit to the data in the initial sample after trimming
Turn and/or add and subtract, realizes that the variation to initial sample is handled, and then obtain multiple test samples, answered with being promoted for be tested
It is comprehensive with the test of program, and then promote test effect.
As another exemplary embodiment, controls application program to be tested and execute the modes of multiple test samples and specifically may be used
With are as follows: it controls application program to be tested and executes and/or serially execute multiple test samples parallel.
As it can be seen that implementing the exemplary embodiment, can be mentioned by serially executing and/or executing multiple test samples parallel
Rise the testing efficiency for application program to be tested.Further, since only capturing to be tested answer during executing test sample
With the exception or collapse of program, executes path when test sample every time without recording, further improve and answered for be tested
With the testing efficiency of program.
As another exemplary embodiment, the applied program testing method can also comprising the steps of detecting that
Test application program is abnormal when executing multiple test samples, application program to be tested is restarted, until application to be tested
Program executes until completing all test samples.
It, can be by treating the monitoring of test application program, to control to be tested answer as it can be seen that implement the exemplary embodiment
All test samples are executed, with program to complete test content.
As another exemplary embodiment, trimming initial sample be may comprise steps of: go to initial sample
It makes an uproar processing, wherein initial sample is image pattern;Initial sample after denoising is folded, and to folded initial sample
This is primary every the trimming of default position pixel, trim every time area be preset the area of position pixel with.
As it can be seen that implement the optional embodiment, it can be by repeatedly being trimmed to image pattern, to reduce image pattern
Volume, and then promoted test sample efficiency.
As another exemplary embodiment, which can be the following steps are included: by multiple surveys
Sample is originally loaded onto the sample buffer of application program to be tested.
In an exemplary embodiment of the disclosure, optionally, it controls application program to be tested and executes multiple test samples, packet
It includes: controlling application program to be tested and repeatedly traverse sample buffer, to realize the execution for multiple test samples.
As it can be seen that implement the exemplary embodiment, it can be by the way that multiple test samples be loaded onto application program to be tested
Sample buffer promotes the testing efficiency for application program to be tested.
As an alternative embodiment, before terminal device or the initial sample of server prunes, the application program
Test method can also include: to adjust the start-up parameter and URL Scheme of application program to be tested, with realize test module with
Interaction between application program to be tested adjusted;Wherein, test module can be fuzz testing main body module, if after adjustment
Application program to be tested can receive fuzz testing main body module transmission parameter, it may be considered that realize test module with
Interaction between application program to be tested adjusted.In addition, it is necessary to explanation, above-mentioned URL Scheme is that one kind can be with
So that the agreement mutually jumped between app.
It still optionally further, may include application program monitoring pitching pile module, mould to be tested in terminal device or server
Paste test subject module and exception catching module.Wherein, fuzz testing main body module can be used for executing step S110, step
S120, step S130, step S140 and step S150;Application program monitoring pitching pile module to be tested is for adjusting to be tested answer
With the start-up parameter and URL Scheme of program and monitoring and record the message delivery method in application program to be tested;It will be different
Normal trapping module is embedded in application program to be tested;Exception catching module is used to capture the exception in application program to be tested.Wherein,
It can be convenient for determining collapse or exception in time during the test, in turn by exception catching Module-embedding application program to be tested
It can in time, automatically record, to determine the loophole in application program to be tested.
Specifically, when application program to be tested monitoring pitching pile module adjusts the start-up parameter and URL of application program to be tested
Scheme monitors and records the message delivery method in application program to be tested, and exception catching Module-embedding is to be tested
After application program, step S110, step S120, step S130, step S140 can be executed in order to fuzz testing main body module
And step S150;In step s 130, exception catching module can capture the abnormal results in implementing result, survey so as to fuzzy
Examination main body module determines target sample.
As it can be seen that implementing the optional embodiment, the sample body of initial sample can be reduced by trimming initial sample
Product, and then the quantity of test sample is reduced, to improve testing efficiency.Furthermore it is possible to be executed by application program to be tested multiple
Test sample, and then the probability of capture application exception or collapse is promoted, and then promote the survey for application program to be tested
Try effect.
Referring to Fig. 2, Fig. 2 shows the structural frames according to the Application testing device of the disclosure one exemplary embodiment
Figure.The Application testing device includes initial sample trimming unit 201, test sample generation unit 202, test sample execution
Unit 203, target sample determination unit 204 and content determining unit to be repaired 205, in which:
Initial sample trims unit 201, for trimming initial sample, so that the sample volume of the initial sample after trimming
Less than the sample volume of the initial sample before trimming;Test sample generation unit 202, for raw according to the initial sample after trimming
At multiple test samples;Test sample execution unit 203 executes multiple test samples for controlling application program to be tested, with
Obtain implementing result;Target sample determination unit 204, for determined to cause from multiple test samples according to implementing result to
The target sample and the corresponding execution route of target sample of test application program exception;Content determining unit 205 to be repaired,
For determining the content to be repaired in application program to be tested by target sample and execution route.
As it can be seen that implementing Application testing device shown in Fig. 2, initial sample can be reduced by trimming initial sample
Sample volume, and then reduce test sample quantity, to improve testing efficiency.Furthermore it is possible to pass through application program to be tested
Multiple test samples are executed, and then promote the probability of capture application exception or collapse, and then are promoted for application to be tested
The test effect of program.
Property embodiment as an example, the Application testing device can also be including initial sample execution units (not
Diagram):
Initial sample execution unit executes initial sample, and determining and initial sample for controlling application program to be tested
Corresponding first execution route.
As it can be seen that implementing the exemplary embodiment, corresponding first execution route of initial sample can be obtained, so as to trimming
Initial sample afterwards is compared, and then promotes the testing efficiency for application program to be tested.
As another exemplary embodiment, initial sample trimming unit 201 trims the mode of initial sample specifically can be with
Are as follows: initial sample trimming unit 201 trims the part to be trimmed in initial sample;Initial sample trimming unit 201 controls to be measured
It tries application program and executes the initial sample after trimming, and determine the second execution route corresponding with the initial sample after trimming;If
Second execution route is identical as the first execution route, and initial sample trimming unit 201 continues to trim initial sample, until initial sample
Until this sample volume reaches default smallest sample volume.
As it can be seen that implementing the exemplary embodiment, mostly wheel trimming can be carried out to initial sample, and guarantee after trimming every time
Initial sample execution route it is all identical as the execution route of initial sample, to be promoted the insignificant part in initial sample
All probability that trimming is completed can reduce the sample volume of initial sample in this way, and then promote the survey of application program to be tested
Try efficiency.
As another exemplary embodiment, test sample generation unit 202 generates more according to the initial sample after trimming
The mode of a test sample is specifically as follows: test sample generation unit 202 handles the initial sample after trimming by variation
Generate multiple test samples.
As it can be seen that implement the exemplary embodiment, it can be anti-by carrying out bit to the data in the initial sample after trimming
Turn and/or add and subtract, realizes that the variation to initial sample is handled, and then obtain multiple test samples, answered with being promoted for be tested
It is comprehensive with the test of program, and then promote test effect.
As another exemplary embodiment, it is multiple that test sample execution unit 203 controls application program execution to be tested
The mode of test sample specifically: test sample execution unit 203 controls application program to be tested and executes or serially execute parallel
Multiple test samples.
As it can be seen that implementing the exemplary embodiment, can be mentioned by serially executing and/or executing multiple test samples parallel
Rise the testing efficiency for application program to be tested.Further, since only capturing to be tested answer during executing test sample
With the exception or collapse of program, executes path when test sample every time without recording, further improve and answered for be tested
With the testing efficiency of program.
As another exemplary embodiment, which can also include application program launching unit
(not shown):
Application program launching unit, it is different for occurring when detecting that application program to be tested executes multiple test samples
Often, application program to be tested is restarted, until application program to be tested, which executes, completes all test samples.
It, can be by treating the monitoring of test application program, to control to be tested answer as it can be seen that implement the exemplary embodiment
All test samples are executed, with program to complete test content.
As another exemplary embodiment, initial sample trimming unit 201 trims the mode of initial sample specifically: just
Beginning sample trims the initial sample of unit 201 trimming unit and carries out denoising to initial sample, wherein initial sample is image sample
This;Initial sample trimming unit 201 folds the initial sample after denoising, and to folded initial sample every default
Position pixel trimming is primary, trim every time area that area be default position pixel with.
As it can be seen that implement the optional embodiment, it can be by repeatedly being trimmed to image pattern, to reduce image pattern
Volume, and then promoted test sample efficiency.
As another exemplary embodiment, which can also include that sample loading unit (is not schemed
Show):
Sample loading unit, for multiple test samples to be loaded onto the sample buffer of application program to be tested.
As it can be seen that implementing the exemplary embodiment, by the sample that multiple test samples are loaded onto application program to be tested
Buffer area promotes the testing efficiency for application program to be tested.
Due to each functional module and above-mentioned application program of the Application testing device of the example embodiment of the disclosure
The step of example embodiment of test method, is corresponding, therefore for those undisclosed details in the apparatus embodiments, please refers to
The embodiment of the above-mentioned applied program testing method of the disclosure.
Referring to Fig. 3, Fig. 3 shows the computer for being suitable for the electronic equipment for being used to realize one exemplary embodiment of the disclosure
The structural schematic diagram of system 300.The computer system 300 of electronic equipment shown in Fig. 3 is only an example, should not be to the disclosure
The function and use scope of embodiment bring any restrictions.
As shown in figure 3, computer system 300 includes central processing unit (CPU) 301, it can be read-only according to being stored in
Program in memory (ROM) 302 or be loaded into the program in random access storage device (RAM) 303 from storage section 308 and
Execute various movements appropriate and processing.In RAM 303, it is also stored with various programs and data needed for system operatio.CPU
301, ROM 302 and RAM 303 is connected with each other by bus 304.Input/output (I/O) interface 305 is also connected to bus
304。
I/O interface 305 is connected to lower component: the importation 306 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 307 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 308 including hard disk etc.;
And the communications portion 309 of the network interface card including LAN card, modem etc..Communications portion 309 via such as because
The network of spy's net executes communication process.Driver 310 is also connected to I/O interface 305 as needed.Detachable media 311, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 310, in order to read from thereon
Computer program be mounted into storage section 308 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 309, and/or from detachable media
311 are mounted.When the computer program is executed by central processing unit (CPU) 301, executes and limited in the system of the application
Above-mentioned function.
It should be noted that computer-readable medium shown in the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation
Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs
When standby execution, so that the electronic equipment realizes such as above-mentioned applied program testing method as described in the examples.
For example, the electronic equipment may be implemented as shown in Figure 1: step S110: trimming initial sample, so that
The sample volume of initial sample after trimming is less than the sample volume of the initial sample before trimming;Step S120: after trimming
Initial sample generate multiple test samples;Step S130: controlling application program to be tested and execute multiple test samples, to obtain
Implementing result;Step S140: it is determined to lead to application exception to be tested from multiple test samples according to implementing result
Target sample and the corresponding execution route of target sample;Step S150: it is determined by target sample and execution route to be tested
Content to be repaired in application program.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description
Member, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more
Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould
The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure
The technical solution of embodiment can be embodied in the form of software products, the software product can store one it is non-easily
In the property lost storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) or on network, including some instructions are so that a meter
Equipment (can be personal computer, server, touch control terminal or network equipment etc.) execution is calculated according to the embodiment party of the disclosure
The method of formula.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (10)
1. a kind of applied program testing method characterized by comprising
Initial sample is trimmed, so that the sample volume of the initial sample after trimming is less than the sample of the initial sample before trimming
This volume;
Multiple test samples are generated according to the initial sample after trimming;
It controls application program to be tested and executes the multiple test sample, to obtain implementing result;
The mesh for leading to the application exception to be tested is determined from the multiple test sample according to the implementing result
Standard specimen sheet and the corresponding execution route of the target sample;
The content to be repaired in the application program to be tested is determined by the target sample and the execution route.
2. the method according to claim 1, wherein trimming initial sample, comprising:
Trim the part to be trimmed in initial sample;
It controls the application program to be tested and executes the initial sample, and determination is executed with the initial sample corresponding first
Path;
It controls application program to be tested and executes the initial sample after trimming, and determine and the initial sample corresponding second after trimming
Execution route;
If second execution route is identical as first execution route, continue to trim the initial sample, until described
Until the sample volume of initial sample reaches default smallest sample volume.
3. the method according to claim 1, wherein generating multiple test specimens according to the initial sample after trimming
This, comprising:
Initial sample after trimming is generated into multiple test samples by variation processing.
4. the method according to claim 1, wherein controlling application program to be tested executes the multiple test specimens
This, comprising:
It controls application program to be tested and executes or serially execute the multiple test sample parallel.
5. the method according to claim 1, wherein trimming initial sample, comprising:
Denoising is carried out to initial sample, wherein the initial sample is image pattern;
Initial sample after denoising is folded, and folded initial sample is trimmed once, often every default position pixel
Secondary trimming area be default position pixel area with.
6. the method according to claim 1, wherein further include:
The multiple test sample is loaded onto the sample buffer of the application program to be tested.
7. a kind of Application testing device characterized by comprising
Initial sample trims unit, for trimming initial sample, repairs so that the sample volume of the initial sample after trimming is less than
The sample volume of the initial sample before cutting;
Test sample generation unit, for generating multiple test samples according to the initial sample after trimming;
Test sample execution unit executes the multiple test sample for controlling application program to be tested, executes knot to obtain
Fruit;
Target sample determination unit, for determined to cause from the multiple test sample according to the implementing result it is described to
The target sample and the corresponding execution route of the target sample of test application program exception;
Content determining unit to be repaired, it is described to be tested using journey for being determined by the target sample and the execution route
Content to be repaired in sequence.
8. device according to claim 7, which is characterized in that the initial sample trimming unit trims the side of initial sample
Formula specifically:
The initial sample trimming unit trims the part to be trimmed in initial sample;
The initial sample trims the unit control application program to be tested and executes the initial sample, and determining and described first
Corresponding first execution route of beginning sample;
The initial sample trimming unit controls application program to be tested and executes the initial sample after trimming, and after determining and trimming
Corresponding second execution route of initial sample;
If second execution route is identical as first execution route, the initial sample trimming unit continues described in trimming
Initial sample, until the sample volume of the initial sample reaches default smallest sample volume.
9. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is executed by processor
Shi Shixian applied program testing method for example according to any one of claims 1 to 6.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing
When device executes, so that one or more of processors realize such as Application testing according to any one of claims 1 to 6
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910625687.0A CN110471840A (en) | 2019-07-11 | 2019-07-11 | Applied program testing method, device, computer-readable medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910625687.0A CN110471840A (en) | 2019-07-11 | 2019-07-11 | Applied program testing method, device, computer-readable medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110471840A true CN110471840A (en) | 2019-11-19 |
Family
ID=68508048
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910625687.0A Pending CN110471840A (en) | 2019-07-11 | 2019-07-11 | Applied program testing method, device, computer-readable medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110471840A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107025175A (en) * | 2017-05-12 | 2017-08-08 | 北京理工大学 | A kind of fuzz testing seed use-case variable-length field pruning method |
CN108280460A (en) * | 2017-12-04 | 2018-07-13 | 西安电子科技大学 | Based on the SAR vehicle target recognition methods for improving convolutional neural networks |
CN109032927A (en) * | 2018-06-26 | 2018-12-18 | 腾讯科技(深圳)有限公司 | A kind of bug excavation method and device |
-
2019
- 2019-07-11 CN CN201910625687.0A patent/CN110471840A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107025175A (en) * | 2017-05-12 | 2017-08-08 | 北京理工大学 | A kind of fuzz testing seed use-case variable-length field pruning method |
CN108280460A (en) * | 2017-12-04 | 2018-07-13 | 西安电子科技大学 | Based on the SAR vehicle target recognition methods for improving convolutional neural networks |
CN109032927A (en) * | 2018-06-26 | 2018-12-18 | 腾讯科技(深圳)有限公司 | A kind of bug excavation method and device |
Non-Patent Citations (1)
Title |
---|
李谦;刘嘉勇;: "基于Fuzzing技术的样本集精简优化研究", 网络安全技术与应用, no. 01, pages 62 - 64 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109726093B (en) | Method, apparatus and computer program product for executing test cases | |
US20120230587A1 (en) | Systems and methods for testing content of mobile communication devices | |
CN106844217A (en) | Control to applying bury method and device, readable storage medium storing program for executing a little | |
US9092565B2 (en) | Synchronization point visualization for modified program source code | |
US9519789B2 (en) | Identifying security vulnerabilities related to inter-process communications | |
CN105897461A (en) | Multi-system OTA upgrading method and multi-system equipment | |
US20150095888A1 (en) | Progressive black-box testing of computer software applications | |
CN109656698A (en) | Task processing method, management platform, actuating station and computer readable storage medium | |
CN104850427A (en) | Method and device for upgrading code | |
CN110597706A (en) | Method and device for testing application program interface data abnormity | |
JP2019101581A (en) | Software quality determination device, software quality determination method, and software quality determination program | |
CN112015654A (en) | Method and apparatus for testing | |
CN109144677A (en) | The method and apparatus of keep-alive process for Android system | |
JP2019101582A (en) | Software quality determination device, software quality determination method, and software quality determination program | |
CN109491908B (en) | Page detection method and device, electronic equipment and storage medium | |
CN107656722A (en) | Data manipulation method, device and computer-readable recording medium | |
KR100758850B1 (en) | Appaturus and method for test using test script in mobile communication system | |
CN110471840A (en) | Applied program testing method, device, computer-readable medium and electronic equipment | |
CN105045801B (en) | The display methods of head portrait, apparatus and system when a kind of login | |
CN109542864A (en) | A kind of resource storage method, resource downloading method, system, equipment and medium | |
CN105391714A (en) | Automatic signature and verification method and apparatus for mobile application | |
CN109871294B (en) | Method and device for checking data and processing request | |
US10127132B2 (en) | Optimizing automated interactions with web applications | |
CN109861875A (en) | The test method and device of application program | |
CN114218166A (en) | Data processing method and device, electronic equipment and readable 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 |