CN108763074A - A kind of method and device of SDK tests - Google Patents

A kind of method and device of SDK tests Download PDF

Info

Publication number
CN108763074A
CN108763074A CN201810487677.0A CN201810487677A CN108763074A CN 108763074 A CN108763074 A CN 108763074A CN 201810487677 A CN201810487677 A CN 201810487677A CN 108763074 A CN108763074 A CN 108763074A
Authority
CN
China
Prior art keywords
test
data
app
sdk
test bag
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
CN201810487677.0A
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.)
Shaanxi Xueqian Normal University
Original Assignee
Shaanxi Xueqian Normal University
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 Shaanxi Xueqian Normal University filed Critical Shaanxi Xueqian Normal University
Priority to CN201810487677.0A priority Critical patent/CN108763074A/en
Publication of CN108763074A publication Critical patent/CN108763074A/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
    • 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/3696Methods or tools to render software testable
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of method and devices of SDK in Android system field tests, including:User triggers APP and drives client executing task, then intercepts the request data that client exports;Test bag is established for the request data of interception, and suitable structure file, configuration file and bibliographic structure are automatically created for test event, is arranged between test bag and need application program to be tested and links;Determine whether the data in test bag receive with application program identical, the data packet that APP clients issue if identical passes through validation test, the present invention will be established between APP clients and computer system and be connected, it is intercepted by the output request data to client and establishes test bag, it is compared by the data packet of data set and system structure in test bag, to the accuracy of testing number SDK data, this method is simple and efficient, detection efficiency is high, and test result is accurate.

Description

A kind of method and device of SDK tests
Technical field
The invention discloses a kind of method and devices of SDK tests, specially Android system field.
Background technology
SDK, that is, software tool kit provides an external interface for being cased with certain structure and logic, encapsulates internal business Logic, caller simplify the exploitation stream of software according to illustrating that document can realize expected function using corresponding external interface Journey ensure that the quality of software to a certain extent.Wherein, data acquisition SDK be embedded in the code library of application program, when with When APP is triggered at family, SDK can record and acquire the user behavior data that user triggers APP, and by collected user behavior data It is sent in server.As SDK is in the continuous universal of field of software development, SDK sends the accuracy of user behavior data It is more and more important, that is, the accuracy of SDK transmission datas is tested, so that it is guaranteed that the development quality of software.
Currently, SDK tests include mainly two aspects, on the one hand it is that user interface behaviour is either manually or automatically executed in APP Make, for example, opening video, pause video etc., second aspect is to verify the UI that SDK is sent to server to operate corresponding data Whether the data for whether sending and sending are accurate, for example, when executing opening video in UI, whether the data of transmission are load number Whether it is in load etc. according to the stress state of, video.
When whether the corresponding data of UI operations that the above-mentioned second aspect verification SDK of execution is sent to server are accurate, lead to The Agent of random crawl data packet can be often set in gateway, and the data in the data packet of manual verification's crawl is accurate Property, the efficiency of this kind of SDK verification mode is more low.Meanwhile mobile phone illegally obtains it when installing a certain software from mobile phone His information, such as access mobile phone contact, locating cellphone, access handset identity code etc., greatly reduce the safety of mobile phone Energy.For this purpose, we have proposed a kind of method and devices of SDK tests to come into operation, to solve the above problems.
Invention content
The purpose of the present invention is to provide a kind of method and devices of SDK tests, to solve to propose in above-mentioned background technology The problem of.
To achieve the above object, the present invention provides the following technical solutions:A kind of method of SDK tests, including:
User triggers APP and drives client executing task, then intercepts the request data that client exports;
Test bag is established for the request data of interception, and suitable structure file, configuration are automatically created for test event File and bibliographic structure are arranged between test bag and need application program to be tested and link;
Determine whether the data in test bag receive with application program identical, and APP clients issue if identical Data packet pass through validation test.
Preferably, it when the user triggers APP, is realized by broadcasting, is completed to behavior type according to action name Classification, and the differentiation to behavior is completed according to caseid.
Preferably, described when being intercepted to request data, specifically, user uses adb orders and APP progress data On communication, such as send broadcast, start Activity, while being modified to configuration file using shell-command, then carry out Gradle is compiled, and realizes the modification to APP level parameters;It is API Calls by the stringification of transmission.
Preferably, the test bag is when being tested, using the setup of Application test application program objects And teardown, and the global state of object of reservation information.
Preferably, a kind of device of SDK tests, including data acquisition module, data cutout module, test bag establish module And test parsing module;
The data acquisition module is executed instruction for acquiring user's triggering APP, and captures data packet, is then transferred to institute It states in data cutout module;
The data cutout module carries out the communication in data by using adb orders and APP, utilizes shell-command pair Configuration file is modified, then carries out gradle compilings, the modification to APP level parameters is realized, then by the character string of transmission It turns to API and establishes module real-time calling for the test bag;
It is that test event automatically creates suitable structure file, configuration file and catalogue knot that the test bag, which establishes module, Structure is arranged between test bag and need application program to be tested and links;
The test parsing module determines whether the data in test bag receive with application program identical, if identical The data packet that then APP clients issue passes through validation test.
Compared with prior art, the beneficial effects of the invention are as follows:The present invention will be built between APP clients and computer system Vertical connection, test bag is intercepted and is established by the output request data to client, by data set in test bag with The data packet of system structure is compared, and to the accuracy of testing number SDK data, can avoid accessing hand in software installation Machine contact person, locating cellphone, access handset identity code etc., improve the safety of mobile phone, this method is simple and efficient, detection efficiency Height, and test result is accurate.
Description of the drawings
Fig. 1 is operational flow diagram of the present invention;
Fig. 2 is present system functional block diagram.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
- 2 are please referred to Fig.1, the present invention provides a kind of technical solution:A kind of method of SDK tests, including:
User triggers APP and drives client executing task, then intercepts the request data that client exports;
Test bag is established for the request data of interception, and suitable structure file, configuration are automatically created for test event File and bibliographic structure are arranged between test bag and need application program to be tested and link;
Determine whether the data in test bag receive with application program identical, and APP clients issue if identical Data packet pass through validation test.
It when the user triggers APP, is realized by broadcasting, the classification to behavior type is completed according to action name, and Differentiation to behavior is completed according to caseid, it is described when being intercepted to request data, specifically, user uses adb orders The communication in data is carried out with APP, broadcast is such as sent, starts Activity, while configuration file is carried out using shell-command Modification, then gradle compilings are carried out, realize the modification to APP level parameters;It is API Calls by the stringification of transmission, it is described Test bag is when being tested, and using the setup and teardown of Application test application program objects, and retains pair The global state of image information.
The present invention also provides a kind of devices of SDK tests, including data acquisition module, data cutout module, test bag Establish module and test parsing module;
The data acquisition module is executed instruction for acquiring user's triggering APP, and captures data packet, is then transferred to institute It states in data cutout module;
The data cutout module carries out the communication in data by using adb orders and APP, utilizes shell-command pair Configuration file is modified, then carries out gradle compilings, the modification to APP level parameters is realized, then by the character string of transmission It turns to API and establishes module real-time calling for the test bag;
It is that test event automatically creates suitable structure file, configuration file and catalogue knot that the test bag, which establishes module, Structure is arranged between test bag and need application program to be tested and links;
The test parsing module determines whether the data in test bag receive with application program identical, if identical The data packet that then APP clients issue passes through validation test.
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with Understanding without departing from the principles and spirit of the present invention can carry out these embodiments a variety of variations, modification, replace And modification, the scope of the present invention is defined by the appended.

Claims (5)

1. a kind of method of SDK tests, it is characterised in that:Including:
User triggers APP and drives client executing task, then intercepts the request data that client exports;
Test bag is established for the request data of interception, and suitable structure file, configuration file are automatically created for test event And bibliographic structure, it is arranged between test bag and need application program to be tested and links;
Determine whether the data in test bag with application program receive whether identical, the number that APP clients issue if identical Pass through validation test according to packet.
2. a kind of method of SDK tests according to claim 1, it is characterised in that:When the user triggers APP, pass through Broadcast is realized, completes the classification to behavior type according to action name, and complete the differentiation to behavior according to caseid.
3. a kind of method of SDK tests according to claim 1, it is characterised in that:Described cuts request data When taking, specifically, user carries out the communication in data using adb orders and APP, such as sends broadcast, starts Activity, simultaneously It is modified to configuration file using shell-command, then carries out gradle compilings, realize the modification to APP level parameters;It will pass Defeated stringification is API Calls.
4. a kind of method of SDK tests according to claim 1, it is characterised in that:The test bag when being tested, Using the setup and teardown of Application test application program objects, and the global state of object of reservation information.
5. a kind of device of SDK tests, it is characterised in that:Mould is established including data acquisition module, data cutout module, test bag Block and test parsing module;
The data acquisition module is executed instruction for acquiring user's triggering APP, and captures data packet, is then transferred to the number According in interception module;
The data cutout module carries out the communication in data by using adb orders and APP, using shell-command to configuration File is modified, then carries out gradle compilings, is realized the modification to APP level parameters, is by the stringification of transmission then API establishes module real-time calling for the test bag;
It is that test event automatically creates suitable structure file, configuration file and bibliographic structure that the test bag, which establishes module, It is arranged between test bag and need application program to be tested and links;
The test parsing module determines whether the data in test bag receive with application program identical, if identical The data packet that APP clients issue passes through validation test.
CN201810487677.0A 2018-05-21 2018-05-21 A kind of method and device of SDK tests Pending CN108763074A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810487677.0A CN108763074A (en) 2018-05-21 2018-05-21 A kind of method and device of SDK tests

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810487677.0A CN108763074A (en) 2018-05-21 2018-05-21 A kind of method and device of SDK tests

Publications (1)

Publication Number Publication Date
CN108763074A true CN108763074A (en) 2018-11-06

Family

ID=64007405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810487677.0A Pending CN108763074A (en) 2018-05-21 2018-05-21 A kind of method and device of SDK tests

Country Status (1)

Country Link
CN (1) CN108763074A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119350A (en) * 2019-04-02 2019-08-13 深圳市腾讯信息技术有限公司 Software Development Kit test method, device and equipment and computer storage medium
CN111176720A (en) * 2019-12-27 2020-05-19 珠海奔图电子有限公司 Control method and control device for running application programs in multiple systems
CN110298669B (en) * 2019-06-27 2023-09-12 上海麦克风文化传媒有限公司 iOS charging risk control system based on graphic structure

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399814A (en) * 2013-07-16 2013-11-20 西安Tcl软件开发有限公司 Automated testing method and automated testing device
GB2524737A (en) * 2014-03-31 2015-10-07 Kainos Worksmart Ltd A system and method for testing a workflow
CN106598831A (en) * 2015-10-16 2017-04-26 北京国双科技有限公司 Method and device for testing SDK (software development kit)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399814A (en) * 2013-07-16 2013-11-20 西安Tcl软件开发有限公司 Automated testing method and automated testing device
GB2524737A (en) * 2014-03-31 2015-10-07 Kainos Worksmart Ltd A system and method for testing a workflow
CN106598831A (en) * 2015-10-16 2017-04-26 北京国双科技有限公司 Method and device for testing SDK (software development kit)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119350A (en) * 2019-04-02 2019-08-13 深圳市腾讯信息技术有限公司 Software Development Kit test method, device and equipment and computer storage medium
CN110119350B (en) * 2019-04-02 2023-02-03 深圳市腾讯信息技术有限公司 Software development kit testing method, device and equipment and computer storage medium
CN110298669B (en) * 2019-06-27 2023-09-12 上海麦克风文化传媒有限公司 iOS charging risk control system based on graphic structure
CN111176720A (en) * 2019-12-27 2020-05-19 珠海奔图电子有限公司 Control method and control device for running application programs in multiple systems

Similar Documents

Publication Publication Date Title
CN102209326B (en) Malicious behavior detection method and system based on smartphone radio interface layer
US9137664B2 (en) Application logging interface for a mobile device
CN103856446B (en) A kind of login method, device and open platform system
CN104376266B (en) The determination method and device of application software level of security
CN106845236A (en) A kind of application program various dimensions privacy leakage detection method and system for iOS platforms
CN104639423B (en) Information interaction method, information interaction device and terminals
CN104217164A (en) Method and device for detecting malicious software of intelligent mobile terminal
CN103618606A (en) App login method verified through short message
US10491459B1 (en) Systems and methods for on-device adaptive self-executing diagnostics tool
CN104168557A (en) Upgrading method for operating systems and upgrading device for operating systems
CN104754608B (en) Realize the method and system of mobile terminal performance monitoring
CN102724322B (en) A kind of method and device for realizing remote control
CN102779255A (en) Method and device for judging malicious program
CN103916852B (en) A kind of data transmission method and a kind of mobile terminal
KR20110128632A (en) Method and device for detecting malicious action of application program for smartphone
CN104519560B (en) Intercept the method and mobile terminal of mobile terminal request
CN104640138B (en) A kind of method and device of orientation problem terminal
CN103716785A (en) Mobile Internet security service system
CN110119350A (en) Software Development Kit test method, device and equipment and computer storage medium
CN108763074A (en) A kind of method and device of SDK tests
CN102662734B (en) Android RIL system and construction method thereof
CN107341865A (en) Vehicle condition remote diagnosis method based on smart mobile phone in shared automobile management platform
CN104123380A (en) Webpage access method and device
CN105828368A (en) Fault positioning method and corresponding device
CN104580652B (en) Mobile terminal and its session authentication method based on DTMF

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181106