Summary of the invention
The problem that the present invention solves is the mobile terminal test of realizing under real network environment.
For addressing the above problem, the embodiment of the present invention provides a kind of method of testing of mobile terminal, for mobile terminal to be measured being carried out to automatic test under real network environment, comprise: the test script that testing equipment operation is corresponding with described mobile terminal to be measured, the interface channel between foundation and described mobile terminal to be measured; The test command that the described test script of operation is generated sends to described mobile terminal to be measured by described interface channel; By described interface channel, receive the data from mobile terminal to be measured, to described data analysis, to verify described mobile terminal to be measured execution result to described test command under real network environment.
Alternatively, in described test script, be provided with the port information of mobile terminal to be measured, described foundation specifically comprises with the interface channel between described mobile terminal to be measured: described testing equipment is connected with the port between mobile terminal to be measured according to described port information foundation.
Alternatively, described port connect that port between the port communication instrument that comprises mobile terminal to be measured and testing equipment is connected and the processing unit of described port communication instrument and testing equipment between port be connected.
Alternatively, described test command is testing equipment analysis and changes the test instruction of described test script and order that the mobile terminal to be measured that forms can be identified; Wherein, to the test instruction conversion in test script, be to carry out according to the dll file mating with mobile terminal to be measured loading in testing equipment.
Alternatively, the order that described mobile terminal to be measured can be identified refers to the order that the protocol stack monitoring entity of mobile terminal to be measured can be identified.
Alternatively, the described data from mobile terminal to be measured comprise the message that mobile terminal to be measured is processed when carrying out described test command.
Alternatively, the message that described mobile terminal to be measured is processed when carrying out described test command comprises the information that the protocol stack monitoring entity of mobile terminal to be measured is caught.
Alternatively, the message that described mobile terminal to be measured is processed when carrying out described test command also comprises to mobile terminal to be measured carries out the idle message that carrys out automatic network that test command is relevant.
Alternatively, the described data from mobile terminal to be measured are that mode with code stream is transferred to processing unit by port communication instrument in testing equipment inside.
Alternatively, the test command that described operation test script generates also comprises the test command of the signal that indication mobile terminal adjustment to be measured reports to the network survey in real network environment, to construct required test scene in real network environment.
Alternatively, described test scene comprises that switch community or the scene of cell reselection.
Alternatively, the connection between testing equipment foundation and auxiliary moving terminal sends instructions, to assist the test to mobile terminal to be measured when test needs under described auxiliary moving terminal.
Alternatively, the connection between described and auxiliary moving terminal is that serial ports connects, and the described instruction issuing to described auxiliary moving terminal is AT instruction.
A testing equipment, is suitable under real network environment, mobile terminal to be measured being tested; Comprise test script, processing unit and be suitable for setting up described processing unit and described mobile terminal to be measured between the port communication instrument of connection;
Wherein, described processing unit, for moving the test script corresponding with described mobile terminal to be measured, generates test command and sends to described mobile terminal to be measured by described interface channel; And receive the data from mobile terminal to be measured by described interface channel, to described data analysis, to verify described mobile terminal to be measured execution result to described test command under real network environment.
Alternatively, described processing unit comprises: script resolver, for resolving described test script to generate test command; Data-analyzing machine, for the data analysis to from mobile terminal to be measured, to verify execution result.
Alternatively, also comprise dll file memory cell, for storing the dll file mating with mobile terminal to be measured, with the test command of assisting described script resolver to become described mobile terminal to be measured to identify the instruction transformation in test script, auxiliary described data-analyzing machine is to the data analysis from mobile terminal to be measured.
Alternatively, the test instruction in described test script comprises test command that termination function to be measured is tested, indicates terminal adjustment to be measured to the network in real network environment, to survey the test command of the signal reporting.
Alternatively, also comprise the serial ports that is suitable for connecting auxiliary moving terminal, described processing unit is also for controlling auxiliary moving terminal.
A test macro for mobile terminal, comprises mobile terminal to be measured and described testing equipment.
Alternatively, described mobile terminal to be measured comprises protocol stack monitoring entity and message processing module; Wherein said protocol stack monitoring entity is suitable for processing the message processing module of this test instruction to be processed for described test instruction is distributed to, and the processing messages of described message processing module is fed back to the processing unit of described testing equipment by described port communication instrument.
Alternatively, also comprise auxiliary moving terminal, for the auxiliary test to described mobile terminal to be measured under the control of described testing equipment.
Compared with prior art, the technical program has following beneficial effect: first, by testing equipment, move the test script corresponding with mobile terminal to be measured, the interface channel between foundation and described mobile terminal to be measured; Then, the test command described test script of operation being generated sends to described mobile terminal to be measured by described interface channel; And receive the data from mobile terminal to be measured by described interface channel, to described data analysis, to verify described mobile terminal to be measured execution result to described test command under real network environment.The technical program has realized carries out automatic test to mobile terminal to be measured in real network environment, has saved testing cost, has improved testing efficiency.
In specific embodiment, the test command generating by test script indicates mobile terminal adjustment to be measured to the network in real network environment, to survey the test command of the signal reporting, to construct required test scene in real network environment, thereby make tester not need to spend the plenty of time and find different test scenes, improve testing efficiency, also expanded test specification simultaneously.
In specific embodiment, also connected in series by one or more auxiliary moving terminal and testing equipment, the instruction that receives testing equipment transmission assists mobile terminal to be measured to complete the test of multiple operation format, such as the test of MPTY, caller each other and the operation format such as called, thereby improve the test effect of mobile terminal to be measured.
Embodiment
Inventor finds in the method for testing of existing mobile terminal, is all by means of network simulation instrument analog network environment, to reach the properties of testing mobile phone conventionally, and testing cost is higher; And compare with real network environment, the network environment of simulation is relatively stable, and real network environment is more complicated, and what therefore under analog network environment, obtain is test result in the ideal situation.
On the other hand, mobile phone test based under real network environment, conventionally need to be by operating manually, fix a point or situation of movement under mobile phone test, the subjective sensation that so only relies on tester judges whether mobile terminal moves correctly, cannot be in time, assignment test problem place exactly.
For the problems referred to above, technical solution of the present invention provides a kind of method of testing of mobile terminal, realizes, under real network environment, mobile terminal to be measured is carried out to automatic test.On this basis, the test command generating by test script indicates mobile terminal adjustment to be measured to the network in real network environment, to survey the test command of the signal reporting, to construct required test scene in real network environment, thereby make tester not need to spend the plenty of time and find different test scenes, improved testing efficiency.
Further, also connected in series by one or more auxiliary moving terminal and testing equipment, the instruction that receives testing equipment transmission assists mobile terminal to be measured to complete the test of communication, such as the test of MPTY, caller each other and the communication mode such as called, thereby improve the test effect of mobile terminal to be measured.
For above-mentioned purpose of the present invention, feature and advantage can more be become apparent, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
As shown in Figure 1 be the schematic diagram of automatization test system of a kind of mobile terminal of the embodiment of the present invention.With reference to figure 1, described automatization test system comprises testing equipment 10, mobile terminal to be measured 20 and auxiliary moving terminal 301,302.Described testing equipment 10 is connected with described mobile terminal 20 to be measured, auxiliary moving terminal 301,302 respectively by interface channel, the radio communication that can realize under real network environment by base station 40 between described mobile terminal 20 to be measured and auxiliary moving terminal 301,302.It should be noted that, in actual applications, do not limit the number of described auxiliary moving terminal, those skilled in the art can need to determine the number of required auxiliary moving terminal according to test.
Described testing equipment 10 for testing described mobile terminal 20 to be measured under real network environment.Particularly, by described testing equipment 10, to described mobile terminal 20 to be measured, issue test command, described mobile terminal to be measured 20 receives and carries out described test command, then to described testing equipment 10 feedbacks, carry out the processing messages of described test command, described testing equipment 10 is according to the execution result of 20 pairs of described test commands of the processing messages described mobile terminal to be measured of checking of described feedback.
Further, described testing equipment 10 issues the test command that also comprises the signal that indication mobile terminal 20 adjustment to be measured report to the network survey in real network environment in test command to described mobile terminal 20 to be measured, to construct required test scene in real network environment, described test scene comprises the scenes such as community switching, cell reselection.Correspondingly, described testing equipment 10 will be verified the execution result of 20 pairs of described test commands of described mobile terminal to be measured according to the processing messages of described mobile terminal 20 feedbacks to be measured.
Further, described testing equipment 10 can also send instructions for 301,302 times to described auxiliary moving terminal, to assist the test to described mobile terminal 20 to be measured.By described auxiliary moving terminal 301,302 can realize and described mobile terminal to be measured 20 between MPTY, caller each other and the test of the operation format such as called.
Below in conjunction with accompanying drawing, describe test macro, testing equipment and the method for testing of a kind of mobile terminal of the embodiment of the present invention in detail.
First, as shown in Figure 2 be the schematic flow sheet of embodiment of the method for testing of a kind of mobile terminal described in the embodiment of the present invention.With reference to figure 2, the method for testing of described mobile terminal comprises:
Execution step S1: the test script that testing equipment operation is corresponding with described mobile terminal to be measured, the interface channel between foundation and described mobile terminal to be measured.
Particularly, described test script refers to a series of instructions for mobile terminal to be measured is tested, these instructions can read and move by tested equipment, and described test script can be created or use test automation tools generates automatically, or complete by Script Programming Programming with Pascal Language.
Further, in described test script, be provided with the port information of described mobile terminal to be measured, described testing equipment can determine by reading described port information the mobile terminal to be measured being connected with described testing equipment, thus the interface channel between foundation and described mobile terminal to be measured.
Wherein, foundation comprises with the interface channel between described mobile terminal to be measured: described testing equipment is connected with the port between mobile terminal to be measured according to described port information foundation, wherein said port connects and can be connected by serial ports, for example, by USB (Universal Serial BUS, USB) interface, be connected.Described port connect that port between the port communication instrument that also comprises mobile terminal to be measured and testing equipment is connected and the processing unit of described port communication instrument and testing equipment between port be connected.Wherein, in follow-up test process, for test command that test script is generated, the processing unit by described testing equipment is issued to described mobile terminal to be measured to described port communication instrument, and obtains the processing unit to described testing equipment from the data feedback of described mobile terminal to be measured.
Further, described testing equipment can also set up and auxiliary moving terminal between connection, when test needs, under described auxiliary moving terminal, send instructions, to assist the test to mobile terminal to be measured.Alternatively, the connection between wherein said and auxiliary moving terminal is that serial ports connects, and the described instruction issuing to described auxiliary moving terminal can be AT instruction.Wherein, described AT instruction is the character string with AT beginning, and this character string comprises the indication information that the described auxiliary moving terminal of indication is carried out concrete operations, and correspondingly, described auxiliary moving terminal will be carried out corresponding processing after receiving AT instruction.It should be noted that, because existing mobile terminal is substantially all supported AT instruction, expanded like this range of choice of described auxiliary moving terminal.In embodiments of the present invention, described testing equipment can connect auxiliary moving terminal described in one or more, correspondingly, is arranged at the serial ports that described auxiliary moving terminal number matches and connects in described testing equipment.
Those skilled in the art will appreciate that the instruction that testing equipment issues to auxiliary moving terminal need to be the instruction that auxiliary moving terminal can be identified, its way of realization can be determined with situation according to the actual requirements.Be not limited to the above-mentioned AT instruction of mentioning.
Execution step S2: the test command that the described test script of operation is generated sends to described mobile terminal to be measured by described interface channel.
Particularly, described test command is testing equipment analysis and changes the test instruction of described test script and order that the mobile terminal to be measured that forms can be identified.
It should be noted that, because data structure and the data format of different its inner sending/receivings of mobile terminal to be measured are not identical, the test instruction that therefore described testing equipment is resolved rear generation to described test script need to change into according to different mobile terminals to be measured the test instruction that is suitable for this mobile terminal reception to be measured.In other words, described testing equipment need to change into the test instruction of generation and be suitable for data structure and the data format that mobile terminal to be measured receives.
Alternatively, to the test instruction conversion in test script, be wherein to carry out according to the DLL mating with mobile terminal to be measured loading in testing equipment (Dynamic Link Library, dynamic link library) file.Wherein said dll file is a kind of data structure file, and described testing equipment has been loaded after the dll file mating with mobile terminal to be measured, just described test instruction can be changed into and be suitable for data structure and the data mode that described mobile terminal to be measured receives.Described dll file can be loaded in described testing equipment in advance, also can be according to different mobile terminal to be measured, and described testing equipment is downloaded the dll file matching with described mobile terminal to be measured in real time, but in actual applications, is not limited to said method.
Further, the order that described mobile terminal to be measured can be identified refers to the order that the protocol stack monitoring entity of mobile terminal to be measured can be identified.Wherein said protocol stack monitoring entity is the internal module of described mobile terminal to be measured, for communicating process, controls and catch the processing messages of described mobile terminal to be measured inside.In embodiments of the present invention, described protocol stack monitoring entity is also for feeding back to described testing equipment by the processing messages of the mobile terminal described to be measured inside getting.
Execution step S3: receive the data from mobile terminal to be measured by described interface channel, to described data analysis, to verify described mobile terminal to be measured execution result to described test command under real network environment.
In embodiments of the present invention, the described data from mobile terminal to be measured comprise the message that mobile terminal to be measured is processed when carrying out described test command, and the message that wherein said mobile terminal to be measured is processed when carrying out described test command comprises the information that the protocol stack monitoring entity of described mobile terminal to be measured is caught.Alternatively, in invention the present embodiment, the described data from mobile terminal to be measured are that the mode with code stream is transferred to processing unit by port communication instrument in testing equipment inside.
Particularly, for example, first, the test command that described testing equipment is handed down to mobile terminal to be measured can be dialing request instruction, when described mobile terminal to be measured is carried out described test command, its inside start to carry out call flow process, so described protocol stack monitoring entity can capture the message of " altering (ring-back tone) "; Then, described protocol stack monitoring entity feeds back to described testing equipment by the message that captures " altering " by described interface channel, described testing equipment is analyzed this message, to verify described mobile terminal to be measured execution result to described test command under real network environment.
Further, the message that described mobile terminal to be measured is processed when carrying out described test command also comprises to mobile terminal to be measured carries out the idle message that carrys out automatic network that test command is relevant.Particularly, described idle message refers to interface (such as Um Interface, the Uu interface etc.) message between described mobile terminal to be measured and base station.When described mobile terminal to be measured is when carrying out test command, need to by and base station between the interface transmitting-receiving of carrying out message complete test command, therefore described protocol stack monitoring entity will obtain the idle message of automatic network.
According to the method for testing of mobile terminal described in the invention described above embodiment, can realize the automatic test of mobile terminal.
On this basis, further, in described step S2, the test command that described operation test script generates also comprises the test command of the signal that indication mobile terminal adjustment to be measured reports to the network survey in real network environment, to construct required test scene in real network environment.
Be the automatic test of fixing a point in real network environment in embodiments of the present invention, therefore the position of described mobile terminal to be measured immobilizes relatively, and the probability that the test scenes such as community switching, cell reselection occur is relatively little.For this problem, owing to realizing that community is switched or the test scene such as cell reselection by the position of mobile described mobile terminal to be measured, so the method for testing that provides of the embodiment of the present invention can be by arranging test command that indication mobile terminal adjustment to be measured surveys to the network in real network environment the signal reporting to construct required test scene in real network environment in test script.Alternatively, described test scene comprises that switch community or the scene of cell reselection.
Particularly, for example, take and test whether the execution result that described mobile terminal to be tested switches in communication process small area is successfully example.First, by the processing unit in described testing equipment, resolve described test script and generate dialing request instruction, and the protocol stack monitoring entity of changing described mobile terminal to be measured is suitable for the test instruction (as analogue-key is called) receiving.Correspondingly, described mobile terminal to be measured is carried out call flow process after receiving described test instruction, and the message of catching processing by its inner protocol stack monitoring entity is (as Alerting message, be ring-back tone message) after, feed back to described testing equipment, the processing unit of described testing equipment receives after the processing messages of feedback described auxiliary moving terminal is sent to " going code " (this instruction issues with the AT instruction that is suitable for described auxiliary moving terminal and receives).Described auxiliary moving terminal is put through described mobile terminal to be measured according to described instruction, and now described protocol stack monitoring entity continues to catch the processing messages of described mobile terminal to be measured, if capture the message of " call carry out in ", determines that this call is successfully established.
Further, when described processing unit receives indication mobile terminal adjustment to be measured, to the network in real network environment, survey after the test script of the signal reporting, resolved to equally the test instruction of the protocol stack monitoring entity reception that is suitable for described mobile terminal to be measured.Correspondingly, the message processing module (as digital signal processing module) of described protocol stack monitoring entity indication described mobile terminal to be tested inside is turned down the value of reporting of the signal value of current persistent district on the basis of actual measured value, heighten the value of reporting of neighboring area signal simultaneously, and each step-length of adjusting can arrange, thereby reach the object of switching; After adjustment completes, described mobile terminal to be measured can report data after adjustment to network terminal, waits for the switching command of network terminal; Whether the switching flow of then catching described mobile terminal to be measured inside by described protocol stack monitoring entity there is and feeds back to described testing equipment, as community, switches unsuccessfully, repeats said process.
Then,, when described protocol stack monitoring entity captures after the inner handover success message of described mobile terminal to be measured, by described interface channel, be uploaded to the processing unit of described testing equipment.Described processing unit receives after the message of handover success, start to check whether the current state of described mobile terminal to be measured keeps (being whether talking state keeps), similarly, by described processing unit, issue test command, by protocol stack monitoring entity, catch the processing messages of described mobile terminal to be measured inside, if capture the message of " keeping call ", the call of determining described mobile terminal to be measured still keeps, and the message feedback of catching is given to the processing unit of described testing equipment, thereby complete test.
Further, the embodiment of the present invention also provides a kind of testing equipment, and described testing equipment is suitable under real network environment, mobile terminal to be measured being tested.
As shown in Figure 3 a be the structural representation of the first embodiment of a kind of testing equipment provided by the invention.With reference to figure 3a, described testing equipment 1 comprises test script 11, processing unit 12, is suitable for setting up port communication instrument 13 and the dll file memory cell 14 of the connection between described processing unit and described mobile terminal to be measured.
Wherein, described processing unit 12 also comprises script resolver 121, for resolving described test script to generate test command; Data-analyzing machine 122, for the data analysis to from mobile terminal to be measured, to verify execution result.Particularly, described processing unit 12, for moving the test script 1 corresponding with described mobile terminal (not shown) to be measured, generates test command and sends to described mobile terminal to be measured by described interface channel; And receive the data from mobile terminal to be measured by described interface channel, to described data analysis, to verify described mobile terminal to be measured execution result to described test command under real network environment.
Wherein, described dll file memory cell 14 is for storing the dll file mating with mobile terminal to be measured, with the test command of assisting described script resolver 121 to become described mobile terminal to be measured to identify the instruction transformation in test script, auxiliary 122 pairs of data analysis from mobile terminal to be measured of described data-analyzing machine.
Further, test instruction in described test script 11 also comprises the test command of the signal that the described terminal adjustment to be measured of indication reports to the network survey in real network environment, to construct required test scene in real network environment, wherein said test scene comprises community switching, cell reselection etc.Specific implementation process can be with reference to the description in the method for testing of the mobile terminal described in figure 2, and therefore not to repeat here.
It should be noted that, by 1 pair of mobile terminal to be measured of the testing equipment described in the present embodiment, test, do not need the assistance of auxiliary moving terminal.Further, when needs auxiliary moving terminal assists described mobile terminal to be measured to test, described testing equipment also comprises for connecting the serial ports of described auxiliary moving terminal.
Particularly, the structural representation of the second embodiment of a kind of testing equipment provided by the invention as shown in Figure 3 b.With reference to figure 3b, described testing equipment 1 ' comprise test script 11 ', processing unit 12 ', be suitable for setting up the port communication instrument 13 of the connection between described processing unit and described mobile terminal to be measured ', dll file memory cell 14 '.Different from the first embodiment, described testing equipment 1 also comprise be suitable for connecting the serial ports 15 of auxiliary moving terminal ', correspondingly, described processing unit 12 ' also for controlling auxiliary moving terminal.It should be noted that, the testing equipment 1 shown in Fig. 3 b ' in only comprise a serial ports 15 ', but in actual applications, according to the number of described auxiliary moving terminal, the serial ports of the described testing equipment 1 ' number arranging with described auxiliary moving terminal is matched.
In the present embodiment, described processing unit 12 ' also comprise script resolver 121 ', for resolving described test script to generate test command; Data-analyzing machine 122 ', for the data analysis to from mobile terminal to be measured, to verify execution result.Further, described processing unit 12 ' also for sending instructions under described auxiliary moving terminal, the wherein said instruction issuing is AT instruction, and described AT instruction is the instruction to generate by the described test script of described script resolver 121 ' resolve.Particularly, described AT instruction is the character string with AT beginning, and this character string comprises the indication information that the described auxiliary moving terminal of indication is carried out concrete operations, and correspondingly, described auxiliary moving terminal will be carried out corresponding processing after receiving AT instruction.It should be noted that, because existing mobile terminal is substantially all supported AT instruction, expanded like this range of choice of described auxiliary moving terminal.
By described auxiliary moving terminal can realize and described mobile terminal to be measured between mutual call, caller each other and the test scene such as called.Further, when described testing equipment comprises a plurality of serial ports, can also realize by a plurality of auxiliary moving terminals the test scene of MPTY.
The embodiment of the present invention also provides the test macro of the mobile terminal that comprises the testing equipment shown in above-mentioned Fig. 3 a or Fig. 3 b.
Particularly, as shown in Figure 4 be the structural representation of test macro of a kind of mobile terminal of the embodiment of the present invention.With reference to figure 4, the test macro of described mobile terminal comprise testing equipment 1 ', mobile terminal to be measured 2 and auxiliary moving terminal 2 '.Wherein, described testing equipment 1 ' comprise test script 11 ', processing unit 12 ', be suitable for setting up the port communication instrument 13 of the connection between described processing unit and described mobile terminal to be measured ', dll file memory cell 14 and serial ports 15 '.It should be noted that, the testing equipment 1 shown in Fig. 4 ' be testing equipment as shown in Figure 3 b, about described testing equipment 1 ' concrete structure and handling process can be with reference to the description of above-described embodiment, therefore not to repeat here.
Described mobile 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 suitable for processing the message processing module of this test instruction to be processed for test instruction is distributed to, and by the processing messages of described message processing module the processing unit 12 by the described testing equipment of described port communication instrument 13 ' feed back to '.
Further, testing equipment in the test macro of described mobile terminal can be also testing equipment 1 as shown in Figure 3 a, due in described testing equipment 1, do not comprise serial ports 15 ', correspondingly, in the test macro of described mobile terminal, do not comprise yet auxiliary moving terminal 2 ', for not needing the test of the mobile terminal to be measured 2 that auxiliary moving terminal assists.
In sum, the test macro of the method for testing of the mobile terminal providing by the embodiment of the present invention, testing equipment and mobile terminal, realized under real network environment mobile terminal to be measured has been carried out to automatic test, the test command simultaneously generating by test script indicates mobile terminal adjustment to be measured to the network in real network environment, to survey the test command of the signal reporting, to construct required test scene in real network environment, thereby make tester not need to spend the plenty of time and find different test scenes, improved testing efficiency.
Although the present invention with preferred embodiment openly as above; but it is not for limiting the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can utilize method and the technology contents of above-mentioned announcement to make possible change and modification to technical solution of the present invention; therefore; every content that does not depart from technical solution of the present invention; any simple modification, equivalent variations and the modification above embodiment done according to technical spirit of the present invention, all belong to the protection range of technical solution of the present invention.