Summary of the invention
The problem that the present invention solves is the mobile terminal test that is implemented under the real network environment.
For addressing the above problem; The embodiment of the invention provides a kind of method of testing of portable terminal; Be used under real network environment, portable terminal to be measured being carried out automatic test; Comprise: testing equipment operation and the corresponding test script of said portable terminal to be measured, the interface channel between foundation and the said portable terminal to be measured; The test command that the said test script of operation is generated sends to said portable terminal to be measured through said interface channel; Receive data through said interface channel, said data are analyzed, to verify said portable terminal to be measured execution result to said test command under real network environment from portable terminal to be measured.
Alternatively; Be provided with the port information of portable terminal to be measured in the said test script, said foundation specifically comprises with interface channel between the said portable terminal to be measured: said testing equipment according to said port information set up with portable terminal to be measured between port be connected.
Alternatively, said port connect that port between the port communication instrument that comprises portable terminal to be measured and testing equipment is connected and the processing unit of said port communication instrument and testing equipment between port be connected.
Alternatively, said test command is the testing equipment analysis and changes the test instruction of said test script and order that the portable terminal to be measured that forms can be discerned; Wherein, be to carry out to the test instruction conversion in the test script according to the dll file that loads in the testing equipment with portable terminal coupling to be measured.
Alternatively, the order that can discern of said portable terminal to be measured is meant the order that the protocol stack monitoring entity of portable terminal to be measured can be discerned.
Alternatively, said data from portable terminal to be measured comprise the message that portable terminal to be measured is handled when carrying out said test command.
Alternatively, the message when carrying out said test command, handled of said portable terminal to be measured comprises the information that the protocol stack monitoring entity of portable terminal to be measured is caught.
Alternatively, the message when carrying out said test command, handled of said portable terminal to be measured also comprises and portable terminal to be measured is carried out the relevant idle message that comes automatic network of test command.
Alternatively, said data from portable terminal to be measured are that mode with code stream is transferred to processing unit by the port communication instrument in testing equipment inside.
Alternatively, the test command that said operation test script generates also comprises the test command of the signal that the network survey of indication portable terminal adjustment to be measured in real network environment reports, with the required test scene of structure in real network environment.
Alternatively, said test scene comprises that switch the sub-district or the scene of district reselecting.
Alternatively, the connection between testing equipment foundation and the auxiliary moving terminal sends instructions under said auxiliary moving terminal when test needs, with auxiliary test to portable terminal to be measured.
Alternatively, the connection between the said and auxiliary moving terminal is that serial ports connects, and the said instruction that issues to said auxiliary moving terminal is the AT instruction.
A kind of testing equipment is suitable under real network environment, portable terminal to be measured being tested; Comprise test script, processing unit and be suitable for setting up said processing unit and said portable terminal to be measured between the port communication instrument of connection;
Wherein, said processing unit is used to move and the corresponding test script of said portable terminal to be measured, generates test command and sends to said portable terminal to be measured through said interface channel; And, said data are analyzed, to verify said portable terminal to be measured execution result to said test command under real network environment through the data of said interface channel reception from portable terminal to be measured.
Alternatively, said processing unit comprises: the script resolver is used to resolve said test script to generate test command; Data-analyzing machine is used for the data from portable terminal to be measured are analyzed, with the checking execution result.
Alternatively; Also comprise the dll file memory cell; Be used to store the dll file that matees with portable terminal to be measured; With the test command that auxiliary said script resolver becomes said portable terminal to be measured to discern the instruction transformation in the test script, auxiliary said data-analyzing machine is analyzed the data from portable terminal to be measured.
Alternatively, the test instruction in the said test script comprises that test command that termination function to be measured is tested, the network of indication terminal adjustment to be measured in real network environment survey the test command of the signal that reports.
Alternatively, also comprise the serial ports that is suitable for connecting the auxiliary moving terminal, said processing unit also is used to control the auxiliary moving terminal.
A kind of test macro of portable terminal comprises portable terminal to be measured and said testing equipment.
Alternatively, said portable terminal to be measured comprises protocol stack monitoring entity and message processing module; Wherein said protocol stack monitoring entity is used for that the message processing module that is suitable for handling this test instruction is distributed in said test instruction to be handled, and the processing messages of said message processing module is fed back to the processing unit of said testing equipment through said port communication instrument.
Alternatively, also comprise the auxiliary moving terminal, be used for auxiliary test under the control of said testing equipment said portable terminal to be measured.
Compared with prior art, the present technique scheme has following beneficial effect: at first, and through the testing equipment operation test script corresponding, the interface channel between foundation and the said portable terminal to be measured with portable terminal to be measured; Then, the test command that the said test script of operation is generated sends to said portable terminal to be measured through said interface channel; And, said data are analyzed, to verify said portable terminal to be measured execution result to said test command under real network environment through the data of said interface channel reception from portable terminal to be measured.The present technique scheme has realized in real network environment, portable terminal to be measured being carried out automatic test, has saved testing cost, has improved testing efficiency.
In specific embodiment; Test command through test script generates indicates the network of portable terminal adjustment to be measured in real network environment to survey the test command of the signal that reports; With the required test scene of structure in real network environment; Thereby make the tester need not spend the plenty of time and seek different test scenes, improved testing efficiency, also enlarged test specification simultaneously.
In specific embodiment; Also connected in series through one or more auxiliary moving terminal and testing equipment; The instruction that acceptance test equipment sends assists portable terminal to be measured to accomplish the test of multiple operation format; The for example test of MPTY, caller each other and operation format such as called, thus the test effect of portable terminal to be measured improved.
Embodiment
The inventor finds in the method for testing of existing portable terminal, all is each item performance that reaches testing mobile phone by means of network simulation instrument analog network environment usually, and testing cost is higher; And compare with real network environment, the network environment of simulation is relatively stable, and real network environment is complicated more, the just test result under perfect condition that is therefore obtaining under the analog network environment.
On the other hand; Based on the mobile phone test under the real network environment; Then need usually through operation manually; Fix a point or situation of movement mobile phone test down, the subjective sensation that so only relies on the tester judges whether portable terminal moves correctly, can't be in time, the assignment test problem belongs to exactly.
To the problems referred to above, technical scheme of the present invention provides a kind of method of testing of portable terminal, is implemented under the real network environment portable terminal to be measured is carried out automatic test.On this basis; Test command through test script generates indicates the network of portable terminal adjustment to be measured in real network environment to survey the test command of the signal that reports; With the required test scene of structure in real network environment; Thereby make the tester need not spend the plenty of time and seek different test scenes, improved testing efficiency.
Further; Also connected in series through one or more auxiliary moving terminal and testing equipment; The instruction that acceptance test equipment sends assists portable terminal to be measured to accomplish the test of multiple communication mode; The for example test of MPTY, caller each other and communication mode such as called, thus the test effect of portable terminal to be measured improved.
For make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, does detailed explanation below in conjunction with the accompanying drawing specific embodiments of the invention.
The sketch map of the automatization test system of a kind of portable terminal of the embodiment of the invention that as shown in Figure 1 is.With reference to figure 1, said automatization test system comprises testing equipment 10, portable terminal to be measured 20 and auxiliary moving terminal 301,302.Said testing equipment 10 is connected with said portable terminal to be measured 20, auxiliary moving terminal 301,302 respectively through interface channel, said portable terminal 20 to be measured and auxiliary moving terminal 301, can be implemented in the radio communication under the real network environment through base station 40 between 302.Need to prove, in practical application, do not limit the number at said auxiliary moving terminal, those skilled in the art can confirm the number at required auxiliary moving terminal according to the test needs.
Said testing equipment 10 is used under real network environment, said portable terminal 20 to be measured being tested.Particularly; Issue test command through said testing equipment 10 to said portable terminal 20 to be measured; Said portable terminal to be measured 20 receives and carries out said test command; Carry out the processing messages of said test command then to said testing equipment 10 feedbacks, said testing equipment 10 is verified the execution result of 20 pairs of said test commands of said portable terminal to be measured according to the processing messages of said feedback.
Further; Said testing equipment 10 issues to said portable terminal 20 to be measured and also comprises the test command of indicating the network of portable terminal 20 adjustment to be measured in real network environment to survey the signal that reports in the test command; With the required test scene of structure in real network environment, said test scene comprises scenes such as sub-district switching, district reselecting.Correspondingly, said testing equipment 10 will be verified the execution result of 20 pairs of said test commands of said portable terminal to be measured according to the processing messages of said portable terminal 20 feedbacks to be measured.
Further, said testing equipment 10 can also send instructions for 301,302 times to said auxiliary moving terminal, with auxiliary test to said portable terminal 20 to be measured.Through said auxiliary moving terminal 301,302 can realize and said portable terminal to be measured 20 between MPTY, caller each other and the test of operation format such as called.
Describe test macro, testing equipment and the method for testing of a kind of portable terminal of the embodiment of the invention in detail below in conjunction with accompanying drawing.
The schematic flow sheet of the embodiment of the method for testing of at first, as shown in Figure 2 the is described a kind of portable terminal of the embodiment of the invention.With reference to figure 2, the method for testing of said portable terminal comprises:
Execution in step S1: testing equipment operation and the corresponding test script of said portable terminal to be measured, the interface channel between foundation and the said portable terminal to be measured.
Particularly; Said test script is meant and is used for a series of instructions that portable terminal to be measured is tested; These instructions can read and move by equipment to be tested, and said test script can be created or the use test automation tools generates automatically, or accomplish through the Script Programming Programming with Pascal Language.
Further; Be provided with the port information of said portable terminal to be measured in the said test script; Said testing equipment can be confirmed the portable terminal to be measured that is connected with said testing equipment through reading said port information, thus set up and said portable terminal to be measured between interface channel.
Wherein, Set up with said portable terminal to be measured between interface channel comprise: said testing equipment is connected with port between the portable terminal to be measured according to said port information foundation; Wherein said port connects and can be connected through serial ports; For example, be connected through USB (Universal Serial BUS, USB) interface.Said port connect that port between the port communication instrument that also comprises portable terminal to be measured and testing equipment is connected and the processing unit of said port communication instrument and testing equipment between port be connected.Wherein, The test command that said port communication instrument is used for test script is generated in the follow-up test process is issued to said portable terminal to be measured through the processing unit of said testing equipment, and obtains the processing unit that feeds back to said testing equipment from the data of said portable terminal to be measured.
Further, said testing equipment can also set up and the auxiliary moving terminal between connection, when test needs, under said auxiliary moving terminal, send instructions, with auxiliary test to portable terminal to be measured.Alternatively, the connection between the wherein said and auxiliary moving terminal is that serial ports connects, and the said instruction that issues to said auxiliary moving terminal can be the AT instruction.Wherein, said AT instruction is the character string with the AT beginning, and this character string comprises the indication information that concrete operations are carried out at the said auxiliary moving of indication terminal, and correspondingly, the corresponding processing will be carried out after receiving the AT instruction in said auxiliary moving terminal.Need to prove,, enlarged the range of choice at said auxiliary moving terminal like this because existing portable terminal is basically all supported the AT instruction.In embodiments of the present invention, said testing equipment can connect one or more said auxiliary moving terminal, correspondingly, in said testing equipment, is arranged at serial ports that said auxiliary moving terminal number is complementary and connects and get final product.
Those skilled in the art will appreciate that the instruction that testing equipment issues to the auxiliary moving terminal need be the instruction that the auxiliary moving terminal can be discerned, its way of realization can be confirmed with situation according to the actual requirements.Be not limited to the above-mentioned AT instruction of mentioning.
Execution in step S2: the test command that will move said test script generation sends to said portable terminal to be measured through said interface channel.
Particularly, said test command is the testing equipment analysis and changes the test instruction of said test script and order that the portable terminal to be measured that forms can be discerned.
Need to prove; Because the data structure and the data format of its inner transmission/reception of different portable terminals to be measured are all inequality, the test instruction of generation need change into according to different portable terminals to be measured and be suitable for the test instruction that this portable terminal to be measured receives after therefore said testing equipment was resolved said test script.In other words, said testing equipment need change into the test instruction that generates and be suitable for data structure and the data format that portable terminal to be measured receives.
Alternatively, be to carry out wherein according to DLL (Dynamic Link Library, the dynamic link library) file that loads in the testing equipment with portable terminal coupling to be measured to the test instruction conversion in the test script.Wherein said dll file is a kind of data structure file, after said testing equipment has been loaded the dll file that matees with portable terminal to be measured, just can said test instruction be changed into data structure and the data mode that is suitable for said portable terminal reception to be measured.Said dll file can be loaded on the said testing equipment in advance, also can be according to different portable terminals to be measured, and said testing equipment is downloaded the dll file that is complementary with said portable terminal to be measured in real time, but in practical application, is not limited to said method.
Further, the order that can discern of said portable terminal to be measured is meant the order that the protocol stack monitoring entity of portable terminal to be measured can be discerned.Wherein said protocol stack monitoring entity is the internal module of said portable terminal to be measured, is used for communicating process, controls and catch the inner processing messages of said portable terminal to be measured.In embodiments of the present invention, said protocol stack monitoring entity also is used for the inner processing messages of portable terminal said to be measured that gets access to is fed back to said testing equipment.
Execution in step S3: receive data through said interface channel, said data are analyzed, to verify said portable terminal to be measured execution result to said test command under real network environment from portable terminal to be measured.
In embodiments of the present invention; Said data from portable terminal to be measured comprise the message that portable terminal to be measured is handled when carrying out said test command, the message that wherein said portable terminal to be measured is handled when carrying out said test command comprises the information that the protocol stack monitoring entity of said portable terminal to be measured is caught.Alternatively, in the invention present embodiment, said data from portable terminal to be measured are that the mode with code stream is transferred to processing unit by the port communication instrument in testing equipment inside.
Particularly; For example; At first, the test command that said testing equipment is handed down to portable terminal to be measured can be the dialing request instruction, when said portable terminal to be measured is carried out said test command; It is inner begins to carry out the call flow process, and so said protocol stack monitoring entity can capture the message of " altering (ring-back tone) "; Then; The message that said protocol stack monitoring entity will capture " altering " feeds back to said testing equipment through said interface channel; Said testing equipment is analyzed this message, to verify said portable terminal to be measured execution result to said test command under real network environment.
Further, the message when carrying out said test command, handled of said portable terminal to be measured also comprises and portable terminal to be measured is carried out the relevant idle message that comes automatic network of test command.Particularly, said idle message is meant interface (for example Um Interface, the Uu interface etc.) message between said portable terminal to be measured and the base station.When said portable terminal to be measured when carrying out test command, need through and the base station between the interface transmitting-receiving of carrying out message accomplish test command, therefore said protocol stack monitoring entity will obtain the idle message of automatic network.
Can realize the automatic test of portable terminal according to the method for testing of the said portable terminal of the invention described above embodiment.
On this basis; Further; In said step S2, the test command that said operation test script generates also comprises the test command of the signal that the network survey of indication portable terminal adjustment to be measured in real network environment reports, with the required test scene of structure in real network environment.
Be the automatic test of in real network environment, fixing a point in embodiments of the present invention, therefore the position relative fixed of said portable terminal to be measured is constant, and the probability that test scenes such as sub-district switching, district reselecting take place is less relatively.To this problem; Owing to can't realize that the sub-district is switched or test scenes such as district reselecting through the position of moving said portable terminal to be measured, so the method for testing that provides of the embodiment of the invention can be through being provided with test command that the network of indication portable terminal adjustment to be measured in real network environment survey the signal that reports with the required test scene of structure in real network environment in test script.Alternatively, said test scene comprises that switch the sub-district or the scene of district reselecting.
Particularly, for example, to test whether the said portable terminal to be tested execution result that switch the sub-district in communication process successfully is example.At first, resolve said test script through the processing unit in the said testing equipment and generate the dialing request instruction, and change the test instruction (calling) that the protocol stack monitoring entity of said portable terminal to be measured is suitable for receiving like analogue-key.Correspondingly; Said portable terminal to be measured is carried out the call flow process after receiving said test instruction; And the message of catching processing through its inner protocol stack monitoring entity is (like Alerting message; Be ring-back tone message) after, feeding back to said testing equipment, the processing unit of said testing equipment receives after the processing messages of feedback " going code " (this instruction is instructed with the AT that is suitable for said auxiliary moving terminal and receives and issued) is sent at said auxiliary moving terminal.Said portable terminal to be measured is put through according to said instruction in said auxiliary moving terminal, and this moment, said protocol stack monitoring entity continued to catch the processing messages of said portable terminal to be measured, if capture the message of " conversation carry out in ", then confirms and should conversation set up successfully.
Further; When said processing unit receives after the network of indication portable terminal to be measured adjustment in real network environment survey the test script of the signal that reports, equally it is resolved to the test instruction that the protocol stack monitoring entity that is suitable for said portable terminal to be measured receives.Correspondingly; Said protocol stack monitoring entity indicates the inner message processing module (like digital signal processing module) of said portable terminal to be tested on the basis of actual measured value, to turn down the value of reporting of the signal value of current persistent district; Heighten the value of reporting of neighboring area signal simultaneously; And the step-length of each adjustment can be provided with, thereby reaches the purpose of switching; After adjustment was accomplished, said portable terminal to be measured can report adjusted data to give network terminal, waits for the switching command of network terminal; Catch the inner switching flow of said portable terminal to be measured through said protocol stack monitoring entity then whether said testing equipment takes place and feed back to, switch not success, then repeat said process like the sub-district.
Then, after said protocol stack monitoring entity captures the inner handover success message of said portable terminal to be measured, then be uploaded to the processing unit of said testing equipment through said interface channel.After said processing unit receives the message of handover success; Begin to check whether the current state of said portable terminal to be measured keeps (being whether talking state keeps); Similarly, issue test command, catch the inner processing messages of said portable terminal to be measured through the protocol stack monitoring entity through said processing unit; If capture the message of " keeping conversation "; The conversation of then confirming said portable terminal to be measured still keeps, and gives the processing unit of said testing equipment with the message feedback of catching, thereby accomplishes test.
Further, the embodiment of the invention also provides a kind of testing equipment, and said testing equipment is suitable under real network environment, portable terminal to be measured being tested.
Shown in Fig. 3 a is the structural representation of first embodiment of a kind of testing equipment provided by the invention.With reference to figure 3a, said testing equipment 1 comprises test script 11, processing unit 12, is suitable for setting up the port communication instrument 13 and the dll file memory cell 14 of the connection between said processing unit and the said portable terminal to be measured.
Wherein, said processing unit 12 also comprises script resolver 121, is used to resolve said test script to generate test command; Data-analyzing machine 122 is used for the data from portable terminal to be measured are analyzed, with the checking execution result.Particularly, said processing unit 12 is used to move and the corresponding test script 1 of said portable terminal (not shown) to be measured, generates test command and sends to said portable terminal to be measured through said interface channel; And, said data are analyzed, to verify said portable terminal to be measured execution result to said test command under real network environment through the data of said interface channel reception from portable terminal to be measured.
Wherein, Said dll file memory cell 14 is used to store the dll file that matees with portable terminal to be measured; With the test command that auxiliary said script resolver 121 becomes said portable terminal to be measured to discern the instruction transformation in the test script, auxiliary 122 pairs of data from portable terminal to be measured of said data-analyzing machine are analyzed.
Further; Test instruction in the said test script 11 also comprises the test command of the signal that the network survey of the said terminal to be measured adjustment of indication in real network environment reports; With the required test scene of structure in real network environment, wherein said test scene comprises sub-district switching, district reselecting etc.The practical implementation process can not given unnecessary details at this with reference to the description in the method for testing of figure 2 described portable terminals.
Need to prove, test, do not need the assistance at auxiliary moving terminal through 1 pair of portable terminal to be measured of the described testing equipment of present embodiment.Further, when needs auxiliary moving terminal assisted said portable terminal to be measured to test, said testing equipment also comprised the serial ports that is used to connect said auxiliary moving terminal.
Particularly, the structural representation of second embodiment of a kind of testing equipment provided by the invention shown in Fig. 3 b.With reference to figure 3b, said testing equipment 1 ' comprise test script 11 ', processing unit 12 ', be suitable for setting up the port communication instrument 13 of the connection between said processing unit and the said portable terminal to be measured ', dll file memory cell 14 '.Different with first embodiment is, said testing equipment 1 also comprise the serial ports 15 that is suitable for connecting the auxiliary moving terminal ', correspondingly, said processing unit 12 ' also be used to control auxiliary moving terminal.Need to prove, the testing equipment 1 shown in Fig. 3 b ' in only comprise a serial ports 15 ', but in practical application, according to the number at said auxiliary moving terminal, the serial ports that the number at said testing equipment 1 ' will be provided with and said auxiliary moving terminal is complementary.
In the present embodiment, said processing unit 12 ' also comprise script resolver 121 ', be used to resolve said test script to generate test command; Data-analyzing machine 122 ', be used for the data from portable terminal to be measured are analyzed, with the checking execution result.Further, said processing unit 12 ' also be used under said auxiliary moving terminal, sending instructions, the wherein said instruction that issues is the AT instruction, said AT instruction is through the instruction of said script resolver 121 ' said test script of parsing to generate.Particularly, said AT instruction is the character string with the AT beginning, and this character string comprises the indication information that concrete operations are carried out at the said auxiliary moving of indication terminal, and correspondingly, the corresponding processing will be carried out after receiving the AT instruction in said auxiliary moving terminal.Need to prove,, enlarged the range of choice at said auxiliary moving terminal like this because existing portable terminal is basically all supported the AT instruction.
Through said auxiliary moving terminal can realize and said portable terminal to be measured between mutual conversation, caller each other and test scene such as called.Further, when said testing equipment comprises a plurality of serial ports, can also realize the test scene of MPTY through a plurality of auxiliary moving terminal.
The embodiment of the invention also provides the test macro of the portable terminal that comprises the testing equipment shown in above-mentioned Fig. 3 a or Fig. 3 b.
Particularly, as shown in Figure 4 is the structural representation of test macro of a kind of portable terminal of the embodiment of the invention.With reference to figure 4, the test macro of said portable terminal comprise testing equipment 1 ', portable terminal to be measured 2 and auxiliary moving terminal 2 '.Wherein, said testing equipment 1 ' comprise test script 11 ', processing unit 12 ', be suitable for setting up the port communication instrument 13 of the connection between said processing unit and the said portable terminal to be measured ', dll file memory cell 14 and serial ports 15 '.Need to prove, the testing equipment 1 shown in Fig. 4 ' be the testing equipment shown in Fig. 3 b, about said testing equipment 1 ' concrete structure and handling process can not give unnecessary details at this with reference to the description of the foregoing description.
Said portable terminal to be measured 2 comprises protocol stack monitoring entity (not shown) and message processing module (not shown); Wherein said protocol stack monitoring entity is used for that the message processing module that is suitable for handling this test instruction is distributed in test instruction to be handled, and with processing unit 12 through the said testing equipment of said port communication instrument 13 ' feed back to of the processing messages of said message processing module '.
Further; Testing equipment in the test macro of said portable terminal also can be the testing equipment 1 shown in Fig. 3 a; Since do not comprise in the said testing equipment 1 serial ports 15 '; Correspondingly, do not comprise in the test macro of said portable terminal yet auxiliary moving terminal 2 ', not needing to be used for the test of the portable terminal to be measured 2 that the auxiliary moving terminal assists.
In sum; The test macro of method of testing, testing equipment and the portable terminal of the portable terminal that provides through the embodiment of the invention; Realized under real network environment, portable terminal to be measured being carried out automatic test; The test command that generates through test script simultaneously indicates the network of portable terminal adjustment to be measured in real network environment to survey the test command of the signal that reports; With the required test scene of structure in real network environment, seek different test scenes thereby make the tester need not spend the plenty of time, improved testing efficiency.
Though the present invention with preferred embodiment openly as above; But it is not to be used for limiting the present invention; Any those skilled in the art are not breaking away from the spirit and scope of the present invention; Can utilize the method and the technology contents of above-mentioned announcement that technical scheme of the present invention is made possible change and modification, therefore, every content that does not break away from technical scheme of the present invention; To any simple modification, equivalent variations and modification that above embodiment did, all belong to the protection range of technical scheme of the present invention according to technical spirit of the present invention.