CN105740137B - Divide bucket test method and the method, apparatus and system of configuration information are provided - Google Patents
Divide bucket test method and the method, apparatus and system of configuration information are provided Download PDFInfo
- Publication number
- CN105740137B CN105740137B CN201410746167.2A CN201410746167A CN105740137B CN 105740137 B CN105740137 B CN 105740137B CN 201410746167 A CN201410746167 A CN 201410746167A CN 105740137 B CN105740137 B CN 105740137B
- Authority
- CN
- China
- Prior art keywords
- bucket
- client application
- information
- test
- version
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 155
- 238000010998 test method Methods 0.000 title claims abstract description 45
- 238000012360 testing method Methods 0.000 claims abstract description 408
- 230000006870 function Effects 0.000 claims description 54
- 238000003860 storage Methods 0.000 claims description 24
- 230000005540 biological transmission Effects 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 14
- 238000011161 development Methods 0.000 claims description 13
- 239000000284 extract Substances 0.000 claims description 9
- 108010001267 Protein Subunits Proteins 0.000 claims description 4
- 238000000151 deposition Methods 0.000 claims description 3
- 238000002955 isolation Methods 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 8
- 238000009434 installation Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000011514 reflex Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 238000009413 insulation Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Dividing bucket test method and device for client application this application discloses a kind of, it is a kind of to divide the method and apparatus of bucket test configurations information and one kind dividing bucket test system for providing.Wherein include for the bucket test method of dividing of client application:Obtain server-side offer divides bucket test configurations information corresponding to client application version;The functional category for dividing bucket to test being related to according to client application code obtains corresponding feature release mark from dividing in bucket test configurations information;Corresponding code snippet is executed according to feature release mark.Using technical solution provided by the present application, the version isolation requirement for dividing bucket to test based on C/S frameworks can not only be met, and bucket test is divided to carry out flexible management and control different editions client application convenient for server-side, especially after dividing bucket to test, the adjustment to configuration information can be passed through, control client application automatically switches to official release, improves the usage experience of user.
Description
Technical field
This application involves divide bucket testing field, and in particular to a kind of to divide bucket test method for client application.
The application provides a kind of dividing bucket test device, a kind of divide bucket test configurations to believe for providing for client application simultaneously
The method and apparatus and one kind of breath divide bucket to test system.
Background technology
A/B tests (A/B Test), typically refers to, to the part on some specific page or the page, make two
The flowing of access of website, is then distributed on different versions by a or more than two versions, then observe the website page or
The variation for the conversion ratio or some important indicators that person brings the part, to obtain one of version than another version
This better conclusion, and the version finally reached the standard grade is determined with this.
It is then the extension of A/B Test concepts, typically pointer to divide bucket test (Bucket Test, also referred to as Split Test)
To some functional category (also referred to as function point or function key) to be tested of some application version, such as:Web displaying is pressed
Button color is performed simultaneously multiple A/B Test, i.e.,:Not instead of only there are one version B to be tested, more of B1, B2...... to wait for
Beta version (also commonly referred to as feature release corresponding with functional category) once divides bucket test can be in multiple work(by doing
An optimal version can be selected in version.
Above-mentioned A/B tests divide bucket measuring technology, are initially all designed for website, due to website generally use B/
S frameworks (browser/server framework), as long as server-side is upgraded, own with the insensitive characteristic of real-time release version
The function that client accesses all is newest.However for being based on the wireless client of C/S frameworks (user terminal/server framework)
For application program (abbreviation APP), since client user can decide whether to upgrade according to the wish of oneself or download most
The client application of new version, the situation for resulting in multiple APP application versions and depositing, this requires wireless client APP
Divide bucket test to need to have the characteristic of version isolation, ensure to divide bucket test not interfere with each other between each application version,
Therefore traditional that bucket test mode is divided to be not appropriate for for wireless client APP.
The prior art divides bucket to test generally use Beta published methods for above-mentioned wireless client APP's, i.e.,:For point
The specific function point of bucket test, provides the installation kit (installation kit of unofficial released version) of different function version, and screen work
It jumps and is ready that the user having a taste of what is just in season installs above-mentioned installation kit on its client device, small range survey is carried out to each feature release
It tries, and assesses the quality of multiple feature releases according to test result, determine the feature release for publication of finally reaching the standard grade.
The Beta published methods of packet are fixedly mounted using the above-mentioned installation in limited customer group, server-side can not be to dividing
Bucket test process carries out necessary control and management, and after dividing bucket to test, and the user for participating in that bucket is divided to test can only lead to
The mode re-downloaded is crossed, the client application of formal released version could be used, influences the usage experience of user.
Invention content
It is provided by the present application for client application divide bucket test method and for provide divide bucket test configurations believe
The method of breath cooperates, and divides bucket to test for client application, it is proposed that a kind of new technical solution is meeting version
While this insulation request, bucket test process is divided to be controlled and managed client application convenient for server-side.This Shen
In addition corresponding dividing bucket test device and divide bucket test configurations information for providing for client application is please provided
Device and one kind divide bucket to test system.
The application provide it is a kind of dividing bucket test method for client application, including:
Obtain server-side offer divides bucket test configurations information corresponding to the client application version;
The functional category for dividing bucket to test being related to according to the client application code, from described point of bucket test configurations
Corresponding feature release mark is obtained in information;
Corresponding code snippet is executed according to feature release mark.
Optionally, include corresponding to the bucket test configurations information of dividing of the client application version:Corresponding to described
Client application version divides the functional category of bucket test and the feature release mark corresponding to the functional category.
Optionally, what the acquisition server-side provided divides bucket test configurations corresponding to the client application version
Information, including:
Obtain the version information of the client application;
Judge that local whether do not store divides bucket test configurations information corresponding to the client application version, or
Person stores and described divide bucket test configurations information but identified without " final version has determined that ";
If so, from bucket test configurations information is divided described in server-side acquisition.
Optionally, it is described from the server-side obtain described in divide the bucket test configurations information to include:
It is sent to the server-side and obtains the request for dividing bucket test configurations information, the client is carried in the request and is answered
Version information with program and the mark for its host equipment of unique identification, alternatively, the version of the client application
Information, system type and the mark for its host equipment of unique identification;
Receive the server-side return divides bucket test configurations information corresponding to the client application version;
Divide bucket test configurations information storage in local by described.
It is optionally, described that execute corresponding code snippet according to feature release mark refer to being held by branch statement
Row code line corresponding with the feature release.
Optionally, after bucket test configurations information is divided described in acquisition, operations described below is executed:
It sends a notification message to the client application;
Correspondingly, the client application the correspondence notification message readjustment processing function in, described in execution
The functional category for dividing bucket to test being related to according to the client application code, is obtained from described point of bucket test configurations information
It takes corresponding feature release to identify, and the step of executing corresponding code snippet is identified according to the feature release.
Optionally, described to be answered according to the client when implementing this method using the development language for having reflection characteristic
The functional category for dividing bucket to test being related to program code, corresponding feature release is obtained from described point of bucket test configurations information
Mark, including:
Traverse the registered each class of the client application, in each class each instance method and member
Method executes operations described below:
Judge whether the title of the method meets preset point of bucket test method naming rule, described point of bucket test
Method naming rule is defined as follows Naming conventions:At least should include the work(for dividing bucket to test with dividing bucket to test in relevant method name
The corresponding feature release mark of the realization logic of energy classification and the method;
If so, executing operations described below:
According to described point of bucket test method naming rule, the functional category for dividing bucket to test is extracted from the method title;
According to the functional category, corresponding feature release mark is obtained from described point of bucket test configurations information;
Judge the client application it is preset, call the method used by feature release mark, with
The feature release obtained from described point of bucket test configurations information identifies whether unanimously;
If it is not, carrying out the dynamic replacement of method realization using the reflection characteristic of the development language, the client is made to answer
Method corresponding with the feature release mark in described point of bucket test configurations information is executed with program in the stage of execution to realize.
Optionally, described according to the feature release when implementing this method using the development language for having reflection characteristic
Mark executes corresponding code snippet, corresponding with the feature release by the reflection characteristic dynamic call of the language
Member method.
Correspondingly, the application also provide it is a kind of dividing bucket test device for client application, including:
Configuration information acquiring unit, point for corresponding to the client application version for obtaining server-side offer
Bucket test configurations information;
Feature release acquiring unit, the function class for dividing bucket to test for being related to according to the client application code
Not, corresponding feature release mark is obtained from described point of bucket test configurations information;
Code snippet execution unit, for executing corresponding code snippet according to feature release mark.
Optionally, the configuration information of the configuration information acquiring unit acquisition includes:Corresponding to the client application journey
Sequence version divides the functional category of bucket test and the feature release mark corresponding to the functional category.
Optionally, the configuration information acquiring unit includes:
Version information obtains subelement, the version information for obtaining the client application;
Judgment sub-unit is locally stored, for local whether do not store corresponding to the client application version to be judged
Divide bucket test configurations information, described divide bucket test configurations information alternatively, storing but do not have " final version has determined that "
Mark;
Server-side acquisition of information subelement, for when the output that judgment sub-unit is locally stored be "Yes" when, from institute
It states and divides bucket test configurations information described in server-side acquisition.
Optionally, the server-side acquisition of information subelement includes:
Transmission sub-unit is asked, the request for dividing bucket test configurations information is obtained for being sent to the server-side, it is described to ask
The middle version information for carrying the client application and the mark for its host equipment of unique identification are asked, alternatively, described
Version information, system type and the mark for its host equipment of unique identification of client application;
Information receiving subelement, the client application version that corresponds to for receiving that the server-side returns
Divide bucket test configurations information;
Information storage subelement, for dividing bucket test configurations information storage in local by described.
Optionally, the code snippet execution unit is specifically used for, and is executed and the feature release pair by branch statement
The code line answered.
Optionally, described device includes:
Notification message transmission unit, after dividing bucket test configurations information described in acquisition, to the client application journey
Sequence sends a notification message;
Notification message processing unit is triggered for working as the client application after receiving the notification message
The feature release acquiring unit and the work of code snippet execution unit.
Optionally, the feature release acquiring unit includes:
Traversal control subelement, for traversing the registered each class of the client application, and is directed to each class
In each instance method and member method, trigger the work of following subelement;
Judgment sub-unit is named, for judging whether the title of the method meets preset point of bucket test method life
Name rule;
Functional category extracts subelement, is used for when the output of the name judgment sub-unit is "Yes", according to described point
Bucket test method naming rule, extracts the functional category for dividing bucket to test from the method title;
Feature release extracts subelement, for according to the functional category, being obtained from described point of bucket test configurations information
Corresponding feature release mark;
Feature release judge replace subelement, for judge the client application it is preset, call described in
Feature release mark used by method identifies whether one with the feature release obtained from described point of bucket test configurations information
It causes;If it is not, carrying out the dynamic replacement of method realization using the reflection characteristic of the development language, make the client application
Method corresponding with the feature release mark in described point of bucket test configurations information is executed in the stage of execution to realize.
Optionally, the code snippet execution unit is specifically used for, by the reflection characteristic dynamic call of the language with
The corresponding member method of the feature release.
In addition, the application also provides a kind of for providing the method for dividing bucket test configurations information, the method is in responsible pipe
The server-side that reason divides bucket to test is implemented, including:
The request that the acquisition that client application is sent divides bucket test configurations information is received, is included at least in the request
The version information of the client application and mark for its host equipment of unique identification;
According to the above- mentioned information for including in the request, obtains and divide bucket to survey corresponding to the client application version
The functional category of examination and corresponding to the functional category feature release identify;
The functional category and feature release mark are returned into the client application.
Optionally, the acquisition of certain client application transmission is initially received when dividing the request of bucket test configurations information, institute
It states according to the above- mentioned information for including in the request, obtains the work(for dividing bucket to test corresponding to the client application version
Can classification and corresponding to the functional category feature release identify, including:
According to preset point of bucket test order, selection divides bucket to test corresponding to the client application version
Functional category and corresponding to the functional category feature release identify so that participate in each feature release divide bucket test
The quantity of client application divides what is set in bucket test order bucket is divided to test ratio described in meeting;
Store the version information for the client application for including in the request, for its host equipment of unique identification
Correspondence between mark and the functional category, feature release mark.
Optionally, described according to the above- mentioned information for including in the request, it obtains and corresponds to the client application
Version divide bucket test functional category and corresponding to the functional category feature release mark refer to, stored
In above-mentioned correspondence, according to the mark for unique identification host equipment for including in the request, search described in corresponding to
Client application version divides the functional category of bucket test and the feature release mark corresponding to the functional category.
Optionally, before the functional category and feature release mark are returned to the client application,
Execute operations described below:
Judge to divide bucket to test whether to have terminated corresponding to the client application version;
If so, the feature release mark used by final released version, which is replaced, will return to the client application journey
The corresponding function version identifier of sequence, and add " final version has determined that " mark;
Correspondingly, described return to the functional category and feature release mark the client application and be
Refer to, " final version has determined that " mark of information and addition after above-mentioned execution replacement operation is sent to the client together
Hold application program.
Correspondingly, the application also provides a kind of for providing the device for dividing bucket test configurations information, described device is responsible
Management, which divides in the server device that bucket is tested, to be disposed, including:
Request reception unit, the acquisition for receiving client application transmission divide the request of bucket test configurations information,
Mark in the request including at least the version information of the client application and for its host equipment of unique identification;
Information acquisition unit, for according to the above- mentioned information for including in the request, acquisition to be answered corresponding to the client
Divide the functional category of bucket test and corresponding to the feature release mark of the functional category with program version;
Information returning unit, for returning to the client and answering the functional category and feature release mark
Use program.
Optionally, what is received when the request reception unit is that the acquisition that certain client application is sent for the first time divides bucket
When the request of test configurations information, described information acquiring unit includes:
Configuration information selects subelement, for according to preset point of bucket test order, selection to correspond to the client
End application version divides the functional category of bucket test and the feature release mark corresponding to the functional category so that
It participates in dividing what is set in bucket test order to divide bucket described in the quantity satisfaction for the client application that each feature release divides bucket to test
Test ratio;
Configuration information storing sub-units, for store the client application for including in the request version information,
For the correspondence between the mark and the functional category, feature release mark of its host equipment of unique identification.
Optionally, described information acquiring unit is specifically used for, and corresponding in configuration information storing sub-units storage is closed
In system, according to the mark for unique identification host equipment for including in the request, searches and correspond to the client application
Program version divides the functional category of bucket test and the feature release mark corresponding to the functional category.
Optionally, described device includes:
Test terminates judging unit, corresponds to the client for before triggering described information returning unit, judging
Application version divides bucket to test whether to have terminated;
Information replacement unit, when the output for terminating judging unit when the test is "Yes", with final released version
Used feature release mark replaces the corresponding function version identifier that will return to the client application, and adds
" final version has determined that " identifies;
Correspondingly, described information returning unit is specifically used for, by after above-mentioned execution replacement operation information and addition
" final version has determined that " mark is sent to the client application together.
Bucket is divided to test system in addition, the application also provides one kind, including:It is used to provide according to above-mentioned any one
Divide the device of bucket test configurations information;Divide bucket test dress for client application with according to above-mentioned any one
It sets.
Compared with prior art, the application has the following advantages:
Technical solution provided by the present application divides bucket test to propose a kind of new thinking for client application:
Point server-side of bucket test is responsible for according to the request for the client application for participating in that bucket is divided to test, provides and applies version with it
This corresponding point of bucket test configurations information, the function class for dividing bucket to test that the client application is then related to according to code
Not, corresponding feature release mark is obtained from described point of bucket test configurations information and is identified according to the feature release executes
Corresponding code snippet.Using above-mentioned technical proposal, it can not only meet the version isolation for dividing bucket to test based on C/S frameworks and want
It asks, and divides bucket test to carry out neatly management and control different editions client application convenient for server-side, especially
It is that can be controlled client application by the adjustment to dividing bucket test configurations information and cut automatically after dividing bucket to test
Change to the application version formally issued (i.e.:Execute the finally determining corresponding code snippet of feature release), to which user is not necessarily to
Formal released version is downloaded again, is effectively improved the usage experience of user.
Description of the drawings
Fig. 1 is a kind of flow chart of embodiment for dividing bucket test method for client application of the application;
Fig. 2 is the process chart for dividing bucket test configurations information that acquisition server-side provided by the embodiments of the present application provides;
Fig. 3 is the process chart provided by the embodiments of the present application for being obtained to server-side and dividing bucket test configurations information;
Fig. 4 is the data structure schematic diagram of provided by the embodiments of the present application point of bucket test configurations information;
Fig. 5 is a kind of schematic diagram of embodiment for dividing bucket test device for client application of the application;
Fig. 6 is a kind of flow of another embodiment for dividing bucket test method for client application of the application
Figure;
Fig. 7 is the processing stream provided by the embodiments of the present application that dynamic replacement is carried out for each instance method or member method
Cheng Tu;
Fig. 8 is a kind of signal of another embodiment for dividing bucket test device for client application of the application
Figure;
Fig. 9 is a kind of flow chart for providing the embodiment of the method for dividing bucket test configurations information of the application;
Figure 10 is a kind of schematic diagram for providing the device embodiment for dividing bucket test configurations information of the application;
Figure 11 is the schematic diagram of a kind of point of bucket test system of the application.
Specific implementation mode
Many details are elaborated in the following description in order to fully understand the application.But the application can be with
Much implement different from other manner described here, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
In this application, it each provides and a kind of dividing bucket test method and device, one kind for client application
For provide divide the method and apparatus of bucket test configurations information and one kind divide bucket test system, in subsequent embodiment by
One is described in detail.
The application divides bucket test to propose a kind of new solution for wireless aps P's, and core is:Server-side to
Client application provides corresponding with its application version point of bucket test configurations information, and client application is then from described point
Feature release mark corresponding with bucket test function classification is divided is obtained in bucket test configurations information, and is executed and the feature release
Identify corresponding code snippet.Using the technical solution, it can not only meet wireless aps P and bucket test is divided to want version isolation
It asks, and convenient for server-side to dividing bucket test process to be controlled and managed.
Although the application is to divide bucket test to propose for wireless aps P, but application scenarios of technical scheme
Be not limited to wireless aps P divides bucket to test, as long as the client application based on user terminal/server framework (C/S frameworks)
Program divides bucket to test, and can just use technical solution provided by the present application.
Client application can be that code line can also be according to the code snippet for dividing bucket test configurations information to execute
Packaged method (method), will describe the specific embodiment party of both of these case respectively by different embodiments herein
Formula.The technical solution of the application is described in detail below.
Referring to FIG. 1, it is a kind of embodiment for dividing bucket test method for client application of the application
Flow chart, in the present embodiment, that client application is realized by the way of based on code line divides bucket to test.The method
Include the following steps:
Step 101:Obtain server-side offer divides bucket test configurations to believe corresponding to the client application version
Breath.
For the system based on C/S frameworks, usually there is multiple client application version and (also referred to as apply version
Originally the case where) and depositing, and in dividing bucket test process, different application versions may include different functional category to be tested
(i.e.:Function point or function key), each functional category corresponds to different feature releases again, by these different function versions
The comparison of this test result, may finally select the optimal feature release for each functional category, so that it is determined that most
It reaches the standard grade eventually the application version of publication.
Whether participation divides the test which functional category bucket tested and participated in, for client application usually
It is to determine, technical solution provided by the present application, divides bucket test configurations information by what server-side provided, determine client application
Program executes the concrete function version in functional category to be tested, and executes corresponding code snippet.
In order to realize that above-mentioned function, client application are obtained in initial phase (before running its service code) needs
Take server-side offer divides bucket test configurations to believe corresponding to client application version (hereinafter referred to as current application version)
Breath, described point of bucket test configurations information include:Corresponding to current application version divide bucket test functional category and correspond to
The feature release mark (feature release that instruction client application should execute) of the functional category.Obtain the information
Process includes step 101-1 to step 101-4 as described below, 2 is described further below in conjunction with the accompanying drawings.
Step 101-1:Obtain the version information of the client application;
Each client application has the version information of oneself, is exactly the current application version described in the present embodiment.
The client application in different system platform is run on, the mode for obtaining the information is different, can usually be carried using system
The api function of confession is realized, for example, for ios operating systems, can pass through the bundle in info.plist files
Version or other modes obtain the relevant information of current application version.
Step 101-2:Judge that local whether do not store divides bucket test configurations information corresponding to current application version, if
It is to go to step 101-4 to execute, if it is not, executing step 101-3.
This step first determines whether that local whether store divides bucket test configurations information corresponding to current application version.Having
When body is implemented, if described point of bucket test configurations information storage in local data file, can pass through reading local data
Whether the mode of file, judgement wherein store corresponding with current application version point of bucket test configurations information, i.e.,:Whether store
The function type of corresponding with current application version point of bucket test, and feature release mark corresponding to each function type
Know;Above- mentioned information is not stored if local, is needed to go to step 101-4 and is obtained newest point of bucket test configurations letter from server-side
Breath, it is no to then follow the steps 101-3.
Step 101-3:Judge whether described point of bucket test configurations information being locally stored has " final version has determined that "
Mark, if it is not, executing step 101-4.
This step on the basis of described point of bucket test configurations information has been locally stored continues that bucket test is divided to match described in judgement
Whether confidence breath has " final version has determined that " mark, if so, explanation has divided bucket test for current application version
Terminate, what is be currently locally stored divides bucket test configurations information to be exactly configuration information corresponding with final released version of reaching the standard grade, therefore
Client application directly can divide bucket test configurations information using what is be locally stored corresponding to current application version;It is no
Then, illustrate that a point bucket test not yet terminates, it is still desirable to execute step 101-3 and obtain newest point of bucket test configurations letter from server-side
Breath.
Using aforesaid way, before dividing bucket test to terminate, each client application is all obtained to server-side when initializing
Newest point of bucket test configurations information is taken, to provide condition with management to dividing bucket test process to carry out control for server-side,
(bucket test configurations information is divided to have determined) after dividing bucket to test, client application can be directly from local acquisition
Divide bucket test configurations information, without being obtained to server-side every time, so as to saving network flow.
Step 101-4:From the server-side obtain described in divide bucket test configurations information.
The step include send request to server-side, receive that server-side returns divide bucket test configurations information and by the letter
Breath is stored in local such three sub-steps, and 3 pairs of processes are described further below in conjunction with the accompanying drawings.
Step 101-4-1:It is sent to the server-side and obtains the request for dividing bucket test configurations information.
Current application version and the mark for unique identification host equipment, the host equipment mark are carried in the request
Know the device numbering for typically referring to host equipment, such as:The international mobile equipment identity number etc. of smart mobile phone, server-side can be according to the information only
The one identification host equipment, and provided and corresponding point of bucket test configurations information of the current application version for it.
In specific implementation, if server-side also needs to determine that a point bucket test is matched with reference to the system type of client device
Confidence ceases, then the system type of the client application can also be carried in the request, such as:Ios or
android。
In a specific example of the present embodiment, the URL of similar following forms is assembled according to above- mentioned information:
http://server/abtest.htmlSystem type=ios& device numberings=xxx&app versions=xxx, then passes through
Http protocol sends the request to server-side.
Step 101-4-2:Receive the server-side return divides bucket test configurations information corresponding to current application version.
After server-side receives the above-mentioned request that client application is sent, according to the host equipment mark carried in request
Know, divides bucket test configurations information corresponding to the current application version for its selection, and return to the information.So client is just
Bucket test configurations information, the form of the information is divided to be similar to as follows described in receiving:{‘key1’:‘1’,‘key2’:
' 1 ' }, i.e.,:The client application is directed to functional category key1, it should execute code line corresponding with feature release 1;Needle
To functional category key2, it should execute code line corresponding with feature release 2.After dividing bucket to test, the server-side is returned
Dividing in bucket test configurations information for returning is also possible to carry " final version has determined that " mark.
Step 101-4-3:Divide bucket test configurations information storage in local by described.
Divide bucket test configurations information storage in local by what is received, runs the client application next time in this way
When, so that it may to divide bucket test configurations information from local reading, and execute judgement described above and processing procedure.
Be stored in it is local divide bucket test configurations information, can only include that corresponding with current application version point of bucket test be matched
Confidence ceases, i.e.,:Only include similar above-mentioned { ' key1 ':‘1’,‘key2’:' 1 ' } information as.In view of user may be to visitor
Family end application program executes primary or multiple updating operation, therefore what is be locally stored divides bucket test configurations information, can include
Divide bucket test configurations information for multiple application versions, refer to attached drawing 4, is a point data structure for bucket test configurations information
Schematic diagram.In this case, this step only need according to dividing of receiving, bucket test configurations information update was locally stored with
The corresponding information of current application version.
So far, just obtain server-side offer divides bucket test configurations information corresponding to current application version.Specific
In implementation, according to the needs of client application, can also flag bit be actively set, indicate to be locally stored divides bucket test to match
It is newest to set data, and relevant operation or processing are executed according to the flag bit convenient for client application.
Step 102:The functional category for dividing bucket to test being related to according to the client application code, from described point of bucket
Corresponding feature release mark is obtained in test configurations information.
The client application for dividing bucket to test is participated in, some in point bucket test can be usually related in its service code
Or the specific code of certain functional categories is realized, it can be there are many realization method, i.e., due to being directed to some functional category:It is corresponding
Different feature release, therefore before executing specific code, first obtain from described point of bucket test configurations information and work(
It can the corresponding feature release mark of classification.
It is illustrated below with a simple case, in some point of bucket is tested, the background colour for button is needed to carry out
Test, corresponding functional category are " btnColorTest ", correspond to the functional category there are two feature release, feature release 1 will
Button background colour is set as red, and feature release 2 sets button background to blue.So just need from described in this step
Divide in bucket test configurations information and obtain feature release mark corresponding with " btnColorTest ", thus could be in subsequent step
Corresponding branch statement is executed in 103.
Specifically, the function of searching and be located under current application version in bucket test configurations information is divided described in being locally stored
Classification " btnColorTest " then further reads feature release mark corresponding with " btnColorTest ".Specific
When realization, above-mentioned function package can also be realized in a function, calls the function using functional category as input, obtain
The feature release mark corresponding with the functional category under current application version, such as:
Int version=getVersionByKey (" btnColorTest ");
As a kind of perfect technical solution, it is also necessary to consider the situation that the feature release obtained mark may be invalid, example
Such as:Server-side return feature release mark be not Effective Numerical (such as:Be letter and it is nonnumeric) or server-side return
It situations such as being error response, then in order to ensure the normal operation of client application, at this moment may be used preset
Default value, such as " 1 " are identified as feature release.
Step 103:It is identified according to the feature release, corresponding code snippet is executed by branch statement.
After obtaining feature release mark corresponding with functional category, so that it may to execute corresponding code piece by branch statement
Duan Liao, for example, above-mentioned simple case may be used branch statement as follows:
If (version==1)
// button background colour is set as red
}else{
// by button background colour be set as blue
}
In this way, above-mentioned service code will be identified according to the feature release obtained, corresponding code line is executed.Certainly,
Simple case given here is only schematical, in specific client application code, can hold according to demand
The increasingly complex code line of row.
Described above is the process flows for dividing bucket test method based on code line.In specific implementation, the work(of step 101
It can be realized by an independent information collocation module, step 102 and step 103 are then in client application
It is realized in service code.Work in series side may be used in the service code of described information configuration module and client application
Formula, i.e., when each client application starts, described information configuration module can first start, and acquisition divides bucket test configurations to believe
Breath, the service code of subsequent client application bring into operation again, and when needing to obtain feature release mark, call institute
Interface function as the similar getVersionByKey () of information collocation module offer is stated to realize.
In view of before dividing bucket test to terminate, when client application starts every time, described information configuration module will
Divide bucket test configurations information from server-side acquisition, which is related to network operation and relatively takes, in order to avoid client is answered
Being fallen into a long wait with the user of program, the technical solution of the application additionally provides another message based embodiment,
I.e.:After the startup of described information configuration module, the service code of client application can also be run therewith, and be matched to information
The notification message for setting module is intercepted;After the acquisition of described information configuration module divides bucket test configurations information, to client application
Program sends a notification message;After client application listens to the message, in registered readjustment handles function, according to industry
The needs of business code, the acquisition feature release mark corresponding with functional category from described point of bucket test configurations information, and according to
The feature release mark executes corresponding code line.
In specific implement, the above-mentioned serial embodiment based on function call can be used as needed, it can also
Using above-mentioned message based parallel practice mode, these are the change of specific implementation mode, all without departing from the core of the application
The heart, all within the protection domain of the application.
In the above-described embodiment, provide it is a kind of dividing bucket test method for client application, in contrast
It answers, the application also provides a kind of dividing bucket test device for client application.Fig. 5 is please referred to, is the application's
A kind of embodiment schematic diagram for dividing bucket test device for client application.Due to the device embodiment side of being substantially similar to
Method embodiment, so describing fairly simple, the relevent part can refer to the partial explaination of embodiments of method.Dress described below
It is only schematical to set embodiment.
The a kind of of the present embodiment divides bucket test device for client application, including:Configuration information acquiring unit
501, the client application version that corresponds to for obtaining server-side offer divides bucket test configurations information;First work(
Energy version acquiring unit 502, the functional category for dividing bucket to test for being related to according to the client application code, from institute
It states and obtains corresponding feature release mark in point bucket test configurations information;First code segment execution unit 503, for by dividing
Branch sentence executes code line corresponding with the feature release.
Optionally, the configuration information of the configuration information acquiring unit acquisition includes:Corresponding to the client application journey
Sequence version divides the functional category of bucket test and the feature release mark corresponding to the functional category.
Optionally, the configuration information acquiring unit includes:
Version information obtains subelement, the version information for obtaining the client application;
Judgment sub-unit is locally stored, for local whether do not store corresponding to the client application version to be judged
Divide bucket test configurations information, described divide bucket test configurations information alternatively, storing but do not have " final version has determined that "
Mark;
Server-side acquisition of information subelement, for when the output that judgment sub-unit is locally stored be "Yes" when, from institute
It states and divides bucket test configurations information described in server-side acquisition.
Optionally, the server-side acquisition of information subelement includes:
Transmission sub-unit is asked, the request for dividing bucket test configurations information is obtained for being sent to the server-side, it is described to ask
The middle version information for carrying the client application and the mark for its host equipment of unique identification are asked, alternatively, described
Version information, system type and the mark for its host equipment of unique identification of client application;
Information receiving subelement, the client application version that corresponds to for receiving that the server-side returns
Divide bucket test configurations information;
Information storage subelement, for dividing bucket test configurations information storage in local by described.
Optionally, described device includes:
Notification message transmission unit, after dividing bucket test configurations information described in acquisition, to the client application journey
Sequence sends a notification message;
Notification message processing unit is triggered for working as the client application after receiving the notification message
The first feature release acquiring unit and the work of first code segment execution unit.
In addition, present invention also provides another embodiments for dividing bucket test method for client application.Please
It is a kind of another embodiment for dividing bucket test method for client application provided by the present application with reference to figure 6
Flow chart, in the present embodiment, the reflection characteristic of exploitation language realizes point of client application based on method rank
Bucket test.The present embodiment part identical with first embodiment step repeats no more, below emphasis difference is described.
A kind of bucket test method of dividing for client application provided by the present application includes:
Step 601:Obtain server-side offer divides bucket test configurations to believe corresponding to the client application version
Breath.
This step is identical as the step 101 of first embodiment, please refers to the related description of first embodiment.
Step 602:The reflection characteristic of exploitation language divides bucket to survey according to what the client application code was related to
The functional category of examination obtains corresponding feature release mark from described point of bucket test configurations information.
In the present embodiment, using objective-C as software development language, and the reflection characteristic of the language is utilized, from
The angle that method grade is called realizes provided by the present application divides bucket test method for client application.
In order to realize the function, it is desirable that relevant method is tested with bucket is divided in client application code, using pre-
What is first set divides bucket test method naming rule to be named, specifically:It must be according to preset format in method name
Including dividing the corresponding feature release mark of realization logic of the functional category and this method of bucket test.Furthermore it is required that business
Code is when calling with dividing bucket to test relevant method, the corresponding method of feature release that unified call pre-defines.
In a specific example of the present embodiment, preset method naming rule defines related to bucket test is divided
Method using following form name:Abtest_key_version (), wherein key are functional category, and version is the party
The corresponding feature release mark of realization logic of method.In order to make it easy to understand, still with the setting button described in the first embodiment
Background colour divide bucket to test for, be red (feature release 1) and button background colour is arranged is blue by setting button background colour
The function code of (feature release 2) is individually enclosed in two methods of naming rule name according to the method described above, and here is generation
Code example:
And it presets, when service code needs to be configured the background colour of button, unified call and function version
This 1 corresponding method, i.e.,:Call abtest_btnColorTest_1 ().
On the basis of the service code of client application follows above-mentioned naming rule, this step can be utilized and be opened
The reflection characteristic of language is sent out, the registered each class of client application is traversed, for each instance method in each class
And member method, it is extracted from its method name according to the naming rule and bucket is divided to test relevant functional category, and from described
Divide in bucket test configurations information and obtain corresponding feature release mark, and carries out necessary processing.
First ergodic process is briefly described.The reflection characteristic of exploitation language can obtain client application
In registered each class and all instance methods in each class and member method.The development language for having reflection characteristic has
A variety of, the interface of the acquisition above- mentioned information provided is typically different, such as using objective-C, can call objc_
GetClassList () obtains the list that registered class defines and can be called for the registered class of each of the list
Class_getClassMethod () obtains the methodical relevant information of institute in such.
On the basis of above-mentioned traversing operation, for each instance method or member method of acquisition, according to as follows
Step 602-1 to step 602-5 processing, 7 be described further below in conjunction with the accompanying drawings.
Step 602-1:Judge whether the title of the method meets preset method naming rule;If so, executing
Step 602-2, otherwise the method be disposed.
The method name obtained is matched with preset method naming rule, if its name meets in advance
The method naming rule of setting illustrates that this method is to test relevant method with bucket is divided, can execute 602-2 at this time, otherwise say
Bright this method is unrelated with bucket test is divided, and need not be handled.
Step 602-2:According to the method naming rule, the function class for dividing bucket to test is extracted from the method title
Not.
For example, currently processed method name be abtest_btnColorTest_1, according to it is preset shaped like
The method naming rule of abtest_key_version, so that it may be therefrom to extract a point functional category for bucket test
“btnColorTest”。
Step 602-3:According to the functional category, corresponding feature release is obtained from described point of bucket test configurations information
Mark.
The processing procedure of this step is similar with first embodiment, refers to the relevant portion of first embodiment.
Step 602-4:Judge that the client application is preset, calls function version used by the method
This mark identifies whether unanimously with the feature release obtained from described point of bucket test configurations information;If it is not, executing step 602-
5。
It is still illustrated using the example of above-mentioned setting button background colour, for currently processed method abtest_
BtnColorTest_1 (), if obtained from described point of bucket test configurations information according to " btnColorTest " of extraction
Feature release is identified as 2, i.e.,:It is 2 that server-side instruction client application should execute feature release for the functional category
Code;And it is preset in client application when needing to be configured the background colour of button, unified call and function
1 corresponding method of version, i.e.,:Call abtest_btnColorTest_1 (), the i.e. instruction of server-side and service code unified
The feature release of call method is inconsistent, at this moment executes step 602-5 and is replaced processing.If above-mentioned two feature release one
It causes, then need not execute step 602-5.
Step 602-5:The dynamic replacement of method realization is carried out using the reflection characteristic of the development language so that the visitor
Family end application program executes method reality corresponding with the feature release mark in described point of bucket test configurations information in the stage of execution
It is existing.
Specifically, the functional category being related to aiming at current method, by the preset unification of client application
The method of calling realizes that the feature release for replacing with and being indicated in point bucket test configurations data identifies corresponding method and realizes.
Continuation is illustrated with the example in step 602-4, uses method abtest_btnColorTest_2 in this step
The realization of the realization replacement method abtest_btnColorTest_1 () of (), to all calling abtest_
The service code of btnColorTest_1 (), that actually execute in the execution stage is method abtest_btnColorTest_2
The function of ().
It uses objective-C to realize above-mentioned replacement function in the present embodiment, the class_ of system offer is be provided
ReplaceMethod () function can be realized, in other embodiments, if using other language with reflection characteristic,
Other respective functions with similar functions can then be called.
Step 603:The reflection characteristic of exploitation language executes corresponding code piece according to feature release mark
Section.
Since in step 602-5, the reflection characteristic of exploitation language has been carried out necessary realization and replaces behaviour
Make, therefore this step need not carry out service code additional processing and be ensured by system in the operational process of service code
All to test relevant method with bucket is divided, execution is all and divides the feature release mark specified in bucket test configurations information consistent
Method realize.
So far, by step 601- steps 603, client application journey is used for provided by the present application from the angle of method grade
Sequence divides bucket test method to be described.In the specific implementation, the acquisition that above-mentioned steps 601 and step 602 are completed divides bucket
Test configurations information and method traversal and realization replacement function can be encapsulated in an independent module, and the module is in visitor
Family end application program starts after completing initialization operation, i.e.,:It is opened after the registration that client application has completed all classes
Dynamic, step 603 then corresponds to the execution stage of client application service code.
Described above is using have reflection characteristic development language (such as:Objective-C) implement present techniques
A kind of embodiment of scheme, in other embodiments, can also use other with reflex mechanism language (such as:
Java language) technical solution of the application is realized from the angle of method grade.Implemented using the embodiment and first of Java language
The basic handling flow of example is similar, the reflex mechanism based on Java language is only needed in step 103, according in step 102
The feature release of middle acquisition identifies, it is determined that the method name called, then passes through getMethod () and invoke () etc.
It calls and realizes in the operation phase to dividing dynamic select and the execution of bucket test method.
With it is above-mentioned it is a kind of for the embodiment for dividing bucket test method of client application it is corresponding, the application also provides
It is a kind of to divide bucket test device for client application.Fig. 8 is please referred to, is that one kind of the application being used for client application
Another embodiment schematic diagram for dividing bucket test device of program.Since device embodiment is substantially similar to embodiment of the method, institute
To describe fairly simple, the relevent part can refer to the partial explaination of embodiments of method.Device embodiment described below is only
It is only illustrative.
The a kind of of the present embodiment divides bucket test device for client application, including:Configuration information acquiring unit
801, the client application version that corresponds to for obtaining server-side offer divides bucket test configurations information;Second work(
Energy version acquiring unit 802, is used for the reflection characteristic of exploitation language, is related to according to the client application code
The functional category for dividing bucket test obtains corresponding feature release mark from described point of bucket test configurations information;Second generation chip
Section execution unit 803, is used for the reflection characteristic of exploitation language, and corresponding code piece is executed according to feature release mark
Section.
Optionally, the configuration information of the configuration information acquiring unit acquisition includes:Corresponding to the client application journey
Sequence version divides the functional category of bucket test and the feature release mark corresponding to the functional category.
Optionally, the configuration information acquiring unit includes:
Version information obtains subelement, the version information for obtaining the client application;
Judgment sub-unit is locally stored, for local whether do not store corresponding to the client application version to be judged
Divide bucket test configurations information, described divide bucket test configurations information alternatively, storing but do not have " final version has determined that "
Mark;
Server-side acquisition of information subelement, for when the output that judgment sub-unit is locally stored be "Yes" when, from institute
It states and divides bucket test configurations information described in server-side acquisition.
Optionally, the server-side acquisition of information subelement includes:
Transmission sub-unit is asked, the request for dividing bucket test configurations information is obtained for being sent to the server-side, it is described to ask
The middle version information for carrying the client application and the mark for its host equipment of unique identification are asked, alternatively, described
Version information, system type and the mark for its host equipment of unique identification of client application;
Information receiving subelement, the client application version that corresponds to for receiving that the server-side returns
Divide bucket test configurations information;
Information storage subelement, for dividing bucket test configurations information storage in local by described.
Optionally, the second feature release acquiring unit includes:
Traversal control subelement, for traversing the registered each class of the client application, and is directed to each class
In each instance method and member method, trigger the work of following subelement;
Judgment sub-unit is named, for judging whether the title of the method meets preset point of bucket test method life
Name rule;
Functional category extracts subelement, is used for when the output of the name judgment sub-unit is "Yes", according to described point
Bucket test method naming rule, extracts the functional category for dividing bucket to test from the method title;
Feature release extracts subelement, for according to the functional category, being obtained from described point of bucket test configurations information
Corresponding feature release mark;
Feature release judge replace subelement, for judge the client application it is preset, call described in
Feature release mark used by method identifies whether one with the feature release obtained from described point of bucket test configurations information
It causes;If it is not, carrying out the dynamic replacement of method realization using the reflection characteristic of the development language, make the client application
Method corresponding with the feature release mark in described point of bucket test configurations information is executed in the stage of execution to realize.
In addition, dividing bucket test method embodiment corresponding for client application with above-mentioned, the application also carries
It has supplied a kind of for providing the method for dividing bucket test configurations information.Referring to FIG. 9, it is provided by the present application a kind of for providing
Divide the flow chart of the embodiment of the method for bucket test configurations information.The present embodiment part similar with first embodiment repeats no more,
Emphasis describes difference below.
It is provided by the present application a kind of to divide the method for bucket test configurations information to include for providing:
Step 901:Preset a point bucket testing scheme.
For client application divide bucket to test for, it should meet that each application version is mutually isolated to be wanted substantially
It asks, therefore server-side needs to have and divides bucket test and management function based on application version.Specifically, server-side should be used to answer
With version be under context, each application version include multiple work(comprising multiple functional category branches, under each functional category
Individual-layer data organizational form as energy version.
For will issue it is new divide bucket to test, need first to set a point bucket testing scheme, i.e.,:What this point of bucket test was subordinate to
Which functional category application version, this point of bucket test include, and correspond to the feature release of each functional category, and participate in each
Feature release divides user's ratio that bucket is tested.
In a specific example of the present embodiment, to create one and divide bucket to survey for wireless aps P1.0.0 application versions
Examination adds a new functional category branch " btnColorTest " at the application version 1.0.0 of above-mentioned individual-layer data,
Two feature release marks are added under the functional category, it is red that wherein button background colour, which is arranged, in version 1, and button is arranged in version 2
Background colour be blue, and set using version 1 user's accounting be 30%, using version 2 user's accounting be 70%.
Server-side defines above-mentioned point of bucket testing scheme (i.e.:Divide bucket test order), and developer is according to front reality
The description in example is applied, divides the client application that bucket is tested must according to code line or the progress of method grade two ways participation
After the setting or modification wanted, this point of bucket testing scheme can be issued.
Step 902:The request that the acquisition that client application is sent divides bucket test configurations information is received, in the request
Version information including at least the client application and the mark for its host equipment of unique identification.
It, all can be to service when the client application for participating in that bucket is divided to test starts every time after dividing the publication of bucket testing scheme
End sends the request for obtaining and dividing bucket test configurations information.The version information of the client application is included at least in the request
Can also include the system type of client application operation with the mark for its host equipment of unique identification.
Step 903:According to the above- mentioned information for including in the request, obtains and correspond to the client application version
Divide bucket test functional category and corresponding to the functional category feature release identify.
It, can when the acquisition that server-side is initially received the transmission of certain client application divides the request of bucket test configurations information
With according to preset point of bucket testing scheme, the function of dividing bucket test of the selection corresponding to the client application version
Classification and corresponding to the functional category feature release identify.Wherein, selection function version identifier may be used different
Strategy, such as:Randomized policy, polling schemas either preset algorithm, and the system carried in request can be referred to
The information such as type, as long as from can macroscopically accomplish that the quantity for participating in the client application that each feature release divides bucket to test is full
Foot divides what is set in bucket testing scheme to divide bucket test ratio.
It, can will be first in order to ensure that client user has more stable, good usage experience after completing above-mentioned selection
The version information for the client application for including in the request received, for the mark of its host equipment of unique identification
Correspondence between the information such as knowledge, the functional category and selected feature release mark, is stored in local database
In.
Hereafter, if receiving the request of same client transmission again (i.e.:Its host has been stored in the database to set
Standby mark), then it is searched according to the host equipment mark carried in request, to be returned to obtain in the database
Divide bucket test configurations information to client, i.e.,:Corresponding to the function class for dividing bucket test of the client application version
It does not identify and corresponding to the feature release of the functional category.
Under normal conditions, before dividing bucket test to terminate, server-side is directed to the request of the same host equipment, always to it
Return similarly divides bucket test configurations information, but in some special cases, such as:Adjustment is needed to participate in different function version
User's ratio, the feature release that divides in bucket test configurations information that client at this moment can be returned to by modification identifies and realizes
The function, that is to say, that server-side can be by adjusting the spirit for dividing bucket test configurations information realization to divide client bucket test process
Control and management living.
Step 904:The functional category and feature release mark are returned into the client application.
Usually directly bucket test configurations information can be divided to return to client by what step 903 obtained.In view of dividing bucket to survey
After examination, according to the obtained various conversion ratio indexs of statistics, it has been determined that optimal feature release in this case can
The mark of the feature release determined is sent to client, to which best realization can be presented to by client application
User, while also correspond to realize client application automatically updates process, it is not necessary to it is required that user downloads hair of having reached the standard grade
The final version of cloth, so as to improve the usage experience of user.
Based on above-mentioned consideration, this step is wanted before dividing bucket test configurations information to return to client by what is obtained
Judge to divide bucket to test whether to have terminated corresponding to the client application version, if terminated, with final released version
Used feature release mark replaces the corresponding function version identifier that will return to the client application.
It further,, can also be in above-mentioned replaced information for saving network flow after using above-mentioned processing
" final version has determined that " mark is added, to inform that this point of bucket test of client application has terminated, client application
Program subsequently directly can divide bucket test configurations information using this return, divide bucket without sending to obtain to server-side again
The request of test configurations information.
Therefore, divide bucket to test for what is terminated, this step by after above-mentioned execution replacement operation information and addition
" final version has determined that " mark is sent to the client together, otherwise, directly divides bucket test configurations by what step 903 obtained
Information is sent to the client.
In the above-described embodiment, it provides a kind of for providing the method for dividing bucket test configurations information, corresponds
, the application also provides a kind of for providing the device for dividing bucket test configurations information.Figure 10 is please referred to, is one kind of the application
For providing the device embodiment schematic diagram for dividing bucket test configurations information.Implement since device embodiment is substantially similar to method
Example, so describing fairly simple, the relevent part can refer to the partial explaination of embodiments of method.Device described below is implemented
Example is only schematical.
The a kind of of the present embodiment is used to provide the device for dividing bucket test configurations information, including:Testing scheme setup unit
1001, for presetting a point bucket testing scheme;Request reception unit 1002, for receiving obtaining for client application transmission
A point request for bucket test configurations information is taken, the version information of the client application is included at least in the request and is used for
The mark of its host equipment of unique identification;Information acquisition unit 1003, for according to the above- mentioned information for including in the request, obtaining
It takes and divides the functional category and work(corresponding to the functional category that bucket tests corresponding to the client application version
It can version identifier;Information returning unit 1004, it is described for returning to the functional category and feature release mark
Client application.
Optionally, what is received when the request reception unit is that the acquisition that certain client application is sent for the first time divides bucket
When the request of test configurations information, described information acquiring unit includes:
Configuration information selects subelement, for according to preset point of bucket test order, selection to correspond to the client
End application version divides the functional category of bucket test and the feature release mark corresponding to the functional category so that
It participates in dividing what is set in bucket test order to divide bucket described in the quantity satisfaction for the client application that each feature release divides bucket to test
Test ratio;
Configuration information storing sub-units, for store the client application for including in the request version information,
For the correspondence between the mark and the functional category, feature release mark of its host equipment of unique identification.
Optionally, described information acquiring unit is specifically used for, in the above-mentioned right of configuration information storing sub-units storage
In should being related to, according to the mark for unique identification host equipment for including in the request, searches and correspond to the client
Application version divides the functional category of bucket test and the feature release mark corresponding to the functional category.
Optionally, described device includes:
Test terminates judging unit, corresponds to the client for before triggering described information returning unit, judging
Application version divides bucket to test whether to have terminated;
Information replacement unit, when the output for terminating judging unit when the test is "Yes", with final released version
Used feature release mark replaces the corresponding function version identifier that will return to the client application, and adds
" final version has determined that " identifies;
Correspondingly, described information returning unit is specifically used for, by after above-mentioned execution replacement operation information and addition
" final version has determined that " mark is sent to the client application together.
The embodiment of the present application also provides one kind, and bucket to be divided to test system.Attached drawing 11 is referred to, the system comprises for carrying
For dividing the device 1101 of bucket test configurations information and dividing bucket test device 1102 for client application.The use
Divide the device of bucket test configurations information to be typically deployed in offer and a point server for bucket test is responsible for based on C/S frameworks
On, it is described to divide bucket test device to be typically deployed at the client device based on C/S frameworks for client application, it wraps
It includes:The equipment such as PC, smart mobile phone, PAD, iPad are briefly described as follows the groundwork flow of this system.
Described point of bucket test device being deployed on client device is obtained to the server transmission that point bucket is tested is responsible for
A point request for bucket test configurations information, the server is taken to be believed according to the version of the client application carried in the request
Breath divides bucket test configurations information, the information to include that client application participation divides bucket to survey to described point of bucket test device return
The functional category of examination and corresponding feature release mark;Described point of bucket test device is in executing client application and divides
When bucket tests relevant code, according to the feature release information divided in bucket test configurations information, corresponding code snippet is executed.
In conclusion technical solution provided by the present application, divides bucket test to propose one kind for client application
New thinking:Corresponding with the current application version point of bucket test configurations that the client for participating in that bucket is divided to test is provided according to server-side
Information executes corresponding with specific function version code snippet, divides bucket test function to complete that server-side specifies.Using upper
Technical solution is stated, can not only meet and divide the bucket version isolation that test proposes requirement to client application, but also be convenient for
Server-side divides bucket test to carry out neatly management and control to different editions client application, especially bucket is being divided to test
After, it can control client application by the adjustment to dividing bucket test configurations information and automatically switch to formal publication
Application version (i.e.:Execute the finally determining corresponding code snippet of feature release), to which user is formal without downloading again
Released version is effectively improved the usage experience of user.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill
Art personnel are not departing from spirit and scope, can make possible variation and modification, therefore the guarantor of the application
Shield range should be subject to the range that the application claim defined.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
1, computer-readable medium can be by any side including permanent and non-permanent, removable and non-removable media
Method or technology realize information storage.Information can be computer-readable instruction, data structure, the module of program or other numbers
According to.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or
Other magnetic storage apparatus or any other non-transmission medium can be used for storage and can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitory media), is such as modulated
Data-signal and carrier wave.
2, it will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program production
Product.Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It can be used in the computer that one or more wherein includes computer usable program code moreover, the application can be used
The computer program product implemented on storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Form.
Claims (25)
1. a kind of dividing bucket test method for client application, which is characterized in that including:
Obtain server-side offer divides bucket test configurations information corresponding to the client application version;
The functional category for dividing bucket to test being related to according to the client application code, from described point of bucket test configurations information
The middle feature release mark for obtaining the corresponding functional category;
Corresponding code snippet is executed according to feature release mark.
2. according to claim 1 divide bucket test method for client application, which is characterized in that correspond to institute
The bucket test configurations information of dividing for stating client application version includes:Divide bucket corresponding to the client application version
The functional category of test and corresponding to the functional category feature release identify.
3. according to claim 1 divide bucket test method for client application, which is characterized in that the acquisition
What server-side provided the correspond to client application version divides bucket test configurations information, including:
Obtain the version information of the client application;
Judge that local whether do not store divides bucket test configurations information corresponding to the client application version, alternatively, depositing
It has stored up described point of bucket test configurations information but has been identified without " final version has determined that ";
If so, from bucket test configurations information is divided described in server-side acquisition.
4. according to claim 3 divide bucket test method for client application, which is characterized in that described from institute
State server-side obtain described in divide the bucket test configurations information to include:
It is sent to the server-side and obtains the request for dividing bucket test configurations information, the client application journey is carried in the request
The version information of sequence and mark for its host equipment of unique identification, alternatively, the version information of the client application,
System type and mark for its host equipment of unique identification;
Receive the server-side return divides bucket test configurations information corresponding to the client application version;
Divide bucket test configurations information storage in local by described.
5. described dividing bucket test method for client application according to claim 1-4 is any, which is characterized in that institute
It refers to being executed and the feature release pair by branch statement to state and execute corresponding code snippet according to feature release mark
The code line answered.
6. according to claim 5 divide bucket test method for client application, which is characterized in that obtaining institute
After stating point bucket test configurations information, operations described below is executed:
It sends a notification message to the client application;
Correspondingly, the client application executes the basis in the readjustment processing function of the correspondence notification message
What the client application code was related to divides the functional category that bucket is tested, the acquisition pair from described point of bucket test configurations information
The feature release mark answered, and the step of executing corresponding code snippet is identified according to the feature release.
7. described dividing bucket test method for client application according to claim 1-4 is any, which is characterized in that when
When implementing this method using the development language for having reflection characteristic, point being related to according to the client application code
The functional category of bucket test obtains corresponding feature release mark from described point of bucket test configurations information, including:
Traverse the registered each class of the client application, in each class each instance method and member side
Method executes operations described below:
Judge whether the title in the instance method and the member method meets preset point of bucket test method name
Rule, described point of bucket test method naming rule are defined as follows Naming conventions:It is tested in relevant method name at least with bucket is divided
It should include the functional category feature release mark corresponding with logic is realized for dividing bucket to test;
If so, executing operations described below:
According to described point of bucket test method naming rule, is extracted from the instance method and the member method title and bucket is divided to survey
The functional category of examination;
According to the functional category, corresponding feature release mark is obtained from described point of bucket test configurations information;
Judge the client application it is preset, call described in divide feature release mark used by bucket test method
Know, identified whether unanimously with the feature release obtained from described point of bucket test configurations information;
If it is not, the reflection characteristic using the development language carries out the instance method and member method and described point of bucket test side
The dynamic replacement that method is realized makes the client application in the execution of execution stage and described point of bucket test configurations information
Feature release identifies corresponding point of bucket test method and realizes.
8. described dividing bucket test method for client application according to claim 1-4 is any, which is characterized in that when
It is described that corresponding code is executed according to the feature release mark when implementing this method using the development language for having reflection characteristic
Segment refers to passing through the reflection characteristic dynamic call of language member method corresponding with the feature release.
9. a kind of dividing bucket test device for client application, which is characterized in that including:
Configuration information acquiring unit, the client application version of corresponding to for obtaining server-side offer divide bucket to survey
Try configuration information;
Feature release acquiring unit, the functional category for dividing bucket to test for being related to according to the client application code,
The feature release mark of the corresponding functional category is obtained from described point of bucket test configurations information;
Code snippet execution unit, for executing corresponding code snippet according to feature release mark.
10. according to claim 9 divide bucket test device for client application, which is characterized in that described to match
Setting the configuration information that information acquisition unit obtains includes:Corresponding to the function of dividing bucket test of the client application version
Classification and corresponding to the functional category feature release identify.
11. according to claim 9 divide bucket test device for client application, which is characterized in that described to match
Setting information acquisition unit includes:
Version information obtains subelement, the version information for obtaining the client application;
Judgment sub-unit is locally stored, for judging local point whether not stored corresponding to the client application version
Bucket test configurations information, alternatively, dividing bucket test configurations information described in storing but being identified without " final version has determined that ";
Server-side acquisition of information subelement, for when the output that judgment sub-unit is locally stored be "Yes" when, from the clothes
Bucket test configurations information is divided in business end described in obtaining.
12. according to claim 11 divide bucket test device for client application, which is characterized in that the clothes
Business client information obtains subelement:
Transmission sub-unit is asked, the request for dividing bucket test configurations information is obtained for being sent to the server-side, in the request
The version information of the client application and the mark for its host equipment of unique identification are carried, alternatively, the client
Hold version information, system type and the mark for its host equipment of unique identification of application program;
Information receiving subelement, for receive that the server-side returns correspond to the client application version divide bucket
Test configurations information;
Information storage subelement, for dividing bucket test configurations information storage in local by described.
13. described dividing bucket test device for client application according to claim 9-12 is any, which is characterized in that
The code snippet execution unit is specifically used for, and code line corresponding with the feature release is executed by branch statement.
14. according to claim 13 divide bucket test device for client application, which is characterized in that including:
Notification message transmission unit is sent out after dividing bucket test configurations information described in acquisition to the client application
Send notification message;
Notification message processing unit, for working as the client application after receiving the notification message, described in triggering
Feature release acquiring unit and the work of code snippet execution unit.
15. described dividing bucket test device for client application according to claim 9-12 is any, which is characterized in that
The feature release acquiring unit includes:
Traversal control subelement, for traversing the registered each class of the client application, and in each class
Each instance method and member method trigger following subelement work;
Name whether judgment sub-unit, the title for judging in the instance method and member method meet preset point
Bucket test method naming rule;
Functional category extracts subelement, for when the output of the name judgment sub-unit is "Yes", being surveyed according to described point of bucket
Method for testing naming rule extracts the functional category for dividing bucket to test from the instance method and member method title;
Feature release extracts subelement, for according to the functional category, obtaining and corresponding to from described point of bucket test configurations information
Feature release mark;
Feature release judges to replace subelement, for judging that the client application is preset, calls the example
Feature release mark feature release mark used by method and member method and obtained from described point of bucket test configurations information
Whether consistent know;If it is not, the reflection characteristic using the development language for having reflection characteristic carries out the instance method and member side
The dynamic replacement that method is realized with described point of bucket test method makes the client application be executed and described point in the execution stage
Feature release in bucket test configurations information identifies corresponding point of bucket test method and realizes.
16. described dividing bucket test device for client application according to claim 9-12 is any, which is characterized in that
The code snippet execution unit is specifically used for, by having the reflection characteristic dynamic call of the development language of reflection characteristic and institute
State the corresponding member method of feature release.
17. a kind of for providing the method for dividing bucket test configurations information, which is characterized in that the method is surveyed being responsible for a point bucket
The server-side of examination is implemented, including:
The request that the acquisition that client application is sent divides bucket test configurations information is received, is included at least in the request described
The version information of client application and mark for its host equipment of unique identification;
According to the above- mentioned information for including in the request, obtains and divide bucket to test corresponding to the client application version
Functional category and corresponding to the functional category feature release identify;
The functional category and feature release mark are returned into the client application.
18. according to claim 17 for providing the method for dividing bucket test configurations information, which is characterized in that be initially received
It is described upper according to include in the request when the acquisition that certain client application is sent divides the request of bucket test configurations information
Information is stated, obtains and divides the functional category of bucket test and corresponding to the work(corresponding to the client application version
The feature release mark of energy classification, including:
According to preset point of bucket test order, the work(that divides bucket test of the selection corresponding to the client application version
Can classification and corresponding to the functional category feature release identify so that participate in each feature release divide bucket test client
The quantity of end application program divides what is set in bucket test order bucket is divided to test ratio described in meeting;
Store the version information for the client application for including in the request, for the mark of its host equipment of unique identification
Correspondence between knowledge and the functional category, feature release mark.
19. according to claim 18 for providing the method for dividing bucket test configurations information, which is characterized in that the basis
The above- mentioned information for including in the request obtains the function class for dividing bucket to test corresponding to the client application version
And corresponding to the feature release mark of the functional category do not refer to, in stored above-mentioned correspondence, according to described
The mark for unique identification host equipment for including in request searches and divides bucket corresponding to the client application version
The functional category of test and corresponding to the functional category feature release identify.
20. any described for providing the method for dividing bucket test configurations information according to claim 17-19, which is characterized in that
Before the functional category and feature release mark are returned to the client application, operations described below is executed:
Judge to divide bucket to test whether to have terminated corresponding to the client application version;
If so, the feature release mark used by final released version, which is replaced, will return to the client application
Corresponding function version identifier, and add " final version has determined that " mark;
Correspondingly, described return to the functional category and feature release mark the client application and refer to, it will
" final version has determined that " mark of information and addition after above-mentioned execution replacement operation is sent to the client and answers together
Use program.
21. a kind of for providing the device for dividing bucket test configurations information, which is characterized in that described device is surveyed being responsible for a point bucket
It is disposed in the server device of examination, including:
Request reception unit, the acquisition for receiving client application transmission divides the request of bucket test configurations information, described
Mark in request including at least the version information of the client application and for its host equipment of unique identification;
Information acquisition unit, for according to the above- mentioned information for including in the request, obtaining and corresponding to the client application journey
Sequence version divides the functional category of bucket test and the feature release mark corresponding to the functional category;
Information returning unit, for the functional category and feature release mark to be returned to the client application journey
Sequence.
22. according to claim 21 for providing the device for dividing bucket test configurations information, which is characterized in that asked when described
When ask that receiving unit receives is that acquisition that certain client application is sent for the first time divides the request of bucket test configurations information, institute
Stating information acquisition unit includes:
Configuration information selects subelement, for according to preset point of bucket test order, selection to be answered corresponding to the client
Divide the functional category of bucket test and corresponding to the feature release mark of the functional category with program version so that participate in
Each feature release divides divides what is set in bucket test order bucket is divided to test described in the quantity satisfaction of the client application of bucket test
Ratio;
Configuration information storing sub-units, for storing the version information for the client application for including in the request, being used for
Correspondence between the mark of its host equipment of unique identification and the functional category, feature release mark.
23. according to claim 22 for providing the device for dividing bucket test configurations information, which is characterized in that described information
Acquiring unit is specifically used for, and in the correspondence of configuration information storing sub-units storage, includes according in the request
The mark for unique identification host equipment, search corresponding to the client application version divide bucket test function
Classification and corresponding to the functional category feature release identify.
24. any described for providing the device for dividing bucket test configurations information according to claim 21-23, which is characterized in that
Including:
Test terminates judging unit, corresponds to the client application for before triggering described information returning unit, judging
Program version divides bucket to test whether to have terminated;
Information replacement unit is adopted when the output for terminating judging unit when the test is "Yes" with final released version
Feature release mark replaces the corresponding function version identifier that will return to the client application, and adds " most
Whole version has determined that " mark;
Correspondingly, described information returning unit is specifically used for, by after above-mentioned execution replacement operation information and addition it is " final
Version has determined that " mark be sent to the client application together.
25. one kind divides bucket to test system, which is characterized in that including:Divide bucket for providing according to the claims 21
The device of test configurations information, and divide bucket test dress for client application according to the claims 9
It sets.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410746167.2A CN105740137B (en) | 2014-12-08 | 2014-12-08 | Divide bucket test method and the method, apparatus and system of configuration information are provided |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410746167.2A CN105740137B (en) | 2014-12-08 | 2014-12-08 | Divide bucket test method and the method, apparatus and system of configuration information are provided |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105740137A CN105740137A (en) | 2016-07-06 |
| CN105740137B true CN105740137B (en) | 2018-07-31 |
Family
ID=56237890
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410746167.2A Expired - Fee Related CN105740137B (en) | 2014-12-08 | 2014-12-08 | Divide bucket test method and the method, apparatus and system of configuration information are provided |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105740137B (en) |
Families Citing this family (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106959925B (en) * | 2017-04-25 | 2020-06-30 | 北京云测信息技术有限公司 | Version testing method and device |
| CN107122303B (en) * | 2017-05-03 | 2020-05-15 | 北京云测信息技术有限公司 | Test method and device |
| CN107888772B (en) * | 2017-11-08 | 2021-03-09 | Oppo广东移动通信有限公司 | Method, device and storage medium for determining configuration information |
| CN107908415A (en) * | 2017-11-30 | 2018-04-13 | 北京小米移动软件有限公司 | Processing method, device, equipment and storage medium |
| CN113837731B (en) * | 2018-04-04 | 2024-08-20 | 先进新星技术(新加坡)控股有限公司 | Preference setting and service processing system, method, device and equipment |
| CN108717394A (en) * | 2018-05-16 | 2018-10-30 | 上海陆家嘴国际金融资产交易市场股份有限公司 | Long-range examination processing method, system and the computer equipment of application program |
| CN109240743B (en) * | 2018-08-03 | 2021-07-27 | 挖财网络技术有限公司 | Method for switching codes by using specific label |
| CN110032509B (en) * | 2019-03-04 | 2022-08-23 | 广州华多网络科技有限公司 | Method, device and system for switching experiments in local list and storage medium |
| CN110290024B (en) * | 2019-06-26 | 2021-09-21 | 北京百度网讯科技有限公司 | Method, device and equipment for testing strategy before online |
| CN110377512B (en) * | 2019-07-12 | 2023-04-04 | 广州方硅信息技术有限公司 | Method, device, server and storage medium for testing application program |
| CN112579430B (en) * | 2019-09-30 | 2024-07-26 | 北京国双科技有限公司 | Processing method and device for acquisition codes |
| CN110851359B (en) * | 2019-11-07 | 2023-10-27 | 网易(杭州)网络有限公司 | Application program testing method and device and server |
| CN111782542B (en) * | 2020-07-13 | 2024-06-18 | 豆盟(北京)科技股份有限公司 | Test method, test device, test equipment, test system and computer storage medium |
| CN114880223B (en) * | 2022-05-10 | 2025-06-13 | 拉扎斯网络科技(上海)有限公司 | Application publishing method, device, electronic device and medium based on bucket experiment |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100501697C (en) * | 2007-11-09 | 2009-06-17 | 中兴通讯股份有限公司 | A software version upgrade installation test system and method |
| US20110161825A1 (en) * | 2009-12-31 | 2011-06-30 | Tierney Chris | Systems and methods for testing multiple page versions across multiple applications |
| CN103001815B (en) * | 2011-09-13 | 2016-05-04 | 阿里巴巴集团控股有限公司 | The acquisition methods of test data, Apparatus and system |
| US9075917B2 (en) * | 2012-09-15 | 2015-07-07 | Yahoo! Inc. | Testing framework for dynamic web pages |
| US9411573B2 (en) * | 2012-10-11 | 2016-08-09 | Google Inc. | Testing framework for applications |
| CN104063239B (en) * | 2013-03-22 | 2019-01-15 | 腾讯科技(深圳)有限公司 | Application program update method and server, the client of mobile terminal |
| CN103763354B (en) * | 2014-01-06 | 2017-07-28 | 北京奇安信科技有限公司 | The method and device that a kind of data of upgrading are downloaded |
-
2014
- 2014-12-08 CN CN201410746167.2A patent/CN105740137B/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN105740137A (en) | 2016-07-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105740137B (en) | Divide bucket test method and the method, apparatus and system of configuration information are provided | |
| JP6453417B2 (en) | Dual SIM mobile communication device cloud identification method, device and system | |
| CN112118184B (en) | Gateway automatic routing method and device, storage medium and computer equipment | |
| JP6742650B2 (en) | Application calling method and device using mobile browser | |
| WO2016173348A1 (en) | Network access method and mobile communications terminal | |
| CN104581785B (en) | wireless network test method, test device and mobile terminal | |
| US10149266B2 (en) | Apparatus, method, and storage medium | |
| CN104750487B (en) | A kind of development approach and starting method of mobile terminal APP | |
| CN109634861B (en) | Testing method, device, processor and terminal of network game protocol | |
| US20140130064A1 (en) | Method of disseminating updated drivers to mobile computing devices and a dissemination sytem therefor | |
| US10582550B2 (en) | Generating sequenced instructions for connecting through captive portals | |
| EP2030429A2 (en) | Network access point detection and use | |
| CN107391219B (en) | Function Compilation Method and device | |
| CN104598513A (en) | Data flow control method and system based on webpage frame | |
| CN114466047B (en) | Method, platform, equipment and medium for conveniently accessing Internet of things equipment to Internet of things platform | |
| CN106339273A (en) | Application program restoration method, terminal and server | |
| CN103595867A (en) | Application program implementation method and device based on multi-card recognition | |
| CN106383785A (en) | Mobile application debugging method and apparatus | |
| CN106790380A (en) | Data reporting method and device | |
| US11678172B2 (en) | On-device enrollment in a cellular add-on plan | |
| CN113900939A (en) | Test environment access method, apparatus, readable storage medium and computer device | |
| CN113934552A (en) | Method and device for determining function code, storage medium and electronic device | |
| US11275674B1 (en) | Operations support system (OSS) test tool | |
| CN104254063B (en) | Cut-in method, system and the terminal of optimum roaming list are updated based on WIFI | |
| CN106648805A (en) | Intelligent device, intelligent system, and method for intelligently installing application |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180731 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |