CN108334441A - A kind of automated testing method and system of Software Development Kit - Google Patents

A kind of automated testing method and system of Software Development Kit Download PDF

Info

Publication number
CN108334441A
CN108334441A CN201710039831.3A CN201710039831A CN108334441A CN 108334441 A CN108334441 A CN 108334441A CN 201710039831 A CN201710039831 A CN 201710039831A CN 108334441 A CN108334441 A CN 108334441A
Authority
CN
China
Prior art keywords
test
development kit
software development
code
types
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710039831.3A
Other languages
Chinese (zh)
Inventor
李晓峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Excellent Friends Bullock Media Development Co
Original Assignee
Shenzhen Excellent Friends Bullock Media Development Co
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 Shenzhen Excellent Friends Bullock Media Development Co filed Critical Shenzhen Excellent Friends Bullock Media Development Co
Priority to CN201710039831.3A priority Critical patent/CN108334441A/en
Publication of CN108334441A publication Critical patent/CN108334441A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses a kind of automated testing method of Software Development Kit and systems, belong to software testing technology field.Wherein, which includes:Determine at least one test-types that Software Development Kit includes;At least one test model that at least one test-types for obtaining and determining match;It generates under each test model got, is used for the test code of test software development kit;The test code generated is executed, the test result of Software Development Kit is obtained.

Description

A kind of automated testing method and system of Software Development Kit
Technical field
The present embodiments relate to software testing technology field, more particularly to the automation of a kind of Software Development Kit is surveyed Method for testing and system.
Background technology
SDK (Software Development Kit, Software Development Kit) is for specific software package, software frame The set of developing instrument when frame, hardware platform, operating system etc. establish application software.General SDK has gathered various functions API needs completely to be tested after SDK is integrated into other programs before program operation, to ensure that SDK is provided It is fully functional, logically true.
Existing SDK includes many types, such as has gathered API, UI and/or needs far call third party's interface work( The SDK etc. of energy.
In the implementation of the present invention, inventor has found that at least there are the following problems:
Existing one of which is when test, to need to write test code manually for the test method of SDK, The method for introducing SDK is tested;This method testing cost is very high, and complexity is also very high, and the requirement to tester is compared Height, testing time are long.
Another existing test method for being directed to SDK is, for the SDK for having gathered API, using automatic test side Method is tested;This method usually requires client and server-side carries out data interaction, and the testing time is long, of high cost, and Also other kind of SDK in addition to the SDK for having gathered API can not be tested.
Invention content
The purpose of the embodiment of the present invention is to provide one kind and can automatically be classified to Software Development Kit set, and with Test model Auto-matching, to call different test methods, the test tested automatically using respective test method Method and system.
One side according to the ... of the embodiment of the present invention provides a kind of automated testing method of software development, the test side Method includes:Determine at least one test-types that Software Development Kit includes;At least one test class for obtaining and determining At least one test model that type matches;It generates under each test model got, is used for test software developing instrument The test code of packet;The test code generated is executed, the test result of Software Development Kit is obtained.
Other side according to the ... of the embodiment of the present invention provides a kind of automatization test system of software development, the test System includes:Test and analyze module, at least one test-types for including for determining Software Development Kit;Test model mould Block, at least one test model that at least one test-types for obtaining and determining match;Test code building mould Block is used for the test code of test software development kit for generating under each test model got;Test execution Module obtains the test result of Software Development Kit for executing the test code generated.
Test method and system provided in an embodiment of the present invention, by determining that Software Development Kit includes at least first One test-types, at least one test model that at least one test-types for then obtaining and determining match, regeneration At under each test model got, it is used for the test code of test software development kit, finally executes the survey of generation Code is tried, the test result of Software Development Kit is obtained, entire test process is automation.Software is opened automatically to realize Hair kit matching test model is tested automatically so that entire test process from becoming one-touch automation behaviour manually Make, simplify testing procedure, and realizes the automatic test that can be directed to different type Software Development Kit.
Description of the drawings
Fig. 1 is a kind of flow diagram of the automated testing method of Software Development Kit of the embodiment of the present invention one;
Fig. 2 is a kind of flow diagram of embodiment of step S1 in the embodiment of the present invention;
Fig. 3 is a kind of flow diagram of embodiment of step S11 in the embodiment of the present invention;
Fig. 4 is a kind of flow diagram of the automated testing method of Software Development Kit of embodiment two;
Fig. 5 is a kind of flow diagram of embodiment of step S3 in the embodiment of the present invention one;
Fig. 6 is a kind of flow diagram of embodiment of step S4 in the embodiment of the present invention one;
Fig. 7 is a kind of flow diagram of the automated testing method of Software Development Kit of the embodiment of the present invention three;
Fig. 8 is the principle schematic of the automated testing method of the Software Development Kit of the embodiment of the present invention;
The structural schematic diagram of the automatization test system of the Software Development Kit of Fig. 9 embodiment of the present invention four;
Figure 10 is the structural schematic diagram that module is tested and analyzed in the embodiment of the present invention;
Figure 11 is the structural schematic diagram of key message extraction unit in the embodiment of the present invention;
Figure 12 is the structural schematic diagram of test model module in the embodiment of the present invention;
Figure 13 is the structural schematic diagram that code generation module is tested in the embodiment of the present invention;
Figure 14 is the structural schematic diagram of testing execution module in the embodiment of the present invention;
Figure 15 is the knot of the structural schematic diagram of the automatization test system of the Software Development Kit of the embodiment of the present invention five Structure schematic diagram.
Specific implementation mode
In order to make the objectives, technical solutions and advantages of the present invention clearer, With reference to embodiment and join According to attached drawing, the present invention is described in more detail.It should be understood that these descriptions are merely illustrative, and it is not intended to limit this hair Bright range.In addition, in the following description, descriptions of well-known structures and technologies are omitted, to avoid this is unnecessarily obscured The concept of invention.
It should be noted that SDK (Software Development Kit, Software Development Kit) is being delivered for use it Before, it needs to carry out a degree of test, to ensure that SDK has realized repertoire described in demand.And SDK is in order to meet not Same demand, realization method can also be very different.Such as a simple SDK for playing string parsing, function is only Only it is the segmentation parameter value of outputting standard after the broadcasting string for the string format for being directed to input is analyzed, internal logic Only individual character string judges and replicates and intercept.For another example one SDK for providing the integrated inquiry of error code, function is root All error code informations of the system are obtained according to the systematic name of input, internal logic then needs that third-party interface is called to take It is engaged in, to obtain original error code information and system information, being then packaged, being supplied to other programs to be integrated, in this way may be used The method for writing some far calls to avoid other programs is obtained.Also a kind of SDK that video-on-demand service is provided, in Portion encapsulates some behaviors operation of player, and test then needs the UI (User Interface, user interface) by upper layer The method to trigger SDK offers is called, to realize the confirmatory test to SDK functions.
The automatization test system of some popular SDK at present, third party need not be carried out mainly for described above The far call (need not be interacted with other programs) of interface, need not also be called by the UI on upper layer can meet test The SDK types of condition, thus for current diversified SDK, the automatic test that cannot be satisfied all types is real It is existing.
The embodiment of the present invention provides the automated testing method and system of a software development, can be directed to different types of SDK, by extracting the key messages of SDK packets so that it is determined that at least one test-types that Software Development Kit includes, in turn Test model corresponding with the test-types determined is matched, test model and then the call parameters for obtaining SDK generate test code, Then unify to collect the test result that execution test code obtains respectively and provide test report.
Fig. 1 shows a kind of flow signal of the automated testing method of Software Development Kit of the embodiment of the present invention one Figure.
As shown in Figure 1, the test method includes:
S1 determines at least one test-types that Software Development Kit includes;
Wherein, Software Development Kit is that the client of front end inputs, and the SDK packets of input are the SDK for including multiple SDK packets Set, the Software Development Kit during these SDK gather can be different types of SDK, can also be the SDK of single type, And each SDK type can include at least one feature, thus can also be that the various features of various types are combined into SDK gathers.Such as:Far call type (SDK for not needing the far call type of third party's interface), UI types (need to lead to Cross upper layer UI and call and trigger the SDK of SDK types) and API types (need the far call of progress third party interface or do not need The SDK interacted with other programs).Specifically, the step of acquisition tested software development kit is:According to HTTP or HTP Download address obtain the SDK, HTTP or HTP download address be test code generated after being compiled as SDK.For Each SDK in SDK set, can correspond to there are one test-types, test-types are the types to Software Development Kit The attribute information being identified.S2, at least one test model that at least one test-types for obtaining and determining match;
It specifically, can be true according to the test-types of each Software Development Kit after test-types are determined The test model that fixed and Software Development Kit matches, wherein each Software Development Kit is corresponding, and there are one tests Model.
S3 is generated under each test model got, is used for the test code of test software development kit;
After the test model to match with Software Development Kit is determined, according to test model, it can generate pair The test code that Software Development Kit is tested;
S4 executes the test code of generation, obtains the test result of Software Development Kit.
It tests after code building, code can be tested to test Software Development Kit, in turn by execution Obtain test result.
At least one test-types that the embodiment of the present invention one includes by determining Software Development Kit first, are then obtained At least one test model that at least one test-types for taking and determining match, generate get each test mould Under type, it is used for the test code of test software development kit, the test code of generation is finally executed, obtains Software Development Tools The test result of packet.Above-mentioned each step does not need manually operated, it is only necessary to input SDK set and one-touch behaviour can be realized Make, to simplify existing testing procedure, realizes automatic test.
Fig. 2 shows a kind of flow diagram of embodiment of step S1 in the embodiment of the present invention.
As shown in Fig. 2, step S1 includes:
S11 extracts the key message of Software Development Kit;
Specifically, key message is the key message that can determine Software Development Kit test-types, and key message can To be keyword or Feature Words, it can also be that characteristic key words, Feature Words are stated the feature of Software Development Kit Word, characteristic key words are that the word stated each feature of Software Development Kit is further to each The keyword that the corresponding at least one feature of type of Software Development Kit is stated, each Software Development Kit class Type includes at least one feature, each feature can be stated by least one keyword.Keyword includes for long-range The keyword for commonly using class and far call common method is called, the keyword for operating and calling for player behavior, for not With the keyword of telecommunication protocol, for class, method and the keyword of injection that common caching protocol calls, for configuration text The keyword etc. that remotely connection, cached configuration and UI are configured involved in part.
S12 matches key message with the Feature Words in feature database, and by the corresponding survey of the Feature Words of successful match Examination type is determined as the test-types that Software Development Kit includes.
As an implementation, the feature critical for each Software Development Kit type is stored in feature database Word, by the matching of characteristic key words, to classify to the multiple tested software development kits got.Wherein, each Kind Software Development Kit type includes at least one Feature Words, each Feature Words includes at least a keyword, keyword It is the word stated the feature of Software Development Kit.Such as:Class and the common side of far call are often used for far call The characteristic key words of method, the characteristic key words for operating and calling for player behavior, for the spy of different telecommunication protocols Keyword is levied, for class, method and the characteristic key words of injection that common caching protocol calls, for remote involved in configuration file The relevant characteristic key words such as journey connection, cached configuration and UI configurations.
Due to the key message extracted can not necessarily ensure it is identical with the characteristic key words in feature database, because And when being matched, key message can be matched with the Feature Words in feature database by similarity algorithm, To ensure maximum successful match.
As a kind of alternative embodiment, a modification injection feature interface can also be arranged in the present invention in feature database, should Interface is that more multi-form type occur after SDK in order to prevent and increased interface, the system can pass through the machine of itself Study carries out depth excavation, and new characteristic key words are added to by the interface in feature database, improve primitive character library automatically, The a variety of different types of SDK being likely to occur after enabling adaptation to, meet the automatic test demand of various types SDK.
The embodiment of above-mentioned steps S1 by extract key message, and then according to key message in feature database to software Development kit carry out characteristic matching, to obtain the test-types that the Software Development Kit includes, for it is subsequent be software Development kit matching test model is prepared so that can be according to the progress of the key message of extraction in matching test model Match, is the precondition of entire automatic test course.
Fig. 3 shows a kind of flow diagram of embodiment of step S11 in the embodiment of the present invention.
Step S11 can be opened by several different modes such as source code, bytecode and decompiling code to extract software The key message for sending out kit, as shown in figure 3, including:
S110 judges whether the source code of Software Development Kit;
Software Development Kit can be carried out some information of type identification by existing in source code, therefore be first determined whether With the presence or absence of source code.
If S111 extracts the key message of source code there are source code;
If there is the source code of Software Development Kit, then its key message can be directly extracted from source code.Its In, the key message of source code includes in the method name called, called method name (including internalist methodology), the libraries reference lib The information such as method, packet name, inheritance.
Wherein, it is not the key message of single vocabulary needs to do at some that some, which includes packet name and inheritance, Reason, for example inheritance is that parent and subclass, base class etc. are merged into a word, Bao Mingzhong additional characters, which can be converted to, to be solved The special symbol of analysis.
S112 carries out decompiling to Software Development Kit, obtains decompiling code if source code is not present, and Obtain the bytecode of Software Development Kit;
S113 extracts the key message of bytecode and decompiling code respectively.
If there is no the source code of Software Development Kit, then it can pass through the decompiling of scanning software development kit Code and bytecode obtain key message by the combination of decompiling code and bytecode.
It is closed by source code, bytecode and decompiling code many aspects to extract in the embodiment of above-mentioned steps S11 Key information is farthest suitable for various SDK packets to ensure maximum applicability of the automatic test to various SDK packets (including the SDK packets there are source code and there is no source code, and there are the key messages such as bytecode there is no source code SDK packets).
Fig. 4 shows a kind of flow signal of the automated testing method of Software Development Kit of the embodiment of the present invention two Figure.
As shown in figure 4, the method for the embodiment of the present invention two is in addition to including the step S1- steps in the embodiment of the present invention one Except S4, it can also include the following steps S5 after step S1 and before step S2:
S5 obtains the corresponding test-types label of each test-types that Software Development Kit includes.
Optionally, test-types label can be the characteristic key words stored in feature database in above-described embodiment, also may be used To be the type of the Software Development Kit determined according to characteristic key words.
Corresponding to above-mentioned steps S5, when Software Development Kit carries test-types label, then in order to test class Type label can match, so that it is determined that test model, the step S2 in the embodiment of the present invention one can have following embodiment party Formula, including:
S21 obtains the label that each test model carries;
Test model carry label with and its Software Development Kit to match test-types test-types mark Sign it is identical, be same label.
S22, the test model that the test-types label that label and Software Development Kit include is matched, is determined as phase Matched at least one test model.
The label that carries test model with and its Software Development Kit to match test-types test class When type label is matched, if the two can successful match, then the test model for carrying the label is determined as and carries The test model that the Software Development Kit of test-types label matches.
Fig. 5 shows a kind of flow diagram of embodiment of step S3 in the embodiment of the present invention one.
As shown in figure 5, step S3 includes:
S31 obtains the method and parameter of application programming interface in Software Development Kit;
Include application programming interface in each Software Development Kit, and the interface include various methods with Parameter can obtain the method and parameter of interface by application programming interface in scanning software development kit, interface Method includes at least tested method name, and the parameter of interface includes at least the type and quantity of required data, the class of required data Type can be int types, can also be other types.
S32, the method based on application programming interface and parameter, generate under each test model, are used for test software The test code of development kit.
During generating test code, the method for application programming interface needs to write one as method for testing is tested The function of a test method calls the function for being tested method for testing according to tested method name, and it is tested to utilize test method to call During method for testing, test method needs to call corresponding test data to pass according to the type of required data in parameter and quantity Tested method for testing is passed, the test code of generation includes test data, test method and tested method for testing, that is, completes to automatically generate The relevant test code that Software Development Kit is tested under test model.
Fig. 6 shows a kind of flow diagram of embodiment of step S4 in the embodiment of the present invention one.
As shown in fig. 6, step S4 includes:
S41 merges the test code under the different test models of generation;
Test code after merging is compiled by S42, obtains the executable file for including test code;
S43 detects the permission of executable file;
Wherein, since the executable file after compiling is likely due to rights concerns and can not directly run, i.e., currently User does not have executable permission, can cause certain obstruction to automatic test in this way, therefore needs before runtime first certainly The executable permission whether dynamic detection active user possesses this document jumps to step S45 if having permission;If without permission, Then executable file is authorized, is executable permission by the priority assignation of executable file, specifically automatically may be used Execute the permission that file is set as 755.
S44, when executable file permission be can not right of execution prescribe a time limit, be executable by the priority assignation of executable file Permission;
S45, when the permission of executable file is executable permission, the daily record rank that executable file is arranged is wrong day Will rank.
Wherein, it includes two kinds of situations that the permission of executable file, which is executable permission, and one is the detections by step S43 Determine that the inherently executable permission of the permission of executable file, another situation are obtained later by the setting of step S44 The permission of executable file be executable permission.
Error log rank is the daily record rank of acquiescence, can also be the day that executable file is arranged in the provisioning process Will rank is other ranks, sets error log rank in the embodiment of the present invention daily record rank of acquiescence, then operational process In only can the other daily record of output error journal stage.In addition, can all be executed to ensure to test code, measuring executing process In, if current test case code encounters mistake, it is mistake to skip currently performed test case and labeled test result And then misregistration daily record executes next test case, until whole test case codes are finished.Error log Rank can not only misregistration simultaneously can also ensure test code execution do not interrupt.
S46 runs executable file;
Executable file in the process of running, can generate the implementing result of test case, including some pilot process record And the log information recorded according to the daily record rank of setting.According to postrun test result, the test of all execution is analyzed The result information of use-case, including use-case implementing result (PASS or Fail), run time (being accurate to millisecond), log information Packet name etc. where (wrong daily record then records), use-case title, use-case, and generate the final result for including all test results Collect file.
In testing results file, by doing some pretreatment works, such as:Detection and reparation operation permission are set automatically Set daily record rank etc., then can the automatic running executable file, to achieve the purpose that automatic running whole test case. In addition, the test-types label of the description selftest type attribute entrained by SDK, can distinguish each test-types The corresponding test model of label.Different test models can handle different types of SDK, can be with according to different types of SDK The correlation technique for calling matched test model, to generate the code of test.Since SDK may include different test Attribute, it is thus possible to generate more parts of test codes, cause to be run multiple times in order to avoid needing to run more parts of test codes, and every Operation once can all generate a test result, be stored to the test result generated each time, by giving birth to different models At test code merge, while compile after formed an executable file, finally executable file is run And test result is collected, realize the automatic test of entire test process and the integrality of follow-up test and consistency.
As shown in Figure 7 and Figure 8, this method includes:
S5 generates the test report of at least one format according to test result;And/or
The test report of at least one dimension is generated, dimension includes one of following or combination:Business function, method, class.
Wherein, the test report of at least one format includes html formats, word formats, txt formats, wherein html lattice Formula is the format of the test report of the output of acquiescence, and in addition two kinds of formats can be used as two kinds of optional test report formats.
The test report of at least one dimension generated can only be the test report of business function dimension, method dimension The test report of test report and class dimension can also be the combination of any two or the three kinds of dimensions in above-mentioned three kinds of dimensions, i.e., The test report of business function dimension and method dimension, the test report of business function dimension and class dimension, method dimension and class The test report of dimension or the test report of business function dimension, method dimension and class dimension, certainly, the present invention is not It is limited to three of the above dimension, can also be other dimensions, every dimension in the prior art can belongs to implementation of the present invention In example within the scope of dimension.The test report of at least one dimension is generated according to the difference of test result demand, to convenient Other read personnel, and never same dimension obtains relevant information and relevant analysis result.
Fig. 9 shows the structural schematic diagram of the automatization test system of the Software Development Kit of the embodiment of the present invention four.
As shown in figure 9, the system includes:
Test and analyze module 10, at least one test-types for including for determining Software Development Kit;
Test model module 11, at least one test that at least one test-types for obtaining and determining match Model;
Code generation module 12 is tested, for generating under each test model got, is developed for test software The test code of kit;
Testing execution module 13 obtains the test result of Software Development Kit for executing the test code generated.
As an implementation, as shown in Figure 10, detection and analysis module 10 may include:
Key message extraction unit 100, the key message for extracting Software Development Kit;
Matching unit 101, for matching key message with the Feature Words in feature database, and by the spy of successful match The corresponding test-types of sign word are determined as the test-types that Software Development Kit includes.
As an implementation, as shown in figure 11, key message extraction unit 100 may include:
Judgment sub-unit 1000, the source code for judging whether Software Development Kit;
Key message extracts subelement 1001, the key message for when there are source code, extracting source code;With ought not There are the key messages of the bytecode and decompiling code that when source code, extract the Software Development Kit respectively;
Decompiling subelement 1002, for when there is no source code, then carrying out decompiling to Software Development Kit, obtaining To decompiling code;
Bytecode obtains subelement 1003, the bytecode for obtaining Software Development Kit.
As an implementation, detection and analysis module 10 is additionally operable to obtain each test that Software Development Kit includes The corresponding test-types label of type;
When detection and analysis module 10 is additionally operable to obtain test-types label, as shown in figure 12, test model module 11 can To include:
Label acquisition submodule 110, the label carried for obtaining each test model;
Test model determination sub-module 111, the test-types label phase for including with Software Development Kit by label Matched test model is determined as at least one test model to match.
As an implementation, as shown in figure 13, test code generation module 12 includes:
Interface and parameter acquiring submodule 120, the side for obtaining application programming interface in Software Development Kit Method and parameter;
Code call submodule 121 is tested, method and parameter based on application programming interface are used for, generates each survey Under die trial type, it to be used for the test code of test software development kit.
As an implementation, as shown in figure 14, testing execution module 14 includes:
Merge submodule 140, the test code for generating different test models merges;
Submodule 141 is compiled, for the test code after merging to be compiled, is obtained comprising the executable of test code File;
Permission detection sub-module 142, the permission for detecting executable file;
Rank and priority assignation submodule 143, for the permission when executable file be can not right of execution prescribe a time limit, can hold The priority assignation of style of writing part is executable permission, and when the permission of executable file is executable permission, is arranged executable The daily record rank of file is error log rank;
Submodule 144 is run, for running executable file.
As an implementation, as shown in figure 15, test system further includes:
Test report generation module 15, for according to test result, generating the test report of at least one format;And/or
The test report of at least one dimension is generated, dimension includes one of following or combination:Business function, method, class.
It should be noted that the automatization test system of invention software development kit is and is related to computer program stream The one-to-one systems/devices of automated testing method of the Software Development Kit of journey, due to preceding to software development The step flow of the automated testing method of kit is described in detail, herein no longer to the automatic of Software Development Kit The implementation process for changing test system is repeated, and for details, reference can be made to the descriptions of embodiment of the method part.
It should be understood that the above-mentioned specific implementation mode of the present invention is used only for exemplary illustration or explains the present invention's Principle, but not to limit the present invention.Therefore, that is done without departing from the spirit and scope of the present invention is any Modification, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.In addition, appended claims purport of the present invention Covering the whole variations fallen into attached claim scope and boundary or this range and the equivalent form on boundary and is repairing Change example.

Claims (14)

1. a kind of automated testing method of Software Development Kit, which is characterized in that including:
Determine at least one test-types that Software Development Kit includes;
At least one test model that at least one test-types for obtaining and determining match;
It generates in the case where each of getting the test model, the test code for testing the Software Development Kit;
The test code generated is executed, the test result of the Software Development Kit is obtained.
2. test method as described in claim 1, which is characterized in that the determining Software Development Kit include at least one A test-types, including:
Extract the key message of Software Development Kit;
The key message is matched with the Feature Words in feature database, and by the corresponding test class of the Feature Words of successful match Type is determined as the test-types that the Software Development Kit includes.
3. test method as claimed in claim 2, which is characterized in that the key message of the extraction Software Development Kit, Including:
Judge whether the source code of the Software Development Kit;
If there are source code, the key message of the source code is extracted;
If source code is not present, decompiling is carried out to the Software Development Kit, obtains decompiling code, and obtain institute State the bytecode of Software Development Kit;And the key message of the bytecode and decompiling code is extracted respectively.
4. test method as described in claim 1, which is characterized in that determine at least one survey that Software Development Kit includes After trying type, further include:
Obtain the corresponding test-types label of each test-types that the Software Development Kit includes;
At least one test model that the acquisition matches at least one test-types determined, including:
Obtain the label that each test model carries;
The test model that the test-types label that label and the Software Development Kit include is matched, is determined as the phase Matched at least one test model.
5. test method as described in claim 1, which is characterized in that described generate each of is getting the test model Under, the test code for testing the Software Development Kit, including:
Obtain the method and parameter of application programming interface in the Software Development Kit;
Method based on application programming interface and parameter generate under each test model, for testing the software The test code of development kit.
6. test method as described in claim 1, which is characterized in that the test code for executing generation, including:
The test code under the different test models of generation is merged;
Test code after merging is compiled, the executable file for including test code is obtained;
Run the executable file;
It is described to obtain including to test after the executable file of code, before running the executable file, further include:
Detect the permission of the executable file;
When the executable file permission be can not right of execution prescribe a time limit, the priority assignation by the executable file is executable Permission;
When the permission of the executable file is executable permission, the daily record rank that the executable file is arranged is wrong day Will rank.
7. test method as described in claim 1, which is characterized in that the method further includes:
According to the test result, the test report of at least one format is generated;And/or
The test report of at least one dimension is generated, the dimension includes one of following or combination:Business function, method, class.
8. a kind of automatization test system of Software Development Kit, which is characterized in that including:
Test and analyze module (10), at least one test-types for including for determining Software Development Kit;
Test model module (11), at least one survey that at least one test-types for obtaining and determining match Die trial type;
Code generation module (12) is tested, it is described soft for testing for generating in the case where each of getting the test model The test code of part development kit;
Testing execution module (13) obtains the test of the Software Development Kit for executing the test code generated As a result.
9. test system as claimed in claim 8, which is characterized in that the detection and analysis module (10) includes:
Key message extraction unit (100), the key message for extracting Software Development Kit;
Matching unit (101), for matching the key message with the Feature Words in feature database, and by successful match The corresponding test-types of Feature Words are determined as the test-types that the Software Development Kit includes.
10. test system as claimed in claim 9, which is characterized in that key message extraction unit (100) includes:
Judgment sub-unit (1000), the source code for judging whether the Software Development Kit;
Key message extracts subelement (1001), the key message for when there are source code, extracting the source code;With work as There is no the key messages of the bytecode and decompiling code that when source code, extract the Software Development Kit respectively;
Decompiling subelement (1002), for when there is no source code, then carrying out decompiling to the Software Development Kit, Obtain the decompiling code;
Bytecode obtains subelement (1003), the bytecode for obtaining the Software Development Kit.
11. test system as claimed in claim 8, which is characterized in that the detection and analysis module (10) is additionally operable to obtain institute State the corresponding test-types label of each test-types that Software Development Kit includes;
The test model module (11) includes:
Label acquisition submodule (110), the label carried for obtaining each test model;
Test model determination sub-module (111), the test-types label for including by label and the Software Development Kit The test model to match is determined as at least one test model to match.
12. test system as claimed in claim 8, which is characterized in that the test code generation module (12) includes:
Interface and parameter acquiring submodule (120), for obtaining application programming interface in the Software Development Kit Method and parameter;
Code call submodule (121) is tested, method and parameter based on application programming interface are used for, is generated each described Under test model, the test code for testing the Software Development Kit.
13. test system as claimed in claim 8, which is characterized in that the testing execution module (14) includes:
Merge submodule (140), the test code for generating different test models merges;
Submodule (141) is compiled, for the test code after merging to be compiled, obtains the executable text for including test code Part;
Permission detection sub-module (142), the permission for detecting the executable file;
Rank and priority assignation submodule (143), for the permission when the executable file be can not right of execution prescribe a time limit, by institute The priority assignation for stating executable file is executable permission, and when the permission of the executable file is executable permission, The daily record rank that the executable file is arranged is error log rank;
Submodule (142) is run, for running the executable file.
14. test system as claimed in claim 8, which is characterized in that the test system further includes:
Test report generation module (15), for according to the test result, generating the test report of at least one format;With/ Or
The test report of at least one dimension is generated, the dimension includes one of following or combination:Business function, method, class.
CN201710039831.3A 2017-01-19 2017-01-19 A kind of automated testing method and system of Software Development Kit Pending CN108334441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710039831.3A CN108334441A (en) 2017-01-19 2017-01-19 A kind of automated testing method and system of Software Development Kit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710039831.3A CN108334441A (en) 2017-01-19 2017-01-19 A kind of automated testing method and system of Software Development Kit

Publications (1)

Publication Number Publication Date
CN108334441A true CN108334441A (en) 2018-07-27

Family

ID=62921708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710039831.3A Pending CN108334441A (en) 2017-01-19 2017-01-19 A kind of automated testing method and system of Software Development Kit

Country Status (1)

Country Link
CN (1) CN108334441A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376088A (en) * 2018-10-24 2019-02-22 网宿科技股份有限公司 A kind of automatization test system and automated testing method
CN109857404A (en) * 2019-01-11 2019-06-07 平安科技(深圳)有限公司 The packaging method and device of SDK interface, storage medium, electronic equipment
CN113419919A (en) * 2021-06-24 2021-09-21 亿览在线网络技术(北京)有限公司 Method for thread monitoring of third-party SDK
US11803462B1 (en) * 2022-04-27 2023-10-31 Agora Lab, Inc. System and method for automatically generating test cases for testing SDKS

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080010539A1 (en) * 2006-05-16 2008-01-10 Roth Rick R Software testing
CN101930400A (en) * 2010-08-20 2010-12-29 北京神州泰岳软件股份有限公司 SDK (Software Development Kit) automatic test system and method
CN103268285A (en) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 Method and device for automatic generation of robustness test case of API interface
CN105630684A (en) * 2016-01-26 2016-06-01 百度在线网络技术(北京)有限公司 Software development kit identification method and device
CN106155894A (en) * 2015-04-10 2016-11-23 中兴通讯股份有限公司 A kind of generation method and device of test case
CN106294107A (en) * 2015-05-27 2017-01-04 富士通株式会社 The method and apparatus generating the test case of Webpage

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080010539A1 (en) * 2006-05-16 2008-01-10 Roth Rick R Software testing
CN101930400A (en) * 2010-08-20 2010-12-29 北京神州泰岳软件股份有限公司 SDK (Software Development Kit) automatic test system and method
CN103268285A (en) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 Method and device for automatic generation of robustness test case of API interface
CN106155894A (en) * 2015-04-10 2016-11-23 中兴通讯股份有限公司 A kind of generation method and device of test case
CN106294107A (en) * 2015-05-27 2017-01-04 富士通株式会社 The method and apparatus generating the test case of Webpage
CN105630684A (en) * 2016-01-26 2016-06-01 百度在线网络技术(北京)有限公司 Software development kit identification method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376088A (en) * 2018-10-24 2019-02-22 网宿科技股份有限公司 A kind of automatization test system and automated testing method
CN109857404A (en) * 2019-01-11 2019-06-07 平安科技(深圳)有限公司 The packaging method and device of SDK interface, storage medium, electronic equipment
CN113419919A (en) * 2021-06-24 2021-09-21 亿览在线网络技术(北京)有限公司 Method for thread monitoring of third-party SDK
US11803462B1 (en) * 2022-04-27 2023-10-31 Agora Lab, Inc. System and method for automatically generating test cases for testing SDKS
US20230350789A1 (en) * 2022-04-27 2023-11-02 Agora Lab, Inc. System and method for automatically generating test cases for testing sdks

Similar Documents

Publication Publication Date Title
CN107193739B (en) Black box regression testing method
CN103577324B (en) Static detection method for privacy information disclosure in mobile applications
CN110427331B (en) Method for automatically generating performance test script based on interface test tool
Dallmeier et al. Mining object behavior with ADABU
CN105094783B (en) method and device for testing stability of android application
US8312440B2 (en) Method, computer program product, and hardware product for providing program individuality analysis for source code programs
Walkinshaw et al. Reverse engineering state machines by interactive grammar inference
CN100483434C (en) Method and device for recognizing virus
US20020091968A1 (en) Object-oriented data driven software GUI automated test harness
CN108334441A (en) A kind of automated testing method and system of Software Development Kit
US20080086627A1 (en) Methods and apparatus to analyze computer software
CN106557413A (en) Based on the method and apparatus that code coverage obtains test case
US20070061641A1 (en) Apparatus and method for generating test driver
CN111694746A (en) Flash defect fuzzy evaluation tool for compilation type language AS3
CN105653946A (en) Android malicious behavior detection system based on combined event behavior triggering and detection method of Android malicious behavior detection system
CN108874649B (en) Method and device for generating automatic test script and computer equipment thereof
CN109446107A (en) A kind of source code detection method and device, electronic equipment
CN115270131A (en) Java anti-serialization vulnerability detection method and system
CN102782649A (en) Application modification section search device and application modification section search method
CN108090355B (en) APK automatic triggering tool
CN107729015A (en) A kind of method and apparatus for determining the useless function in engineering code
CN112579437A (en) Program operation process conformance verification method
US20230185692A1 (en) Highly Tested Systems
Rahman et al. A DSL for importing models in a requirements management system
Motan et al. Android App Testing: A Model for Generating Automated Lifecycle Tests

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180727

WD01 Invention patent application deemed withdrawn after publication