CN100461801C - Method and device for generating the phone directory recording and the test method and system of the phone directory - Google Patents

Method and device for generating the phone directory recording and the test method and system of the phone directory Download PDF

Info

Publication number
CN100461801C
CN100461801C CNB200610168247XA CN200610168247A CN100461801C CN 100461801 C CN100461801 C CN 100461801C CN B200610168247X A CNB200610168247X A CN B200610168247XA CN 200610168247 A CN200610168247 A CN 200610168247A CN 100461801 C CN100461801 C CN 100461801C
Authority
CN
China
Prior art keywords
random
name
recording
phone directory
generate
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
Application number
CNB200610168247XA
Other languages
Chinese (zh)
Other versions
CN101009727A (en
Inventor
何仁贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB200610168247XA priority Critical patent/CN100461801C/en
Publication of CN101009727A publication Critical patent/CN101009727A/en
Application granted granted Critical
Publication of CN100461801C publication Critical patent/CN100461801C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)

Abstract

The disclosed method generating telephone directory record comprises: generating random name and phone number by a generation unit to form one piece of phone record; deciding by a decision unit whether the record number up to the required; if not, continuing to generate record; or else, completing the process. The test method for telephone directory comprises: generating a piece of random record to load into the directory, continuing to generate record if the record number not up to the required, then testing the directory. This invention saves labor, and has all-side test result.

Description

Generate method, device and test telephone method, the system originally of phone directory recording
Technical field
The present invention relates to technical field of measurement and test, relate in particular to a kind of method, system that generates method, device and the test terminal phone directory of phone directory recording.
Background technology
Along with development of science and technology, increasing electronic terminal product has the function of phone directory, for example mobile phone, data card, palmtop PC (PDA), e-dictionary and so on, these end products are being developed, are producing, are reaching in the process of circulation, all might need the phone directory of end product is tested, content measurement comprises capacity, ordering, deletion, modification, interpolation or the like.
Method of testing commonly used has two kinds:
1, manual input phone directory recording is to the phone directory of end product, test telephone this capacity, ordering, whether reach other operations correct.
Adopt this method, for the mobile phone of title that can allow to repeat and number, can finish by duplicating repeatedly, but for the mobile phone that does not allow to repeat, can only import one by one, so this method only is applicable to the fewer situation of end product that needs test, if the phone directory capacity of end product is very big, the test that need carry out is many, has just wasted time and energy more.
And, the phone directory recording of manual like this input is owing to be subjected to the restriction of typing personnel personal behavior, the record of input does not have randomness and comprehensive, input that can not the actual cellphone subscriber of real simulated, the problem that occurs in situation about not simulating just can be not tested not be come out, such test is incomplete, occurs test leakage easily.
2, manual on computers input phone directory recording imports in the phone directory of end product by instrument then.
Compared with the method for manual input phone directory recording to the phone directory of end product, this method is having transferred on the computer at the button operation that carries out on the end product, human cost has certain decline, but when the phone directory capacity is very large, still need great amount of manpower input, and have equally and do not have randomness and comprehensive problem, input that can not the actual cellphone subscriber of real simulated, such test remains incomplete.
As from the foregoing, the existing method that the phone directory of end product is tested all needs great amount of manpower to carry out manual input, phone directory capacity at end product is very big, when the test that need carry out is many, waste time and energy very much, and the record of manual input do not have randomness and comprehensive, and the actual cellphone subscriber's of real simulated input has comprehensively influenced test comprehensive.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of method, system that generates method, device and a kind of test terminal phone directory of phone directory recording, to save manpower and to take into account the randomness of recorded content, makes test result more comprehensively.
For solving the problems of the technologies described above, the invention provides a kind of method that generates phone directory recording, described method comprises:
Generate name at random, generate the random telephone signal number, described name and described telephone number constitute a telephony recording;
Judge whether the telephony recording bar number that generates reaches the bar number of demand;
Do not reach and then continue to generate next bar telephony recording;
Reach and then finish the generation phone directory recording, flow process finishes.
The present invention also provides a kind of device that generates phone directory recording, and described device comprises generation unit and judging unit:
Generation unit is used to generate name at random, generates the random telephone signal number, and described name and described telephone number constitute a telephony recording;
Judging unit is used to judge whether the telephony recording bar number of generation unit generation reaches the bar number of demand; Do not reach and then control next bar telephony recording of generation unit continuation generation; Reach and then finish the generation phone directory recording.
The present invention also provides the method for a kind of test terminal phone directory, and described method comprises:
Generate name at random, generate the random telephone signal number, described name and described telephone number constitute a telephony recording; The bar that the telephony recording bar number that generates does not reach demand continues to generate next bar telephony recording when counting, and described telephony recording is imported terminal's contact book; Begin terminal's contact book is tested reach the bar number of demand at the telephony recording bar number that imports after.
The present invention also provides the system of a kind of test terminal phone directory, and described system comprises device and the terminal that generates phone directory recording:
The device that generates phone directory recording is used to generate name at random, generates the random telephone signal number, and described name and described telephone number constitute a telephony recording; The bar that the telephony recording bar number that generates does not reach demand continues to generate next bar telephony recording when counting, and described telephony recording is imported terminal's contact book;
Terminal is used for terminal's contact book is tested.
Above technical scheme owing to use the present invention only to need manpower to carry out the setting of some parameters, has greatly been saved manpower as can be seen, and because name and telephone number all generate at random, has randomness and comprehensive, and what can guarantee to test is comprehensive.
Description of drawings
Method embodiment one flow chart of Fig. 1, generation phone directory recording provided by the invention;
Method embodiment two flow charts of Fig. 2, generation phone directory recording provided by the invention;
Method embodiment three flow charts of Fig. 3, generation phone directory recording provided by the invention;
The device example structure figure of Fig. 4, generation phone directory recording provided by the invention;
Method embodiment one flow chart of Fig. 5, test terminal provided by the invention phone directory;
Method embodiment two flow charts of Fig. 6, test terminal provided by the invention phone directory;
The system embodiment structure chart of Fig. 7, test terminal provided by the invention phone directory.
Embodiment
The invention provides a kind of method, system that generates method, device and a kind of test terminal phone directory of phone directory recording,, effectively improved the efficient that the end product phone directory is tested by automatic generation phone directory recording.
Method embodiment one flow process of generation phone directory recording provided by the invention is as shown in Figure 1:
Step 101, generate name at random.
At first to set the character source of name.
All phone directory recordings all are that the single telephony recording by a rule constitutes, each bar telephony recording all can have a name, common phone directory all sorts with name and classifies, and other are as telephone number, and the information of telephone number type and so on all is subordinated to name and exists.
When generating the name of a telephony recording, need to set the character source of this name, in the present embodiment, the source of character can be a Chinese, English, numeral, additional character or other rare foreign languages character set, as long as it is just passable to the requirement of phone directory name to meet end product, with the mobile phone is example, if the name that this mobile phone allows to store in the phone directory comprises Chinese, English, numeral, and additional character, the character source of so herein setting just can be a Chinese, English, numeral, and any one character set in the additional character, also can be the combination in any of these several character set.
Various kinds of characters collection can be realized by the form of array, for example set the character source for Chinese, then construct a Chinese character array, put into some Chinese characters in common use, originate as character; Set the character source for English, then construct an English character array, put into all English alphabets, originate as character; Setting the character source is Chinese, English and digital combination, then constructs a mixed characters array, puts into some Chinese characters in common use, all English alphabets, reaches the numeral that " 0 " arrives " 9 ", originates as character.
Various kinds of characters collection also can pass through the realization of the form of database, and for example various character libraries need only during use and select corresponding character library just passable as the character source.
A phone directory recording all comprises a plurality of telephony recordings usually, each telephony recording all needs to generate a name, in this process, set the character source of name except the first time is necessary, the character that the back configures before can directly using is originated, and all reassigns also before each certainly generation name to be fine.
Generate name at random then.
Select random function, the designated character string length uses the character source that configures to generate random string, and as name at random, when generating name once more afterwards, it is just passable only need to carry out this random function once more.The regulation name is the longest in the end product phone directory can for what characters, the length of random string also can only be within this scope, for example the longest permission name has 10 character lengths in a kind of phone directory of mobile phone, then this at random the length of name can only round numbers " 0 " arrive arbitrary integer between " 10 ", wherein get " 0 " expression name for empty.
Now illustrate the using method of utilizing random function to generate name.Suppose that the character set array is name[N], the output of random function is mapped to interval [0, N], each character in the name is all produced a random number R earlier, then R is rounded, obtain character index R1, again with character name[R1] take out as the character in the name.
Random function in the present embodiment can adopt any function with random function to realize.
The random telephone signal number that is associated of name at random in step 102, generation and the step 101.
The method that generates the random telephone signal number is roughly consistent with the method that generates name at random, select random function, specify the random telephone signal number length, this length is no more than in the end product phone directory the longest telephone number length that allows storage, generates each digital value and arrives random telephone signal number between " 9 " at integer " 0 ".
Comprise a plurality of different classes of telephone numbers under a telephony recording in the phone directory of some end product, " move " or the like such as " family " " office ", this step also can a plurality of random telephone signal number storage of corresponding generation at different bars now.
So far telephony recording generates.
During practical operation, also can generate telephone number earlier, the name that regeneration is associated with telephone number, that is to say does not have ordinal relation between step 102 and the step 101.
Whether the telephony recording bar number that step 103, judgement generate reaches the bar number of demand, if reach, then flow process finishes; If do not reach and then return step 101, the step before repeating continues to generate next bar telephony recording.
Judgement herein can be by manually judging, whether decision continues to generate next bar telephony recording, also can set a numerical value in advance, whether the telephony recording bar number that is generated at this moment by procedure judges less than this numerical value, if less than, then expression does not reach the bar number of demand, Automatic Program repeating step 101 and step 102 continue to generate next bar telephony recording, otherwise, then expression has reached the bar number of demand, and flow process finishes.
In actual use, most name all can exist with the form of Chinese Name in the phone directory recording, these Chinese Names all meet the Chinese named rule mostly, also having the name that some literary compositions all over Britain, digital, other rare foreign languages or multiple character mix exists, and these names have the long weak point that has, the telephone number of storage also has length weak point, also can occur name sometimes for empty, or telephone number is empty situation.
For truer, more fully simulate actual user's input, the invention provides the method embodiment two that generates phone directory recording, the phone directory recording method that generates name and be Chinese Name at random as shown in Figure 2:
The character source of step 201, setting Chinese Name.
Chinese Name generally all comprises surname and name, and surname is preceding, name after, for as far as possible objective, comprehensively reflect and be respectively the characteristics of Chinese Name surname and name in this step and respectively set a character set.
Wherein comprise most of Chinese surname commonly used in the character set of surname, and the phonetic of these surnames will comprise all initial consonants as far as possible, have two surnames that pronunciation is different in the surname of several same initial consonants or beginning of letter at least, this surname character set can use array to realize, also can use database to realize.
Comprise Chinese character commonly used in the namespace number in the character set of name as far as possible, the phonetic of these Chinese characters will comprise all initial consonants equally as far as possible, have two Chinese characters that pronunciation is different in the Chinese character of several same initial consonants or beginning of letter at least, the Chinese character quantity that it comprises is many more to guarantee that more it is comprehensive, but in actual use, there are 100 to 200 Chinese characters also just can embody most situation, can depending on circumstances accept or reject in the practical operation, the character set implementation of the implementation of the character set of name and surname is basic identical.
Step 202, generation Chinese Name length.
Chinese Name is based on two words and three words, the name that also has a small amount of four words, in actual use, the terminal use also might store the name of some special length, for example a word, five words or other numbers of words in end product phone directory allowed band, also having a kind of special circumstances is exactly that name is empty situation.
Suppose that the maximum Chinese character number that the end product phone directory allows is " N ", then the name length that generates by software in this step should meet condition as mentioned below:
Scope is the integer from " 0 " to " N ", " 2 " and " 3 " probability maximum of occurring wherein, and the probability that " 4 " occur is less than " 2 " and " 3 ", but greater than the probability of other values appearance.
The mode that generates can be directly to generate the random number that meets above-mentioned condition by software, now illustrates the method that generates eligible random number:
At first be that scope each integer from " 0 " to " N " is specified probability (p0, p1, a p2, ..., pN), the possibility size that expression different length name occurs, and satisfy condition: p0+p1+p2+...+pN=1, and [0,1] be divided into following interval: [0, p0], [p0, p0+p1], [p0+p1, p0+p1+p2] ..., [p0+p1+...+pN-1,1].Such as N=4, then can specify probability: p0=0.05, p1=0.1, p2=0.35, p3=0.4, p4=0.1, then the interval is [0,0.05], [0.05,0.15], [0.15,0.5], [0.5,0.9], [0.9,1].
Use random number R of equally distributed random function generation between [0,1] then, obtain the name length L according to the interval under the R.
By above-mentioned hypothesis, if the random number R of certain generation=0.3 belongs to interval [0.15,0.5], L=2 then, promptly the name length of Sheng Chenging is 2.
Specifying probability L according to this is that the probability of " 0 " is " 5% ", for the probability of " 1 " is " 10% ", for the probability of " 2 " is " 35% ", for the probability of " 3 " is " 40% ", for the probability of " 4 " is " 10% ", satisfy Chinese Name fully based on two words and three words, also have the naming rule of the name of a small amount of four words.
The length ratio of surname and name also can distribute by the mode of getting random number in the Chinese Name.Suppose that name length is " L ", then formation range is that random number from " 0 " to " L-1 " is as the length of surname, the value probability maximum of " 1 " wherein if " L " is " 0 " then the length of surname also is " 0 ", represents that this telephony recording name is for empty this moment.
Also can directly specify the length of surname to be " 0 " Shi Douwei " 1 " except name length, " L-1 " is the length of name.
Also having a kind of generating mode is the length that generates surname and name respectively, and the condition that the length that both add up satisfies above-mentioned name length gets final product.
Step 203, generate Chinese Name at random.
Generating at random Chinese Name can be divided into and generate at random surname and generate name two parts at random:
Generate surname at random, select random function, use the surname character set of setting in the step 201 to originate, generate length and be the surname at random of the surname length that obtains in the step 202 as character.
Generate name at random, select random function, use the name character set of setting in the step 201 to originate, generate length and be the name at random of the length of name that obtains in the step 202 as character.
At random surname and at random name to combine be exactly the Chinese name at random of this generation.
Step 204, generation random telephone signal number length.
The length of commonly used telephone number is generally 6,7,8 or 11, add and to store area code or other long-distance special numbers sometimes, length variations is a lot, so the telephone number length of using software to generate in this step needs only just passable in end product phone directory allowed band.
Suppose that the end product phone directory allows the longest telephone number length of storage to be " M ", use a random function to be created on scope " 0 " so and arrive random integers within " M ", these random integers are exactly the length of random telephone signal number, if the numerical value that generates is " 0 ", represent that then this telephone number is for empty.
The random telephone signal number that step 205, generation and the name that step 203 generates are associated.
Use random function to generate each digital value and arrive random telephone signal number between " 9 " at integer " 0 ", its length is the length that step 204 generates, the telephone number that generates is stored under the corresponding classification, and name that is associated and telephone number belong to the content of same telephony recording.
Step 206, judge whether to be then to enter step 207 for all telephone class under this telephony recording generated telephone number; Otherwise return step 204.
Comprise a plurality of different classes of telephone numbers under a telephony recording in the phone directory of some end product, " move " or the like such as " family " " office ", step 206 is exactly to judge whether all to generate telephone number for all classifications, if not then repeat step 204 to step 205, up to all generating telephone number for all telephone class, telephony recording so far generates.
During practical operation, also can generate telephone number earlier, the name that regeneration is associated with telephone number, that is to say between step 204 to 206 that generates telephone number and the step 201 to 203 that generates name does not have ordinal relation.
Whether the telephony recording bar number that step 207, judgement generate reaches the bar number of demand, if reach, then flow process finishes; If do not reach and then return step 202, the step before repeating continues to generate next bar telephony recording.
Judgement herein can be by manually judging, whether decision continues to generate next bar telephony recording, also can set a numerical value in advance, whether the telephony recording bar number that is generated at this moment by procedure judges this numerical value, if, then expression does not reach the bar number of demand, step before Automatic Program repeats continues to generate next bar telephony recording, otherwise, then expression has reached the bar number of demand, and flow process finishes.
The method embodiment three of generation phone directory recording provided by the invention, the phone directory recording method that generates name and be literary composition all over Britain at random, digital, other rare foreign languages or multiple character mixing name as shown in Figure 3:
The character source of step 301, setting name.
Be that english name is the character source with the character set that comprises all English alphabets then, can be case sensitive; Be that digital name is the character source with the numeric character set that comprises " 0 " to " 9 " then; Be that other rare foreign languages names also select for use the character set that comprises whole letters to originate as character as English, equally can be case sensitive; Be the name that multiple character mixes, just the character set that all these characters are put together is originated as character, and these characters all must be in end product allows the character types scope of storage.
These character set can use array to realize, also can use database to realize.
Step 302, generation name length.
The name length that literary composition all over Britain at random, digital, other rare foreign languages or multiple character mix does not have any regularity mostly, so use name length that software generates as long as just passable in end product phone directory allowed band in this step.
Suppose that the end product phone directory allows the longest name length of storage to be " I ", use a random function to be created on scope " 0 " so and arrive random integers within " I ", these random integers are exactly the length of name at random, if the numerical value that generates is " 0 ", the name of then representing this phone information is for empty.
Step 303, generate name at random.
Select random function, use the character set of setting in the step 301 to originate, generate length and be the name at random of the name length that obtains in the step 302 as character.
Step 304, generation random telephone signal number length.
Use software to generate the telephone number length of value in end product phone directory allowed band.
Suppose that the end product phone directory allows the longest telephone number length of storage to be " J ", use a random function to be created on scope " 0 " so and arrive random integers within " J ", these random integers are exactly the length of random telephone signal number, if the numerical value that generates is " 0 ", represent that then this telephone number is for empty.
The random telephone signal number that step 305, generation and the name that step 303 generates are associated.
Use random function to generate each digital value and arrive random telephone signal number between " 9 " at integer " 0 ", its length is the length that step 304 generates, and the telephone number of generation is stored under the corresponding classification.
Step 306, judge whether to be then to enter step 307 for all telephone class under this telephony recording generated telephone number; Otherwise return step 304.
Comprise a plurality of different classes of telephone numbers under a telephony recording in the phone directory of some end product, " move " or the like such as " family " " office ", step 306 is exactly to judge whether all to generate telephone number for all classifications, if not then repeat step 304 to step 305, up to all generating telephone number for all telephone class, telephony recording so far generates.
During practical operation, also can generate telephone number earlier, the name that regeneration is associated with telephone number, that is to say between step 304 to 306 that generates telephone number and the step 301 to 303 that generates name does not have ordinal relation.
Whether the telephony recording bar number that step 307, judgement generate reaches the bar number of demand, if reach, then flow process finishes; If do not reach and then return step 302, the step before repeating continues to generate next bar telephony recording.
Judgement herein can be by manually judging, whether decision continues to generate next bar telephony recording, also can set a numerical value in advance, whether the telephony recording bar number that is generated at this moment by procedure judges this numerical value, if, then expression does not reach the bar number of demand, step before Automatic Program repeats continues to generate next bar telephony recording, otherwise, then expression has reached the bar number of demand, and flow process finishes.
The method embodiment that more than generates phone directory recording can adopt any program language or script to realize, and the software of realizing the method embodiment of above-mentioned generation phone directory recording can be stored in computer or other storage mediums that can read, and conveniently uses and sells.
The device example structure of generation phone directory recording provided by the invention comprises generation unit 401 and judging unit 402 as shown in Figure 4:
Generation unit 401 is used to generate name at random, generates the random telephone signal number, and described name and described telephone number constitute a telephony recording.
Generation unit 401 generates the basically identical of describing among the method embodiment of the process of name and random telephone signal number at random and generation phone directory recording provided by the invention, is not described in detail in this.
Judging unit 402 is used to judge whether the telephony recording bar number of generation unit generation reaches the bar number of demand; Do not reach and then control generation unit 401 next bar telephony recording of continuation generation; The telephony recording bar number that generates up to generation unit reaches the bar number of demand, finishes the generation phone directory recording.
Comprise a plurality of different classes of telephone numbers under a telephony recording in the phone directory of some end product, " move " or the like such as " family " " office ", judging unit 402 also is used to judge whether this moment be that all telephone class generated telephone number under the telephony recording; Be to judge then whether the telephony recording bar number of generation reaches the bar number of demand; Otherwise control generation unit 401 continues to generate the random telephone signal number.
The device that generates phone directory recording in actual the use can be the personal computer of using always (PC), also can be other instrument with computer function.
The method embodiment of test terminal provided by the invention phone directory is applicable to the situation that terminal can communicate with the device of generation phone directory recording, if the terminal that can not communicate with the device of generation phone directory recording, when implementing present embodiment, then need increase diagnosis (DIAG) protocol interface of a read-write phone directory recording in terminal, terminal can be communicated with the device that generates phone directory recording by the data wire of common Serial Port Line, USB (USB) line or other form.Here the device that generates phone directory recording can be the PC that uses always, it also can be other instrument with computer function, but being most widely used with PC when using usually, terminal can be mobile phone, data card, PDA, e-dictionary, fixed station or the like, but it is comparatively commonly used with mobile phone again in these terminals, so will be PC with the device that generates phone directory recording herein, terminal be that to be example be described in detail the method embodiment of test terminal phone directory mobile phone.
The method embodiment one of test terminal provided by the invention phone directory, generate phone directory recording earlier, and then phone directory recording imported terminal, and being used for terminal is tested, the method embodiment that wherein generates the method for phone directory recording and generation phone directory recording mentioned above is in full accord.
Method embodiment one flow process of test terminal provided by the invention phone directory is as shown in Figure 5:
Step 501, on PC, generate phone directory recording.
Owing to the method embodiment of method that generates phone directory recording here and generation phone directory recording mentioned above is in full accord, so no longer be described in detail.
If to the type of name in the phone directory recording, the character length of name, the type of telephone number and number of types, the length of telephone number specific (special) requirements arranged, all to set in this step.
For example need to check the phone directory recording ordering situation of pure Chinese Name, the longest permission character length is " 5 ", just the parameter of name is decided to be Chinese herein, the longest permission character length is " 5 ", program can automatically perform the method embodiment two of generation phone directory recording as indicated above, generating name is the phone directory recording method of Chinese Name at random, and setting the longest permission character length is " 5 ".
Check if desired and comprise the certain proportion Chinese Name, the certain proportion english name, the phone directory recording ordering situation of the multiple character mixing of certain proportion name, then generate the Chinese Name phone directory recording of a designated telephone record strip number respectively, the english name phone directory recording of a designated telephone record strip number, multiple character mixing name phone directory recording with a designated telephone record strip number, these three phone directory recordings combine and just become one and comprise the certain proportion Chinese Name, the certain proportion english name, the phone directory recording of the multiple character mixing of certain proportion name.
A telephony recording of Ce Shi mobile phone phone directory can be write down the telephone number of a plurality of types down if desired, " moves " and so on as " family " " office ", then also will set in this step.
Step 502, phone directory recording is imported terminal's contact book.
With the mobile phone is example, before phone directory recording is imported the mobile phone phone directory, use data wire that PC and mobile phone are coupled together earlier, uses write command that the phone directory recording that generates in the step 501 is all write the mobile phone phone directory then.
Because general mobile phone all has more than one memory can be used for the store electricity script for story-telling, client identification module (Subscriber Identity Model for example, SIM) card or internal memory, so also need to select the position of storing herein, if the test to as if SIM card in phone directory, then select to write SIM card, if test to as if the mobile phone internal memory in phone directory, then select to write internal memory.
Step 503, terminal's contact book is tested.
Still be example with the mobile phone, the conventionally test of mobile phone phone directory generally had: capacity, ordering, deletion, modification, interpolation or the like.
Test the capacity of mobile phone phone directory if desired, then when carrying out step 501, the telephony recording bar number of demand is decided to be numerical value more than or equal to mobile phone phone directory heap(ed) capacity, only need check the mobile phone phone directory this moment, look at whether the telephony recording bar number that deposits in reaches the upper limit and get final product, reach and represent that then capacity is correct, do not meet or exceed and then represent the capacity mistake.
Test the ordering situation of mobile phone phone directory if desired, check directly then whether the ordering situation meets the ordering rule of mobile phone phone directory.
Test other operations such as deletion, modification, interpolation if desired, then can directly on the mobile phone phone directory, carry out corresponding operating, because these operations are all very simple, in the mobile phone phone directory, had under the situation of record, can not increase the weight of artificial burden, wherein the operation of Tian Jiaing also can be by generating one or more telephony recording on PC, and the method that imports the mobile phone phone directory by this method realizes.
Method embodiment two flow processs of test terminal provided by the invention phone directory are as shown in Figure 6:
Step 601, random telephone signal record of generation.
Generating random telephone signal record comprises and generates name and random telephone signal number two parts at random, generate the method for name at random that is associated under the telephony recording and random telephone signal number and above generate the basically identical of describing among the method embodiment of phone directory recording.
Set the type of name, the character length of name, the type of telephone number and number of types, the length of telephone number selects corresponding method to generate name and random telephone signal number at random.
Step 602, the random telephone signal record that generates is imported terminal's contact book.
With the mobile phone is example, before phone directory recording is imported the mobile phone phone directory, use data wire that PC and mobile phone are coupled together earlier, uses write command that the telephony recording that generates in the step 601 is write the mobile phone phone directory then.
Because general mobile phone all has more than one memory can be used for the store electricity script for story-telling, for example SIM card or internal memory, so also need to select the position of storing herein, if the test to as if SIM card in phone directory, then select to write SIM card, if test to as if the mobile phone internal memory in phone directory, then select to write internal memory, the action of this selection only need be carried out once, the selection before can using automatically when the telephony recording that writes the back.
Whether the telephony recording bar number that step 603, judgement generate reaches the bar number of demand, if reach, then enters step 604; If do not reach, then return step 601.
Judgement herein can be by manually judging, whether decision continues to generate next bar telephony recording, also can set a numerical value in advance, whether the telephony recording bar number that is generated at this moment by procedure judges is less than this numerical value, if less than, represent that then the bar number of the demand that do not reach then returns step 601 generation and imports next bar random telephone signal record, otherwise, then expression has reached the bar number of demand, enters step 604.
Step 604, terminal's contact book is tested.
Still be example with the mobile phone, the conventionally test of mobile phone phone directory generally had: capacity, ordering, deletion, modification, interpolation or the like.
Test the capacity of mobile phone phone directory if desired, then the telephony recording bar number of demand is decided to be numerical value more than or equal to mobile phone phone directory heap(ed) capacity, only need check the mobile phone phone directory this moment, look at whether the telephony recording bar number that deposits in reaches the upper limit and get final product, reach and represent that then capacity is correct, do not meet or exceed and then represent the capacity mistake.
Test the ordering situation of mobile phone phone directory if desired, check directly then whether the ordering situation meets the ordering rule of mobile phone phone directory.
Test other operations such as deletion, modification, interpolation if desired, then can directly on the mobile phone phone directory, carry out corresponding operating, because these operations are all very simple, in the mobile phone phone directory, had under the situation of record, can not increase the weight of artificial burden, wherein the operation of Tian Jiaing also can be by generating one or more telephony recording on PC, and the method that imports the mobile phone phone directory by this method realizes.
The system embodiment of test terminal provided by the invention phone directory is equally applicable to the situation that terminal can communicate with the device of generation phone directory recording, if the terminal that can not communicate with the device of generation phone directory recording, when implementing present embodiment, then need increase diagnosis (DIAG) protocol interface of a read-write phone directory recording in terminal, terminal can be communicated with the device that generates phone directory recording by the data wire of common Serial Port Line, USB (USB) line or other form.
The system embodiment structure of test terminal provided by the invention phone directory comprises the device 701 and the terminal 702 that generate phone directory recording as shown in Figure 7, and both link to each other by data wire.
The device 701 that generates phone directory recording is used to generate phone directory recording, and the phone directory recording that generates is imported terminal 702.
Terminal 702 is used to receive the phone directory recording that the device 701 that generates phone directory recording writes, and tests.
The method embodiment of the concrete working method of the system embodiment of test terminal provided by the invention phone directory and test terminal mentioned above phone directory is identical, is not described in detail in this.
Because above description as can be known, the application of the invention only needs manpower to carry out the setting of some parameters, has greatly saved manpower, and because name and telephone number all generate at random, has randomness and comprehensive, and what can guarantee to test is comprehensive.
The present invention is directed to the characteristic of Chinese Name simultaneously, provided the method that generates Chinese Name especially, more can cover the situation that can occur in the reality to guarantee the Chinese Name phone directory that generates.
More than a kind of method, system that generates method, device and a kind of test terminal phone directory of phone directory recording provided by the present invention is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (16)

1. a method that generates phone directory recording is characterized in that, described method comprises:
Generate name at random, generate the random telephone signal number, described name and described telephone number constitute a telephony recording;
Judge whether the telephony recording bar number that generates reaches the bar number of demand;
Do not reach and then continue to generate next bar telephony recording, and continue to carry out and judge whether the telephony recording bar number that generates reaches the step of the bar number of demand;
Reach and then finish the generation phone directory recording, flow process finishes.
2. the method for generation phone directory recording as claimed in claim 1 is characterized in that, described generation name at random is:
Set name character source; Generate name length at random; Generating length according to described character source is the name at random of the described length of name at random.
3. the method for generation phone directory recording as claimed in claim 1 is characterized in that, described generation name at random is:
Set the surname character source of name, and the name character of name source is Chinese character; Generate surname length at random, reach length of name at random; Generate surname at random according to the surname character of described name source and the described length of surname at random, generate name at random according to the name character source and the described length of name at random of described name, described surname at random and at random name constitute Chinese Name at random.
4. the method for generation phone directory recording as claimed in claim 1 is characterized in that, described method also comprises after generating the random telephone signal number:
Judge whether to generate telephone number for all telephone class under the described telephony recording;
Be to judge then whether the telephony recording bar number of generation reaches the bar number of demand;
Otherwise continue to generate the random telephone signal number.
5. as the method for claim 1,2,3 or 4 described generation phone directory recordings, it is characterized in that described generation random telephone signal number is:
Generate the random telephone signal number length; Generating length is the random telephone signal number of described random telephone signal number length.
6. a device that generates phone directory recording is characterized in that, described device comprises generation unit and judging unit:
Generation unit is used to generate name at random, generates the random telephone signal number, and described name and described telephone number constitute a telephony recording;
Judging unit is used to judge whether the telephony recording bar number of generation unit generation reaches the bar number of demand; Do not reach and then control next bar telephony recording of generation unit continuation generation; Reach and then finish the generation phone directory recording.
7. the device of generation phone directory recording as claimed in claim 6 is characterized in that, described generation unit is used to generate at random that name is:
Described generation unit is used to set name character source; Generate name length at random; Generating length according to described character source is the name at random of the described length of name at random.
8. the device of generation phone directory recording as claimed in claim 7 is characterized in that, described judging unit also is used for: judge whether to generate telephone number for all telephone class under the described telephony recording; Be to judge then whether the telephony recording bar number of generation reaches the bar number of demand; Otherwise the control generation unit continues to generate the random telephone signal number.
9. as the device of claim 6,7 or 8 described generation phone directory recordings, it is characterized in that described generation unit is used to generate the random telephone signal number and is:
Described generation unit is used to generate the random telephone signal number length; Generating length is the random telephone signal number of described random telephone signal number length.
10. the method for a test terminal phone directory is characterized in that, described method comprises:
Generate name at random, generate the random telephone signal number, described name and described telephone number constitute a telephony recording; The bar that the telephony recording bar number that generates does not reach demand continues to generate next bar telephony recording when counting, and described telephony recording is imported terminal's contact book; Begin terminal's contact book is tested reach the bar number of demand at the telephony recording bar number that imports after.
11. the method for test terminal as claimed in claim 10 phone directory is characterized in that, described described telephony recording is imported terminal's contact book after the telephony recording bar number that generates reaches the bar number of demand, or generates after the telephony recording.
12. the method for test terminal as claimed in claim 10 phone directory is characterized in that, described generation name at random is:
Set name character source; Generate name length at random; Generating length according to described character source is the name at random of the described length of name at random.
13. the method for test terminal as claimed in claim 10 phone directory is characterized in that, described method also comprises after generating the random telephone signal number:
When existence in the described telephony recording did not generate the telephone class of telephone number, continue as described telephony recording and generate the random telephone signal number.
14. the method as claim 10,11,12 or 13 described test terminal phone directories is characterized in that, described generation random telephone signal number is:
Generate the random telephone signal number length; Generating length is the random telephone signal number of described random telephone signal number length.
15. the system of a test terminal phone directory is characterized in that, described system comprises device and the terminal that generates phone directory recording:
The device that generates phone directory recording is used to generate name at random, generates the random telephone signal number, and described name and described telephone number constitute a telephony recording; The bar that the telephony recording bar number that generates does not reach demand continues to generate next bar telephony recording when counting, and described telephony recording is imported terminal's contact book;
Terminal is used for terminal's contact book is tested.
16. the system of test terminal as claimed in claim 15 phone directory is characterized in that, the device of described generation phone directory recording also is used for continuing to generate the random telephone signal number when not generating telephone number for all telephone class under the described telephony recording.
CNB200610168247XA 2006-12-28 2006-12-28 Method and device for generating the phone directory recording and the test method and system of the phone directory Expired - Fee Related CN100461801C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200610168247XA CN100461801C (en) 2006-12-28 2006-12-28 Method and device for generating the phone directory recording and the test method and system of the phone directory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200610168247XA CN100461801C (en) 2006-12-28 2006-12-28 Method and device for generating the phone directory recording and the test method and system of the phone directory

Publications (2)

Publication Number Publication Date
CN101009727A CN101009727A (en) 2007-08-01
CN100461801C true CN100461801C (en) 2009-02-11

Family

ID=38697843

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200610168247XA Expired - Fee Related CN100461801C (en) 2006-12-28 2006-12-28 Method and device for generating the phone directory recording and the test method and system of the phone directory

Country Status (1)

Country Link
CN (1) CN100461801C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664398A (en) * 2018-05-09 2018-10-16 平安普惠企业管理有限公司 Test data generating method, device, computer equipment and storage medium
CN108897525A (en) * 2018-05-30 2018-11-27 平安普惠企业管理有限公司 Test data generating method, device, computer equipment and storage medium
CN109327348A (en) * 2018-08-13 2019-02-12 深圳市佰仟金融服务有限公司 A kind of test data generating method, device, server and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1263404A (en) * 1999-02-12 2000-08-16 英业达集团(南京)电子技术有限公司 Device and method for automatically establishing telephone number directory information
CN1678099A (en) * 2004-03-31 2005-10-05 乐金电子(中国)研究开发中心有限公司 Telephone number information generation and storage method of mobile communication terminal
US20060235878A1 (en) * 2005-04-14 2006-10-19 Microsoft Corporation Client side indexing of offline address book files

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1263404A (en) * 1999-02-12 2000-08-16 英业达集团(南京)电子技术有限公司 Device and method for automatically establishing telephone number directory information
CN1678099A (en) * 2004-03-31 2005-10-05 乐金电子(中国)研究开发中心有限公司 Telephone number information generation and storage method of mobile communication terminal
US20060235878A1 (en) * 2005-04-14 2006-10-19 Microsoft Corporation Client side indexing of offline address book files

Also Published As

Publication number Publication date
CN101009727A (en) 2007-08-01

Similar Documents

Publication Publication Date Title
Bergstra et al. Handbook of process algebra
CN103167172B (en) Integration method and system for variety of chat records
CN107807982B (en) Consistency checking method and device for heterogeneous database
CN102760096B (en) The generation method of test data, unit test method and unit test system
CN101499065B (en) Table item compression method and device based on FA, table item matching method and device
CN104346435A (en) Methods, apparatus and systems for data sorting, visualisation and related applications
CN104850498B (en) A kind of filling information method of testing and system
CN100461801C (en) Method and device for generating the phone directory recording and the test method and system of the phone directory
CN103249015A (en) Short message combination method and device
CN108628738A (en) The generation method and device of application programming interface test case
CN108984393A (en) A kind of unit testing code automatic generation method and device
CN106528896A (en) Database optimization method and apparatus
CN106445815A (en) Automated testing method and device
CN103002103A (en) Short message group sending method and device
CN1996375A (en) Method and device for implementing transaction test in host environment
CN110221960A (en) Generate method and device, the computer equipment, storage medium of test case
CN104951482B (en) A kind of method and device of the image file of operation Sparse formats
CN111309619A (en) Method and device for automatically generating test case
CN108415668A (en) Chip motivational techniques, device, system, computer equipment and storage medium
CN108829051B (en) Method and device for simulating DCS avalanche working condition
CN100411468C (en) Method of deleting short messages in mobile communication terminal
CN100357952C (en) Binary data access method
de Figueiredo et al. Generating interaction test cases for mobile phone systems from use case specifications
CN101304573A (en) Method for importing, leading-out and editing mobile phone telephone directory
CN101217385B (en) A method and system for the temporary storage and treatment of charging bill

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090211