CN110389897A - SDK logic test method, device, storage medium and server - Google Patents

SDK logic test method, device, storage medium and server Download PDF

Info

Publication number
CN110389897A
CN110389897A CN201910527939.6A CN201910527939A CN110389897A CN 110389897 A CN110389897 A CN 110389897A CN 201910527939 A CN201910527939 A CN 201910527939A CN 110389897 A CN110389897 A CN 110389897A
Authority
CN
China
Prior art keywords
sdk
test
data
note data
sensitive field
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
CN201910527939.6A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910527939.6A priority Critical patent/CN110389897A/en
Publication of CN110389897A publication Critical patent/CN110389897A/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/3672Test management
    • G06F11/3692Test management for test results analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Abstract

The present invention relates to data processing fields, more particularly to a kind of SDK logic test method, device, storage medium and server, the described method includes: reading configuration file, the note data of test is generated according to sensitive field list preset in the configuration file and sensitive field allocation list;The note data of the test is applied in SDK, the test result data generated based on SDK logic is obtained;The accuracy of SDK logic is determined by the test result data compared with the expected result data according to the expected result data that the sensitive field allocation list obtains the note data.The present invention improves the efficiency of SDK logic testing, improves the comprehensive of SDK logic testing.

Description

SDK logic test method, device, storage medium and server
Technical field
The present invention relates to data processing fields, and in particular to a kind of SDK logic test method, device, storage medium and clothes Business device.
Background technique
With the development of internet technology, the function of application program is also more and more abundant, needs using the special events held The identity of terminal user is confirmed, such as identity validation is carried out by cell-phone number, it is true to carry out identity by real-name authentication Recognize, using the method that can use those identity validations by SDK, and to ensure the conscientious correctness of identity, first has to protect The correctness for demonstrate,proving SDK logic, needs effectively to test the logic of SDK, and how efficiently to carry out test to SDK is current row The problem of industry urgent need to resolve.
Summary of the invention
For overcome the above technical problem, the especially prior art can not efficiently, comprehensively carry out asking for SDK logic testing Topic, spy propose following technical scheme:
In a first aspect, the present invention provides a kind of SDK logic test methods, comprising:
Configuration file is read, generates and surveys according to sensitive field list preset in the configuration file and sensitive field allocation list Note data on probation;
The note data of the test is applied in SDK, the test result data generated based on SDK logic is obtained;
The expected result data that the note data is obtained according to the sensitive field allocation list, by the test result number According to compared with the expected result data, the accuracy of SDK logic is determined.
Further, the reading configuration file, according to sensitive field list and sensitive words preset in the configuration file Section allocation list generates the note data of test, comprising:
The configuration file is read, it is raw according to sensitive field list preset in the configuration file and sensitive field allocation list At the note data of the test comprising different accounts.
Further, the note data by the test is applied in SDK, what acquisition was generated based on SDK logic Test result data, comprising:
The corresponding note data of each account is applied in SDK, obtains by the note data for obtaining the corresponding test of each account Take the test result data of each account generated based on SDK logic.
Further, the note data by the test is applied in SDK, what acquisition was generated based on SDK logic Test result data, comprising:
The corresponding note data collection of each account is combined into unified account by the note data for obtaining the corresponding test of each account Note data, the note data of the unified account is applied in SDK, the unified account generated based on SDK logic is obtained Test result data.
Further, before the reading configuration file, further includes:
Remote server is received to the more new command of configuration file, is updated according to the more new command preset in configuration file Sensitive field allocation list sensitive field quantity and condition, and/or updated in sensitive field list according to the more new command Sensitive field.
Further, after the accuracy of the determining SDK logic, further includes:
Judge whether the accuracy meets polarity condition, if satisfied, according to sensitive field list preset in configuration file And sensitive field allocation list regenerates secondary note data, according to the secondary note data test SDK logic it is secondary just True rate determines wrong link according to the secondary accuracy.
Second aspect, the present invention provide a kind of SDK logic testing device, comprising:
Data generation module: for reading configuration file, according to sensitive field list preset in the configuration file and quick Feel the note data that field configuration table generates test;
Logic testing module: it for the note data of the test to be applied in SDK, obtains raw based on SDK logic At test result data;
Logic verify module: for obtaining the expected result number of the note data according to the sensitive field allocation list According to determining the accuracy of SDK logic by the test result data compared with the expected result data.
Further, the data generation module further includes executing:
The configuration file is read, it is raw according to sensitive field list preset in the configuration file and sensitive field allocation list At the note data of the test comprising different accounts.
The third aspect, the present invention also provides a kind of computer readable storage medium, the computer readable storage medium On be stored with computer program, which realizes above-mentioned SDK logic test method when being executed by processor.
Fourth aspect, the present invention also provides a kind of server, the server includes one or more processors, storage Device, one or more computer programs, wherein one or more of computer programs are stored in the memory and quilt It is configured to be executed by one or more of processors, one or more of programs are configured to carry out above-mentioned SDK logic Test method.
Compared with the prior art, the present invention has the following beneficial effects:
The present invention provides a kind of SDK logic test methods efficiently, comprehensive, expansion is strong, by configuration file Preset sensitivity field list and sensitive field allocation list, then read the sensitive field list in configuration file, determine in configuration file The sensitive field of current record, then the sensitive field allocation list in configuration file is read, determine the note data packet for needing to generate The quantity of the sensitive field contained and the total quantity of note data to generate the note data of test, then the test are used Note data be applied to SDK in, the field in note data by extracting the test in the preset time period, then with it is quick Sensitive field in sense field list matches, and filtering includes the short message item number of sensitive words section from note data, so that it is determined that institute The quantity comprising sensitive field in note data is stated, the test result data generated based on SDK logic is obtained, according to the sensitivity Field configuration table obtains the expected result data of the note data, by the test result data and the expected result data Compare, determines that the accuracy of SDK logic, the accuracy of the SDK logic of test just can react whether SDK can reach set mark Standard to efficiently test SDK logic, and passes through the specific sensitive field list of the division of labor and sensitive field allocation list, Can comprehensively, SDK logic can be tested with expanding.
By preset information of burying, characteristic when equipment for surfing the net user's registration is collected, characteristic at this time is The static nature data of equipment for surfing the net user, being then based on the static nature data building scene characteristic model includes abnormal inspection Model and true and false judgment models are surveyed, when obtaining the current signature data of equipment for surfing the net user again, which is Behavioral characteristics data obtain abnormal inspection by the behavioral characteristics data application in the abnormality detection model and true and false judgment models Result and true and false judging result are surveyed, then by comparing abnormality detection result and true and false judging result, determines that the equipment for surfing the net is used The classification type at family being capable of dynamic, standard by the comparison of the static nature data and behavioral characteristics data of equipment for surfing the net user Really, the classification type of equipment for surfing the net user is quickly determined, dynamically identifies whether equipment for surfing the net user is crawler machine, is kept away The interference of crawler machine can not be timely updated and can not identify by exempting from anti-crawler strategy, while avoid for real user being determined as different Common family, influences the subsequent job of user, to improve the efficiency of real user operation.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is an embodiment flow diagram of SDK logic test method of the present invention;
Fig. 2 is another embodiment flow diagram of SDK logic test method of the present invention;
Fig. 3 is an embodiment schematic diagram of SDK logic testing device of the present invention;
Fig. 4 is an example structure schematic diagram of server of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention Diction " comprising " refers to that there are the feature, integer, step, operations, but it is not excluded that in the presence of or addition it is one or more other Feature, integer, step, operation.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here To explain.
It will be appreciated by those skilled in the art that of the invention so-called " application ", " application program ", " computer program " and The concept of similar statement, is same concept well known to those skilled in the art, refers to and is instructed by series of computation machine and dependency number According to the computer software for being suitable for electronics operation of the organic construction of resource.Unless specified, this name itself is not by programming language Say type, rank, the operating system of operation of also not rely by it or platform are limited.In the nature of things, this genus also not by Any type of terminal is limited.
The embodiment of the present invention provides a kind of SDK logic test method, as shown in Figure 1, the described method comprises the following steps:
S10: reading configuration file, raw according to sensitive field list preset in the configuration file and sensitive field allocation list At the note data of test.
In the present embodiment, in order to test the logic of anti-fraud short message SDK, primary data and expectation are set by configuration file Result data is wrapped in the sensitivity field list specifically, preset sensitivity field list and sensitive field allocation list in configuration file It is saved containing word to be tested, word, and in the form of field such as string, includes sensitive words and pole in the sensitivity field list Surplus, specifically, a kind of application scenarios of the present embodiment are loan industry, sensitive words refer in loan industry than more sensitive Keyword, than if any shellfish moneybag, shared cash, petty load;And pole surplus is the keyword even more serious compared with sensitive words, such as Late Payment Fee, default interest, overdue etc..The quantity and corresponding accounting of each sensitive field are recorded in sensitive field allocation list.
In the present embodiment, the sensitive field list in configuration file is read, determines the sensitive words of current record in configuration file With pole surplus, the sensitive field allocation list in configuration file is read, determines the sensitive field for needing the note data generated to include Quantity and note data total quantity, the short of test is then generated according to the sensitive field list and sensitive field allocation list Letter data further can also set the temporal information of the note data of the test, for example, wrapping in sensitive field list Containing sensitive field A, sensitivity field A is configured to 3 in sensitive field allocation list, and the time dimension of total quantity 50, note data is The note data of test is generated according to above- mentioned information, 50 short messages in January, 2019 can be generated, wherein 3 in January, 2019 Short message contains sensitive field A.
S20: the note data of the test is applied in SDK, obtains the test result number generated based on SDK logic According to.
It,, will in the present embodiment in order to verify the correctness of anti-fraud short message SDK after obtaining the note data of test The note data of the test is applied in SDK, SDK (Software Development Kit, Software Development Kit) The set of developing instrument when establishing application software for specific software package, software frame, hardware platform, operating system etc., this The application Chen Jing of embodiment is anti-fraud SDK, is embedded in the anti-fraud SDK in the application of terminal device, then cheats SDK by counter Collecting device fingerprint and Equipment Foundations information, the device-fingerprint are the unique identifier of equipment, the Equipment Foundations packet Short message, address list information, photographic intelligence etc. are included, then the information being collected into is verified, the basic information of the present embodiment The note data of the test is applied in SDK by the as described note data, then obtains based on the generation of SDK logic Test result data, in one embodiment, SDK obtain institute's preset time period to be tested, then extract the preset time Field in the note data of test in section, then match with the field in sensitive field list, it is filtered from note data Short message item number comprising sensitive words and pole surplus, finally returns to a numerical value, so that it is determined that including sensitivity in the note data The quantity of field, the calculated result of obtained SDK obtain the test result data generated based on SDK logic.
S30: the expected result data of the note data are obtained according to the sensitive field allocation list, the test is tied Fruit data determine the accuracy of SDK logic compared with the expected result data.
In the present embodiment, sensitive field allocation list is also provided with the accounting of relevant field, the note data as test The reference information of generation, while it being also used as expected results Value Data, the short message number is obtained according to the sensitive field allocation list Expected result data according to the expected result data of each test field, such as acquisition are sensitive field in the note data in January The short message quantity of A is 3, and the short message quantity of sensitive field B is 5, then by the test result data and the expected result number According to comparing, so that it is determined that the accuracy of SDK logic.Whether the accuracy of the SDK logic of test just can react anti-fraud SDK and can Enough reach set standard, for example, when the note data of test generated has 50, wherein 3 include sensitive field A, 5 Comprising sensitive field B, in this, as expected result data, and after the note data of those tests is applied to SDK, wrapped Note data containing sensitive field A is 2, and the note data for wrapping sensitive field B is 4, in this, as test result data, passes through institute Test result data and expected result data are stated, the accuracy that just can calculate SDK logic illustrates out if accuracy is too low Hair realizes that logic may be problematic, needs to repair the logic of SDK.
A kind of SDK logic test method efficiently, comprehensive, expansion is strong is present embodiments provided, by configuration file In preset sensitive field list and sensitive field allocation list, then read the sensitive field list in configuration file, determine configuration file The sensitive field of middle current record, then the sensitive field allocation list in configuration file is read, determine the note data for needing to generate The quantity for the sensitive field for including and the total quantity of note data, to generate the note data of test, then by the test Note data is applied in SDK, the field in note data by extracting the test in the preset time period, then with Sensitive field in sensitive field list matches, and filtering includes the short message item number of sensitive words section from note data, so that it is determined that Quantity comprising sensitive field in the note data, obtains the test result data generated based on SDK logic, according to described quick Sense field configuration table obtains the expected result data of the note data, by the test result data and the expected result number According to comparing, determine that the accuracy of SDK logic, the accuracy of the SDK logic of test just can react whether SDK can reach set Standard to efficiently test SDK logic, and passes through the specific sensitive field list of the division of labor and sensitive field configuration Table, can comprehensively, SDK logic can be tested with expanding.
A kind of embodiment of the invention, the reading configuration file, according to sensitive field preset in the configuration file Table and sensitive field allocation list generate the note data of test, comprising:
The configuration file is read, it is raw according to sensitive field list preset in the configuration file and sensitive field allocation list At the note data of the test comprising different accounts.
In practical applications, terminal classifies the note data that each cell-phone number receives using cell-phone number as class indication Storage, and terminal applies collect cell-phone number when registering the terminal applies only in the note data of collection terminal as contingency table Know corresponding note data, it is contemplated that the note data device-fingerprint all having the same in same terminal, in order to prevent maliciously User carries out rogue activities by the multiple and different accounts of application, needs to test SDK logic when having multiple and different account datas, In the present embodiment, the configuration file is read, according to sensitive field list preset in the configuration file and sensitive field configuration Table generates the note data of the test comprising different accounts, when generating the note data of test, by the note data Create-rule is set as in the note data comprising multiple and different accounts, such as 50 short messages, and the short message of A account has 30, B account The short message at family has 10, and the short message of C account has 10, and 50 note data device-fingerprints having the same, to mention The diversity of high note data improves the coverage rate of SDK logic testing.
A kind of embodiment of the invention, the note data by the test are applied in SDK, obtain and are based on SDK The test result data that logic generates, comprising:
The corresponding note data of each account is applied in SDK, obtains by the note data for obtaining the corresponding test of each account Take the test result data of each account generated based on SDK logic.
On the basis of the above embodiments, when in note data including the note data of different accounts, in the present embodiment, When the note data of the test to be applied in SDK, the note data of the corresponding test of each account, such as A are obtained The short message of account has 30, and the short message of B account has 10, and the short message of C account has 10, then by the corresponding short message number of each account According to applied in SDK, the test result data of each account generated based on SDK logic, the subsequent test knot to each account are obtained Fruit data are compared one by one with expected result data, compare out judgement of the SDK logic for the note data under different accounts Accuracy whether meet the requirements, further, different accounts have different types, such as A account type be S1 type, B The type of account is S2 type, the type of C account is S3 type, may thereby determine that SDK logic for the short of different types of account The accuracy of letter data judgement, improves the comprehensive of SDK logic testing.
A kind of embodiment of the invention, the note data by the test are applied in SDK, obtain and are based on SDK The test result data that logic generates, comprising:
The corresponding note data collection of each account is combined into unified account by the note data for obtaining the corresponding test of each account Note data, the note data of the unified account is applied in SDK, the unified account generated based on SDK logic is obtained Test result data.
On the basis of the above embodiments, when in note data including the note data of different accounts, in the present embodiment, When the note data of the test to be applied in SDK, the corresponding note data collection of each account is combined into unified account Then the note data of the unified account is applied in SDK, obtains the unified account generated based on SDK logic by note data The test result data at family when the subsequent logic testing for SDK, can test out SDK logic for the short message under multiple accounts The accuracy of data, is equivalent in practical applications, and the note data collection with identical device-fingerprint is combined into unified account Note data can more meticulously determine the risk class of each account by the note data of unified account, further, this Embodiment can also be compared with the test result data of above-mentioned each account, from it is whole with classification to the logically true rate of SDK into Row complete contrast, to improve the accuracy of SDK logic testing, objectivity.
A kind of embodiment of the invention, it is described read the configuration file before, further includes:
Remote server is received to the more new command of configuration file, is updated according to the more new command preset in configuration file Sensitive field allocation list sensitive field quantity and condition, and/or updated in sensitive field list according to the more new command Sensitive field.
With the development of business, the sensitive field needs for including in sensitive field list are constantly updated, such as constantly emerging The new term risen such as block chain fund, P2P are borrowed, an embodiment of the present embodiment, when carrying out testing it to SDK logic Before, it needs to carry out real-time update to configuration file, specifically, more new command of the reception remote server to configuration file, according to The more new command updates the sensitive field in sensitive field list, adds or delete sensitive field in the sensitive field, with More novel sensitive fields can be counted on, the coverage of the test to SDK logic is improved for the development of adaptation business; The another embodiment of the present embodiment, the logic for testing SDK needs to be tested under different conditions, including same sensitivity The quantity and accounting of field, the quantity and accounting of different sensitivity fields need before testing SDK logic to matching It sets file and carries out real-time update, specifically, receiving remote server to the more new command of configuration file, according to the more new command The quantity and condition of the sensitive field of preset sensitive field allocation list in more new configuration file, will be in sensitive field allocation list The quantity of sensitive field A is updated to 8 from 5, and the quantity of the sensitive field B in sensitive field allocation list is updated to 6 from 3, while more The total quantity of the note data of the test generated needed for changing generates different condition to update the condition of sensitive field with this Under note data improve the coverage of the test to SDK logic thus the SDK logic under testing different condition.The present embodiment Configuration file, which passes through, distinguishes sensitive field and corresponding quantity and condition with different table, in sensitive field allocation list it is in store respectively The configuration item of sensitive field is protected in sensitive field list to the reference data and expected result data as short message test data All kinds of sensitive fields are deposited, the sensitivity field includes pole surplus and sensitive words information, can be updated at any time, to maintain configuration The clarity of file maintenance, being capable of clearly being updated or carrying out more to the quantity and condition of sensitive field to sensitive field Newly, the efficiency of more new configuration file is improved, the efficiency of SDK logic testing covering integrity degree is improved.
A kind of embodiment of the invention, as shown in Fig. 2, after the accuracy of the determining SDK logic, further includes:
S40: judging whether the accuracy meets polarity condition, if satisfied, according to sensitive words preset in configuration file Segment table and sensitive field allocation list regenerate secondary note data, according to the two of the secondary note data test SDK logic Secondary accuracy determines wrong link according to the secondary accuracy.
In the present embodiment, after test obtains the accuracy of SDK logic for the first time, judge that the accuracy of the SDK logic is No to meet polarity condition, the polarity condition includes accuracy less than 50%, i.e. expectation result data and test result data Difference is greater than 50%, if the accuracy meets polarity condition, it needs to be determined that the wrong link in test process, specifically, Secondary note data is regenerated according to the configuration file, regenerates two according to sensitive field list and sensitive field allocation list The quantity of secondary note data, the sensitive field that the note data that the secondary note data of generation is generated with first time has should phase Together, then according to the secondary accuracy of the secondary note data detection SDK logic, further, the secondary note data It not refers in particular to once test note data generated, the accuracy for the SDK logic repeatedly tested can be passed through in the present embodiment The link for determining mistake, determines that the mistake in test process occurs from the note data of generation or appear in SDK logic On, or appear on configuration file, so that it is determined that wrong link.
As shown in figure 3, in another embodiment, the present invention provides a kind of SDK logic testing devices, comprising:
Data generation module 10: for reading configuration file, according to sensitive field list preset in the configuration file and Sensitive field allocation list generates the note data of test;
Logic testing module 20: it for the note data of the test to be applied in SDK, obtains and is based on SDK logic The test result data of generation;
Logic verify module 30: for obtaining the expected result number of the note data according to the sensitive field allocation list According to determining the accuracy of SDK logic by the test result data compared with the expected result data.
A kind of embodiment of the invention, the data generation module 10 further include executing;
The configuration file is read, it is raw according to sensitive field list preset in the configuration file and sensitive field allocation list At the note data of the test comprising different accounts.
A kind of embodiment of the invention, the logic testing module 20 further include executing:
The corresponding note data of each account is applied in SDK, obtains by the note data for obtaining the corresponding test of each account Take the test result data of each account generated based on SDK logic.
A kind of embodiment of the invention, the logic testing module 20 further include executing:
The corresponding note data collection of each account is combined into unified account by the note data for obtaining the corresponding test of each account Note data, the note data of the unified account is applied in SDK, the unified account generated based on SDK logic is obtained Test result data.
A kind of embodiment of the invention, described device further include:
Update module: it for receiving remote server to the more new command of configuration file, is updated according to the more new command The quantity and condition of the sensitive field of preset sensitive field allocation list in configuration file, and/or more according to the more new command Sensitive field in new sensitivity field list.
A kind of embodiment of the invention, described device further include:
Error check module: for judging whether the accuracy meets polarity condition, if satisfied, according in configuration file Preset sensitive field list and sensitive field allocation list regenerate secondary note data, are tested according to the secondary note data The secondary accuracy of SDK logic determines wrong link according to the secondary accuracy.
In another embodiment, the present invention provides a kind of computer readable storage medium, computer-readable storage mediums Computer program is stored in matter, which realizes that SDK logic described in above-described embodiment is surveyed when being executed by processor Method for testing.Wherein, the computer readable storage medium includes but is not limited to any kind of disk (including floppy disk, hard disk, light Disk, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, read-only memory), RAM (Random AcceSS Memory, immediately memory), EPROM (EraSable Programmable Read-Only Memory, erasable programmable Read-only memory), EEPROM (Electrically EraSable Programmable Read-Only Memory, electrically erasable Programmable read only memory), flash memory, magnetic card or light card.It is, storage equipment includes by equipment (for example, calculating Machine, mobile phone) with any medium for the form storage or transmission information that can be read, it can be read-only memory, disk or CD etc..
A kind of computer readable storage medium provided in an embodiment of the present invention is, it can be achieved that read configuration file, according to described Preset sensitive field list and sensitive field allocation list generate the note data of test in configuration file;By the test Note data is applied in SDK, obtains the test result data generated based on SDK logic;According to the sensitive field allocation list The expected result data for obtaining the note data are determined by the test result data compared with the expected result data The accuracy of SDK logic.By providing a kind of SDK logic test method efficiently, comprehensive, expansion is strong, by configuration text Preset sensitivity field list and sensitive field allocation list, then read the sensitive field list in configuration file in part, determine configuration text The sensitive field of current record in part, then the sensitive field allocation list in configuration file is read, determine the short message number for needing to generate According to comprising sensitive field quantity and note data total quantity, to generate the note data of test, then by the survey Note data on probation is applied in SDK, the field in note data by extracting the test in the preset time period, then Match with the sensitive field in sensitive field list, filtering includes the short message item number of sensitive words section from note data, thus really Quantity comprising sensitive field in the fixed note data, obtains the test result data generated based on SDK logic, according to described Sensitive field allocation list obtains the expected result data of the note data, by the test result data and the expected result Data compare, and determine that the accuracy of SDK logic, the accuracy of the SDK logic of test just can react whether SDK can reach set Standard, to efficiently test SDK logic, and pass through the specific sensitive field list of the division of labor and sensitive field configuration Table, can comprehensively, SDK logic can be tested with expanding.
The implementation of above-mentioned SDK logic test method may be implemented in computer readable storage medium provided in an embodiment of the present invention Example, concrete function realize the explanation referred in embodiment of the method, and details are not described herein.
In addition, the present invention also provides a kind of servers in another embodiment, as shown in figure 4, the server includes The devices such as processor 403, memory 405, input unit 407 and display unit 409.It will be understood by those skilled in the art that Structure devices shown in Fig. 4 do not constitute the restriction to Servers-all, may include components more more or fewer than diagram, or Person combines certain components.The memory 405 can be used for storing computer program 401 and each functional module, the processor 403 operations are stored in the computer program 401 of memory 405, thereby executing the various function application and data processing of equipment. The memory 405 can be built-in storage or external memory, or including both built-in storage and external memory.Built-in storage It may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory or random access memory.External memory may include hard disk, floppy disk, ZIP disk, USB flash disk, tape Deng.Memory disclosed in this invention includes but is not limited to the memory of these types.Memory 405 disclosed in this invention As an example rather than as restriction.
Input unit 407 is used to receive the input of signal and receives the input of user, and input unit 407 may include touch surface Plate and other input equipments, touch panel collect user on it or nearby touch operation (such as user using finger, The operation of any suitable object or attachment such as stylus on touch panel or near touch panel), and according to presetting The corresponding attachment device of driven by program;Other input equipments can include but is not limited to physical keyboard, function key (for example plays Control button, switch key etc.), trace ball, mouse, one of operating stick etc. or a variety of.Display unit 409 can be used for showing The information of user's input is supplied to the information of user and the various menus of computer equipment.Liquid can be used in display unit 409 The forms such as crystal display, Organic Light Emitting Diode.Processor 403 is the control centre of computer equipment, using various interfaces and The various pieces of the entire computer of connection, by running or executing the software program being stored in memory 403 and/or mould Block, and the data being stored in memory are called, perform various functions and handle data.
In one embodiment, the server includes one or more processors 403, and one or more storages Device 405, one or more computer programs 401, wherein one or more of computer programs 401 are stored in memory It in 405 and is configured as being executed by one or more of processors 403, one or more of computer programs 401 configure For executing SDK logic test method described in above embodiments.One or more processors 403 shown in Fig. 4 can be held Row realizes data generation module 10, logic testing module 20, the function of logic verify module 30 shown in Fig. 3.
A kind of server provided in an embodiment of the present invention is, it can be achieved that read configuration file, according to pre- in the configuration file The sensitive field list and sensitive field allocation list set generate the note data of test;By the note data application of the test In SDK, the test result data generated based on SDK logic is obtained;The short message is obtained according to the sensitive field allocation list The expected result data of data determine the correct of SDK logic by the test result data compared with the expected result data Rate.By providing a kind of SDK logic test method efficiently, comprehensive, expansion is strong, pass through sensitive words preset in configuration file Segment table and sensitive field allocation list, then read the sensitive field list in configuration file, determine current record in configuration file Sensitive field, then the sensitive field allocation list in configuration file is read, determine the sensitive words for needing the note data generated to include The quantity of section and the total quantity of note data, to generate the note data of test, then by the note data of the test Applied in SDK, the field in note data by extracting the test in the preset time period, then in sensitive field list Sensitive field match, from note data filtering include sensitive words section short message item number, so that it is determined that the note data In the quantity comprising sensitive field, the test result data generated based on SDK logic is obtained, according to the sensitivity field allocation list The expected result data for obtaining the note data are determined by the test result data compared with the expected result data The accuracy of SDK logic, the accuracy of the SDK logic of test just can react whether SDK can reach set standard, thus high SDK logic is tested on effect ground, and by the specific sensitive field list of the division of labor and sensitive field allocation list, can comprehensively, SDK logic can be tested with expanding.
The embodiment of the SDK logic test method of above-mentioned offer may be implemented in terminal device provided in an embodiment of the present invention, Concrete function realizes the explanation referred in embodiment of the method, and details are not described herein.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of SDK logic test method characterized by comprising
Configuration file is read, test is generated according to sensitive field list preset in the configuration file and sensitive field allocation list and is used Note data;The configuration file configures the quantity and note data for the sensitive field that the note data of generation in need includes Total quantity;The configuration file is configured with primary data and expected result data;
The note data of the test is applied in SDK, the test result data generated based on SDK logic is obtained;
The expected result data that the note data is obtained according to the sensitive field allocation list, by the test result data with The expected result data compare, and determine the accuracy of SDK logic.
2. the method according to claim 1, wherein the reading configuration file, according in the configuration file Preset sensitive field list and sensitive field allocation list generate the note data of test, comprising:
The configuration file is read, packet is generated according to sensitive field list preset in the configuration file and sensitive field allocation list The note data of test containing different accounts.
3. according to the method described in claim 2, it is characterized in that, the note data by the test is applied to SDK In, obtain the test result data generated based on SDK logic, comprising:
The corresponding note data of each account is applied in SDK by the note data for obtaining the corresponding test of each account, obtains base In the test result data for each account that SDK logic generates.
4. according to the method described in claim 2, it is characterized in that, the note data by the test is applied to SDK In, obtain the test result data generated based on SDK logic, comprising:
The corresponding note data collection of each account is combined into the short of unified account by the note data for obtaining the corresponding test of each account The note data of the unified account is applied in SDK, obtains the survey of the unified account generated based on SDK logic by letter data Test result data.
5. the method according to claim 1, wherein before the reading configuration file, further includes:
Remote server is received to the more new command of configuration file, is updated according to the more new command preset quick in configuration file Feel the quantity and condition of the sensitive field of field configuration table, and/or according to quick in the sensitive field list of more new command update Feel field.
6. the method according to claim 1, wherein after the accuracy of the determining SDK logic, further includes:
Judge whether the accuracy meets polarity condition, if satisfied, according to sensitive field list preset in configuration file and quick Sense field configuration table regenerates secondary note data, and the secondary accuracy of SDK logic is tested according to the secondary note data, Wrong link is determined according to the secondary accuracy.
7. a kind of SDK logic testing device characterized by comprising
Data generation module: for reading configuration file, according to sensitive field list and sensitive words preset in the configuration file Section allocation list generates the note data of test;
Logic testing module: for the note data of the test to be applied in SDK, what acquisition was generated based on SDK logic Test result data;
Logic verify module:, will for obtaining the expected result data of the note data according to the sensitive field allocation list The test result data determines the accuracy of SDK logic compared with the expected result data.
8. device according to claim 7, which is characterized in that the data generation module further includes executing:
The configuration file is read, packet is generated according to sensitive field list preset in the configuration file and sensitive field allocation list The note data of test containing different accounts.
9. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, the computer program realize SDK logic test method as claimed in any one of claims 1 to 6 when being executed by processor.
10. a kind of server characterized by comprising
One or more processors;
Memory;
One or more computer programs, wherein one or more of computer programs are stored in the memory and quilt It is configured to be executed by one or more of processors, one or more of computer programs are configured to carry out according to right It is required that 1 to 6 described in any item SDK logic test methods.
CN201910527939.6A 2019-06-18 2019-06-18 SDK logic test method, device, storage medium and server Pending CN110389897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910527939.6A CN110389897A (en) 2019-06-18 2019-06-18 SDK logic test method, device, storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910527939.6A CN110389897A (en) 2019-06-18 2019-06-18 SDK logic test method, device, storage medium and server

Publications (1)

Publication Number Publication Date
CN110389897A true CN110389897A (en) 2019-10-29

Family

ID=68285744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910527939.6A Pending CN110389897A (en) 2019-06-18 2019-06-18 SDK logic test method, device, storage medium and server

Country Status (1)

Country Link
CN (1) CN110389897A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955449A (en) * 2019-11-18 2020-04-03 北京奇艺世纪科技有限公司 Method and device for releasing gray scale of client
CN113127363A (en) * 2021-04-23 2021-07-16 中国工商银行股份有限公司 Parameter adjusting method, parameter adjusting device, electronic device and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955449A (en) * 2019-11-18 2020-04-03 北京奇艺世纪科技有限公司 Method and device for releasing gray scale of client
CN110955449B (en) * 2019-11-18 2024-04-12 北京奇艺世纪科技有限公司 Gray scale release method and device for client
CN113127363A (en) * 2021-04-23 2021-07-16 中国工商银行股份有限公司 Parameter adjusting method, parameter adjusting device, electronic device and readable storage medium
CN113127363B (en) * 2021-04-23 2024-02-23 中国工商银行股份有限公司 Parameter adjustment method, parameter adjustment device, electronic device, and readable storage medium

Similar Documents

Publication Publication Date Title
CN109034660B (en) Method and related device for determining risk control strategy based on prediction model
CN103186740B (en) A kind of automated detection method of Android malware
CN102096632B (en) Bridging code changes and testing
Chen et al. Dataether: Data exploration framework for ethereum
CN110619210A (en) Simulator detection method and system
CN109871312B (en) Interface testing method, device, equipment and readable storage medium
CN105069354A (en) Attack tree model based Android software hybrid detection method
CN105653946A (en) Android malicious behavior detection system based on combined event behavior triggering and detection method of Android malicious behavior detection system
CN106487603A (en) A kind of response test method and device
CN114139209A (en) Information anti-theft method and system applied to big data of business user
CN111260336B (en) Service checking method, device and equipment based on rule engine
CN114116496A (en) Automatic testing method, device, equipment and medium
CN112650688A (en) Automated regression testing method, associated device and computer program product
CN110389897A (en) SDK logic test method, device, storage medium and server
CN113448834A (en) Buried point testing method and device, electronic equipment and storage medium
CN110287700B (en) iOS application security analysis method and device
US10719482B2 (en) Data comparison
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN112328802A (en) Data processing method and device and server
Singh et al. Demand based test case generation for object oriented system
CN107402883B (en) A kind of data test treating method and apparatus
CN110263618A (en) The alternative manner and device of one seed nucleus body model
CN113656314A (en) Pressure test processing method and device
CN116932360A (en) Page testing method and device, computer equipment and storage medium
CN113935847A (en) Online process risk processing method, device, server and 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