Summary of the invention
The problem that the present invention solves is to realize the mobile terminal protocol stack is carried out efficiently and test cheaply.
For addressing the above problem, the present invention provides a kind of mobile terminal protocol stack method of testing, comprising:
According to test case, the mobile terminal protocol stack of transplanting in the testing equipment to be measured sends the protocol stack instruction to the portable terminal identification card;
Said mobile terminal protocol stack mobile terminal receive identification card to be measured feedback with the corresponding data of said protocol stack instruction;
Feedback to said mobile terminal protocol stack to be measured receives after the said data is analyzed, and obtains the test result to said mobile terminal protocol stack to be measured;
Wherein, carrying out via the portable terminal identification card driver element in the said testing equipment alternately between said mobile terminal protocol stack to be measured and the portable terminal identification card.
Optional, adopt the identification card simulator that the portable terminal identification card is simulated.
Optional, said mobile terminal protocol stack method of testing also comprises: said mobile terminal protocol stack to be measured obtains the active data in the said portable terminal identification card; Wherein, said active data is based on the test purpose structure.
Optional, the active data that said mobile terminal protocol stack to be measured obtains in the said portable terminal identification card comprises: receive the active data notice from the portable terminal identification card; Send the active data reading command to said portable terminal identification card; Receive the active data that said portable terminal identification card returns.
Optional, said portable terminal identification card feedback data is based on the answer that testing requirement is provided with in advance.
Optional; In said portable terminal identification card, do not exist to the time from preset answers of the protocol stack of mobile terminal protocol stack to be measured instruction, said portable terminal identification card feedback data be based on that said protocol stack instructs and the portable terminal identification card in the answer that constructed of the EF file stored.
Optional, adopt the batch processing instrument test case to be managed and moved control.
Optional, said test result is meant compatibility and the conforming test result of mobile terminal protocol stack to be measured to the portable terminal identification card.
For addressing the above problem, the present invention also provides a kind of mobile terminal protocol stack method of testing, adopts the identification card simulator that the portable terminal identification card is simulated; Said method comprises:
Receive the protocol stack that produces based on test case of the mobile terminal protocol stack of self-testing device transplanting to instruct;
Said protocol stack instruction is resolved, to said mobile terminal protocol stack feedback and the corresponding data of said instruction;
Wherein, carrying out via the identification card simulator driver element in the testing equipment alternately between said mobile terminal protocol stack and the identification card simulator.
Optional, saidly instruct corresponding data to comprise with said: to search the answer that is provided with in advance based on testing requirement of storing in the identification card simulator, send said answer to said mobile terminal protocol stack feedback.
Optional; In said identification card simulator, do not exist to the time from preset answers of the protocol stack of mobile terminal protocol stack instruction, said identification card simulator feedback data be based on that said protocol stack instructs and the identification card simulator in the answer that constructed of the EF file stored.
Optional, said mobile terminal protocol stack method of testing also comprises: said identification card simulator provides active data to said mobile terminal protocol stack; Wherein, said active data is based on the test purpose structure.
Optional, said identification card simulator provides active data to comprise to said mobile terminal protocol stack: send the active data notice to said mobile terminal protocol stack; Reception is from the active data reading command of said mobile terminal protocol stack; Return active data to said mobile terminal protocol stack.
For addressing the above problem, the present invention also provides a kind of testing equipment, comprising:
The protocol stack acquiring unit is used for obtaining mobile terminal protocol stack to be measured through the mode of transplanting;
First transmitting element is used for mobile terminal protocol stack to be measured is sent to the portable terminal identification card according to the protocol stack instruction that test case produces;
First receiving element, the transfer of data corresponding with said protocol stack instruction that is used for the portable terminal identification card is fed back be mobile terminal protocol stack to be measured extremely;
Analytic unit is used for the feedback that said mobile terminal protocol stack to be measured receives after the said data is analyzed, and obtains the test result to said mobile terminal protocol stack to be measured.
Optional, said testing equipment also comprises: be used for the analog network side apparatus and mobile terminal protocol stack to be measured carries out mutual network analog unit.
Optional, said testing equipment also comprises: the data capture unit that is used for obtaining the active data of said portable terminal identification card and is sent to mobile terminal protocol stack to be measured; Wherein, said active data is based on the test purpose structure.
Optional, said data capture unit is used to receive the active data notice from the portable terminal identification card; Send the active data reading command to said portable terminal identification card, receive the active data that said portable terminal identification card returns.
Optional, said first transmitting element, first receiving element and data capture unit are integrated in the said mobile terminal protocol stack to be measured.
Optional, said portable terminal identification card feedback data is based on the answer that testing requirement is provided with in advance.
Optional, said testing equipment also comprises: the batch processing unit that is used for test case is managed and moved control.
For addressing the above problem, the present invention also provides a kind of identification card simulator, comprising:
Second receiving element, the mobile terminal protocol stack that is used for the transplanting of acceptance test equipment instructs based on the protocol stack that test case produces;
Resolution unit is used for said protocol stack instruction is resolved, to said mobile terminal protocol stack feedback and the corresponding data of said instruction;
Driver element is used to transmit the information between mobile terminal protocol stack and the portable terminal identification card.
Optional, said identification card simulator also comprises: memory cell is used to store the answer that is provided with in advance based on testing requirement; Said resolution unit is through searching the answer of storing in the memory cell, with said answer as feeding back to said mobile terminal protocol stack with the corresponding data of said instruction.
Optional, said identification card simulator also comprises: judging unit and answer structural unit, said judging unit are used for judging whether said memory cell exists the answer of instructing to the protocol stack from the mobile terminal protocol stack; Said answer structural unit is used in judged result for not the time, reply based on the EF file build of storing in said protocol stack instruction and the memory cell, with said answer as instructing corresponding data with said.
Optional, said identification card simulator also comprises: second transmitting element that is used for providing to said mobile terminal protocol stack active data; Wherein, said active data is based on the test purpose structure.
Optional, said second transmitting element is used for sending the active data notice to said mobile terminal protocol stack; Reception is from the active data reading command of said mobile terminal protocol stack; Return active data to said mobile terminal protocol stack.
Optional, said identification card simulator also comprises: control unit is used for the work of each unit of identification card simulator is controlled.
For addressing the above problem, the present invention also provides a kind of mobile terminal protocol stack test macro, comprising: above-mentioned testing equipment and identification card simulator.
Compared with prior art, technical scheme of the present invention has following beneficial effect:
Mobile terminal protocol stack to be measured through transplanting in the testing equipment sends the protocol stack instruction to the portable terminal identification card; And mobile terminal receive identification card feedback with the corresponding data of said protocol stack instruction; Analyze the feedback after mobile terminal protocol stack to be measured receives said data, to obtain test result to said mobile terminal protocol stack to be measured; For manual test; Because testing equipment possesses powerful disposal ability; Can realize on the one hand mutual comprehensively between mobile terminal protocol stack to be measured and the identification card; To comprehensively testing between mobile terminal protocol stack to be measured and the identification card, on the other hand, also improved the testing efficiency of testing between mobile terminal protocol stack to be measured and the portable terminal identification card.
Further; Owing to adopted the identification card simulator that the behavior of portable terminal identification card is simulated; Simulated the different behaviors of portable terminal identification card, particularly, normal behaviour and abnormal behaviour that can the simulating mobile terminal identification card.For instrument test; Since its can the simulating mobile terminal identification card normal behaviour and abnormal behaviour; And then can test the compatibility between different mobile terminals identification card and the mobile terminal protocol stack to be measured; Enlarged the test specification between mobile terminal protocol stack to be measured and the identification card, realized the integrality of testing between mobile terminal protocol stack to be measured and the identification card, and; Because test need not carried out based on real identification card, so reduced testing cost.
Embodiment
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.
Set forth detail in the following description so that make much of the present invention.But the present invention can be different from alternate manner described here and implements with multiple, and those skilled in the art can do similar popularization under the situation of intension of the present invention.Therefore the present invention does not receive the restriction of following disclosed embodiment.
Because in the prior art; All there are corresponding defects in manual test protocol stack and instrument test protocol stack; Therefore; The inventor proposes, and sends the protocol stack instruction through the mobile terminal protocol stack of transplanting in the testing equipment to be measured to the portable terminal identification card, to improve the testing efficiency to compatible between mobile terminal protocol stack and the identification card and uniformity test.Further, adopt identification card simulator simulating mobile terminal identification card, realize the integrality of test, reduce testing cost.
For mobile terminal protocol stack method of testing, testing equipment, identification card simulator and the mobile terminal protocol stack test macro that can understand present embodiment better, earlier relevant noun is explained.
In the present embodiment; Test case is used to test the corresponding function point of mobile terminal protocol stack to be measured; Testing equipment is through carrying out different test cases; Come mobile terminal protocol stack to be measured is carried out miscellaneous service test, complex scene test or the like, to realize to consistency between said mobile terminal protocol stack and the identification card and compatible test.
In the present embodiment, the portable terminal identification card is used to discern identity, storage user-dependent data or the like of user.It can be SIM (Subscriber Identity Module), also can be usim card (Universal Subscriber Identity Module).
In the present embodiment; Portable terminal identification card driver element is used to transmit the data between mobile terminal protocol stack to be measured and the portable terminal identification card; Particularly; Receive the data that mobile terminal protocol stack to be measured sends, said data are sent to the portable terminal identification card, and receive the data that said portable terminal identification card returns and send it to mobile terminal protocol stack to be measured.
In the present embodiment, the identification card simulator is used for the behavior of simulating mobile terminal identification card.
See also Fig. 1; Fig. 1 is the basic structure sketch map of the mobile terminal protocol stack test macro of the embodiment of the invention; As shown in Figure 1; Said mobile terminal protocol stack test macro comprises testing equipment 1 and identification card simulator 2; Through said testing equipment 1 said mobile terminal protocol stack to be measured is transplanted in the testing equipment 1, and then through the data interaction between mobile terminal protocol stack to be measured in the testing equipment 1 and the identification card simulator 2, to realize the test to mobile terminal protocol stack to be measured.
Particularly, testing equipment described in the present embodiment 1 can be computer, is used to transplant mobile terminal protocol stack to be measured; And move the test case that is used to test mobile terminal protocol stack to be measured, because identification card simulator 2 is used for the behavior of simulating mobile terminal identification card, so can simulate with computer; And this computer can be the computer identical with said testing equipment 1; Therefore, said identification card simulator 2 may operate on the said testing equipment 1, certainly; Said identification card simulator 2 also can be simulated with other computers; At this moment, need between said testing equipment 1 and identification card simulator 2, set up the passage of transfer of data, the two interconnected as adopting data wire.
See also Fig. 2, Fig. 2 is the flow chart of the mobile terminal protocol stack method of testing of the embodiment of the invention; As shown in Figure 2, in the test process to said mobile terminal protocol stack, the action that testing equipment is carried out comprises:
S11: according to test case, the mobile terminal protocol stack of transplanting in the testing equipment to be measured sends the protocol stack instruction to the portable terminal identification card;
S12: said mobile terminal protocol stack mobile terminal receive identification card to be measured feedback with the corresponding data of said protocol stack instruction;
S13: the feedback to said mobile terminal protocol stack to be measured receives after the said data is analyzed, and obtains the test result to said mobile terminal protocol stack to be measured; Wherein, carrying out via the portable terminal identification card driver element in the said testing equipment alternately between said mobile terminal protocol stack to be measured and the portable terminal identification card.
In the present embodiment; Testing equipment is obtained mobile terminal protocol stack to be measured through the mode of transplanting; Particularly, through testing equipment the ARM engineering of all modules of mobile terminal protocol stack to be measured is transplanted on the Win32 platform exactly, is made VC engineering and ARM engineering corresponding one by one; So the protocol stack code of moving on the code of the mobile terminal protocol stack to be measured that transplanting obtains and the real handset is same set of code.
In the present embodiment, for can full test mobile terminal protocol stack and identification card between consistency and compatibility, preferably, adopt identification card simulator simulating mobile terminal identification card.Particularly, be exactly normal behaviour and the abnormal behaviour of passing through identification card simulator simulating mobile terminal identification card.So; Below be that the identification card simulator is an example with the portable terminal identification card; Mobile terminal protocol stack method of testing to present embodiment describes, and correspondingly, the identification card simulator driver element of below mentioning is then corresponding with portable terminal identification card driver element.
In the present embodiment; Testing equipment is stored in test case wherein and carries out said test case through calling; Based on execution to said test case; The mobile terminal protocol stack of transplanting in the testing equipment to be measured sends the protocol stack instruction to the identification card simulator and carries out corresponding business to trigger the identification card simulator, for example: trigger the business that the identification card simulator sends short message; The instruction of protocol stack described in the present embodiment can trigger through the AT order; So that said identification card simulator carries out corresponding business; As: ATD 10086; Be used to trigger and carry out between mobile terminal protocol stack to be measured and the said identification card simulator alternately, and then call 10086.
In the present embodiment; Before between to said mobile terminal protocol stack and identification card simulator, testing; Can be according to the demand of test; Said identification card simulator feedback data after receiving the protocol instructions that mobile terminal protocol stack to be measured sends is provided with, particularly, is provided with exactly with said protocol stack and instructs corresponding specific answer.
See also Fig. 3; Fig. 3 is that the mobile terminal protocol stack sends the protocol stack instruction; The flow chart of the data that identification card simulator feedback is corresponding with said protocol stack instruction; As shown in Figure 3: said mobile terminal protocol stack sends the protocol stack instruction, and identification card simulator feedback comprises with the corresponding data of said protocol stack instruction:
S121: identification card simulator driver element receives the protocol stack instruction, and is sent to the identification card simulator.
S122: said identification card simulator judges whether to exist and the corresponding answer data of said protocol stack instruction.
S123:, then should reply data and take out if exist.
S124:, then reply data based on element file (EF, the Element File) structure of storing in said protocol stack instruction and the identification card simulator if do not exist.
S125: send said answer data to the mobile terminal protocol stack through said identification card simulator driver element.
Particularly; In the present embodiment when said testing equipment implementation of test cases; According to test case; The mobile terminal protocol stack of transplanting in the testing equipment to be measured sends the protocol stack instruction; And being sent to the identification card simulator through said identification card simulator driver element, the identification card simulator can be earlier compares said protocol stack instruction and protocol stack instruction in the memory that is stored in the identification card simulator after receiving said protocol stack instruction; If the protocol stack instruction that exists said mobile terminal protocol stack to send in the memory of said identification card simulator; And exist and the corresponding answer data of this protocol stack instruction, then the identification card simulator can take out the answer data corresponding with the protocol stack instruction of said mobile terminal protocol stack transmission, and sends said answer data to mobile terminal protocol stack to be measured through identification card simulator driver element.
If the identification card simulator is searched for the data of storing in its memory; Particularly; Exactly the protocol stack instruction of storing in its memory is searched for; Judge whether to exist the identical protocol stack instruction of protocol stack instruction of sending with said mobile terminal protocol stack, and with the corresponding answer data of this protocol stack instruction.If during the answer data that the protocol stack that the discovery of identification card simulator is not sent to said mobile terminal protocol stack instructs; Then said identification card simulator at first can be resolved the protocol stack instruction that said mobile terminal protocol stack sends accordingly; Based on parsing to said protocol stack instruction; Read the EF file; Said EF file is analyzed, construct accordingly with acquisition based on said EF file then and reply data, and then the answer data that will construct through said identification card simulator driver element are sent to mobile terminal protocol stack to be measured.
Mobile terminal protocol stack to be measured can carry out corresponding feedback after the answer data that receive said identification card simulator driver element transmission; Feedback through said mobile terminal protocol stack to be measured being received after the said answer data is analyzed, and just can obtain the test result to said mobile terminal protocol stack to be measured.
From the above; The identification card simulator both can the simulating mobile terminal identification card normal behaviour also can the simulating mobile terminal identification card abnormal behaviour; Usually; The normal behaviour of portable terminal identification card is meant at protocol stack instruction back feedback that receives the mobile terminal protocol stack and said protocol stack and instructs corresponding answer, feeds back to the correct answer of protocol stack in other words; The abnormal behaviour of portable terminal identification card is meant in protocol stack instruction back feedback that receives the mobile terminal protocol stack and the not corresponding answer of said protocol stack instruction, feeds back to the answer of protocol stack mistake in other words; The mobile terminal protocol stack is analyzed the test result that just can obtain said mobile terminal protocol stack to be measured to the feedback of said correct answer or error return.
For instance; Mobile terminal protocol stack to be measured sends the protocol stack instruction; The identification card simulator feeds back to and the corresponding data of replying of said protocol stack instruction; Mobile terminal protocol stack to be measured can carry out corresponding feedback after receiving said answer data; Whether consistent through judging the feedback of portable terminal to be measured after receiving said answer data that writes in this feedback and the test case, can correspondingly test the consistency between mobile terminal protocol stack to be measured and the identification card simulator.Particularly; If through a plurality of test cases of operation; The feedback of the correct answer that mobile terminal protocol stack to be measured sends the identification card simulator all with test case in the feedback that writes consistent, explain that then the consistency of mobile terminal protocol stack to be measured and said identification card simulator is better, otherwise; The consistency that mobile terminal protocol stack to be measured and said identification card simulator then are described is relatively poor, need correspondingly revise mobile terminal protocol stack to be measured.
In addition; If mobile terminal protocol stack to be measured sends the protocol stack instruction; The identification card simulator has fed back wrong answer data, comes the compatibility between mobile terminal protocol stack to be measured and the said identification card simulator is correspondingly tested through the feedback of analyzing after the answer data that said mobile terminal protocol stack to be measured receives said mistake.Particularly, if through a plurality of test cases of operation, the error return data that mobile terminal protocol stack to be measured sends the identification card simulator; Can carry out correspondingly fault-tolerant processing; And continue operation, the better compatible of mobile terminal protocol stack to be measured and said identification card simulator then is described, otherwise; The compatible relatively poor of mobile terminal protocol stack to be measured and said identification card simulator then is described, need be correspondingly revised mobile terminal protocol stack to be measured.
In the present embodiment; To the test of mobile terminal protocol stack except can initiatively sending the protocol stack instruction by mobile terminal protocol stack to be measured; Can also send instruction by the portable terminal identification card and give the mobile terminal protocol stack, the active data that the mobile terminal protocol stack obtains in the said portable terminal identification card is carried out.
Please continue with reference to figure 2, as shown in Figure 2: said mobile terminal protocol stack method of testing also comprises:
S21: said mobile terminal protocol stack to be measured obtains the active data in the said portable terminal identification card; Wherein, said active data is based on the test purpose structure.
And then analyze through the feedback of mobile terminal protocol stack to be measured being obtained after the said active data, obtain test result to said mobile terminal protocol stack to be measured.
Be that the identification card simulator describes still below with the portable terminal identification card.See also Fig. 4, Fig. 4 is the flow chart that the mobile terminal protocol stack of the embodiment of the invention obtains the active data in the identification card simulator.As shown in Figure 4, the active data that said mobile terminal protocol stack obtains in the identification card simulator comprises:
S211: receive active data notice from the identification card simulator.
S212: send the protocol stack instruction to said identification card simulator.
S213: said identification card simulator judges whether said protocol stack instruction is the active data reading command.
S214: if then active data is sent to the mobile terminal protocol stack.
S215: if not, then carry out said protocol stack instruction.
Particularly; According to test case; Said identification card simulator can be informed mobile terminal protocol stack to be measured with the mode of status word, and it has active data, and mobile terminal protocol stack to be measured can send the protocol stack instruction to said identification card simulator after receiving this status word; The identification card simulator is after receiving said protocol stack instruction; Can't directly its active data that will send be sent to mobile terminal protocol stack to be measured, but the protocol stack instruction that mobile terminal protocol stack to be measured sends is judged, judge whether said protocol stack instruction is the active data reading command.
If the active data that then will be stored in the memory of identification card simulator is sent to mobile terminal protocol stack to be measured through identification card simulator driver element.
If not, then said identification card simulator can correspondingly be resolved said protocol stack instruction earlier, carries out said protocol stack instruction then.
For instance; Come mobile terminal protocol stack to be measured is tested if will carry out call business through the identification card simulator; Mobile terminal protocol stack then to be measured at first will receive the active data notice from the identification card simulator, particularly, has received from comprising of identification card simulator it and will call out the active data notice of implication; Mobile terminal protocol stack to be measured is after receiving this active data notice; Can send the protocol stack instruction to the identification card simulator, the identification card simulator will be judged earlier after receiving the protocol stack instruction that the mobile terminal protocol stack sends; Whether this protocol stack instruction is the instruction of reading the data relevant with call business; Whether be the active data reading command promptly, if then will be stored in data relevant in the memory of identification card simulator and be sent to mobile terminal protocol stack to be measured through identification card simulator driver element with call business.Mobile terminal protocol stack to be measured can carry out corresponding feedback after receiving the data relevant with call business; Through analyzing the feedback of mobile terminal protocol stack to be measured after receiving the data relevant, then can obtain test result to said mobile terminal protocol stack to be measured with call business.
Sending protocol stack through above-mentioned mobile terminal protocol stack to be measured instructs to the identification card simulator; And identification card simulator transmission active data is notified to said mobile terminal protocol stack to be measured; And then, can test consistency and compatibility between mobile terminal protocol stack and the portable terminal identification card more all sidedly through analyzing said mobile terminal protocol stack to be measured in answer data that receive the transmission of identification card simulator or the behavior after the active data.
In the present embodiment; Can manage and control test case through the batch processing instrument; Particularly; Can come to move in a certain order each test case in the testing equipment through the batch processing instrument exactly; And can be according to result to the final operation of a plurality of test cases; As: the title of the test case of the number of the number of successful test case, the test case of failure, the running time of test case, failure, percent of pass etc., said percent of pass are meant the ratio of test case number of number and operation of the test case of success, obtain compatibility between mobile terminal protocol stack and the portable terminal identification card and conforming test result.
Through batch processing tool management and operation test case, the identification card simulator is tested the mobile terminal protocol stack of transplanting to be measured, has realized fast and automatic regression test cheaply.As: test case of every operation; Just be equivalent to testing between a portable terminal identification card and the mobile terminal protocol stack; According to the speed of service of present computer, can carry out 5 times 1000 test cases at least in 1 day, so; It is tested between 1 day just can be to 1000 portable terminal identification cards and mobile terminal protocol stack; And come the test case of failure is analyzed according to test result, and then mobile terminal protocol stack to be measured is correspondingly revised, with the function of the protocol stack that improves portable terminal to be measured.So, realized testing efficiency height and the low regression test of cost.
Need to prove; The network environment that can also come Simulation of Complex through network simulator in the present embodiment is to test the mobile terminal protocol stack accordingly; Through network simulator with the simulation under the various network environment; Compatibility and consistency between mobile terminal protocol stack and the identification card simulator; Particularly, can dispose into realization accordingly with different layers and simulate various network environment through in test case, writing corresponding program the mobile terminal protocol stack.In addition; If the test of said mobile terminal protocol stack is carried out based on the network environment of reality; Then need not network simulator, perhaps the time, when not needing the cooperation of network to realize data between said mobile terminal protocol stack and the said identification card simulator mutual to the test of said mobile terminal protocol stack; As: the deletion of short message also need not network simulator.
In addition; In the present embodiment for can be to comprehensively testing between mobile terminal protocol stack and the portable terminal identification card; Adopted the identification card simulator that said portable terminal identification card is simulated; And then mutual through between the mobile terminal protocol stack to be measured transplanted in the testing equipment and the identification card simulator, so that said mobile terminal protocol stack to be measured is tested accordingly.But; In other embodiments also can be directly mutual through between the mobile terminal protocol stack to be measured transplanted in the testing equipment and the portable terminal identification card; So that said mobile terminal protocol stack to be measured is tested accordingly; So adopting the identification card simulator that said portable terminal identification card is simulated should be as the qualification to technical scheme of the present invention.
The method of testing of above-mentioned mobile terminal protocol stack mainly is with in the test process, and the angle of the action of carrying out from testing equipment comes the method for testing to the mobile terminal protocol stack to describe.In other embodiments, the angle of the action that can also carry out from the identification card simulator of the method for testing of mobile terminal protocol stack comes the test of mobile terminal protocol stack is described.
See also Fig. 5; Fig. 5 is the flow chart of the mobile terminal protocol stack method of testing of another embodiment of the present invention; Said mobile terminal protocol stack method of testing adopts the identification card simulator that the portable terminal identification card is simulated, and is as shown in Figure 5; In test process, the action that the identification card simulator is carried out comprises:
S31: receive the protocol stack that produces based on test case of the mobile terminal protocol stack of self-testing device transplanting to instruct.
S32: said protocol stack instruction is resolved, to said mobile terminal protocol stack feedback and the corresponding data of said instruction; Wherein, carrying out via the identification card simulator driver element in the testing equipment alternately between said mobile terminal protocol stack and the identification card simulator.
In the present embodiment; Said testing equipment is transplanted mobile terminal protocol stack, operation test case, identification card simulator and is received the protocol stack instruction that said transplanting mobile terminal protocol stack sends, and sends with said protocol stack according to the answer that is provided with in advance based on testing requirement of its storage and to instruct the process of corresponding data; When not having the answer of instructing in the identification card simulator to protocol stack from the mobile terminal protocol stack; Said identification card simulator to said protocol stack instruction resolve earlier, reply data based on the EF file build of storing in the identification card simulator then and be sent to the process of said mobile terminal protocol stack; And the identification card simulator sends the active data notice to said mobile terminal protocol stack, receives the active data reading command from said mobile terminal protocol stack, returns the process of active data to said mobile terminal protocol stack; And carrying out via the identification card simulator driver element in the testing equipment alternately between stack of mobile terminal protocol described in the said process and the identification card simulator; With above-mentioned similar from the said mobile terminal protocol stack method of testing of testing equipment angle execution, so, no longer launch to describe in detail here.
The embodiment of the invention also provides a kind of testing equipment, sees also Fig. 6, and Fig. 6 is the structural representation of the testing equipment of the embodiment of the invention; As shown in Figure 6, the testing equipment 1 of the embodiment of the invention comprises:
Protocol stack acquiring unit 101 is used for obtaining mobile terminal protocol stack to be measured through the mode of transplanting;
First transmitting element 102 is used for mobile terminal protocol stack to be measured is sent to the portable terminal identification card according to the protocol stack instruction that test case produces;
First receiving element 103, the transfer of data corresponding with said protocol stack instruction that is used for the portable terminal identification card is fed back be mobile terminal protocol stack to be measured extremely;
Analytic unit 104 is used for the feedback that said mobile terminal protocol stack to be measured receives after the said data is analyzed, and obtains the test result to said mobile terminal protocol stack to be measured.
In the present embodiment; Protocol stack acquiring unit 101 obtains mobile terminal protocol stack to be measured through the mode of transplanting, particularly; Protocol stack acquiring unit 101 can be transplanted to the ARM engineering of all modules of mobile terminal protocol stack to be measured on the Win32 platform; Make VC engineering and ARM engineering corresponding one by one, so the protocol stack code of moving on the code of the mobile terminal protocol stack to be measured that transplanting obtains and the real handset is same set of code.Said first transmitting element 102, first receiving element 103, analytic unit 104 link to each other with said protocol stack acquiring unit 101 respectively.
Need to prove; In the present embodiment; Said testing equipment 1 can also comprise with said protocol stack acquiring unit 101 and linking to each other, and is used for analog network side apparatus and mobile terminal protocol stack and carries out mutual network analog unit 105, and the function of said network analog unit 105 and the network simulator when describing mobile terminal protocol stack method of testing is similar; Can no longer launch concrete the detailed description here referring to above-mentioned description particularly to network simulator.
In the present embodiment, said testing equipment 1 also comprises: be used for the data capture unit 106 that obtains the active data of said portable terminal identification card and be sent to mobile terminal protocol stack to be measured; Said data capture unit 106 links to each other with said protocol stack acquiring unit 101, and wherein, said active data is based on test purpose structure.Particularly, said data capture unit 106 receives the active data notice from the portable terminal identification card; Send the active data reading command to said portable terminal identification card, receive the active data that said portable terminal identification card returns.
First transmitting element 102 described in the present embodiment, first receiving element 103, data capture unit 106 can be integrated in the said mobile terminal protocol stack 3 to be measured.
Testing equipment described in the present embodiment 1 also comprises the batch processing unit (not shown) that is used for test case is managed and moved control.
In the present embodiment, said testing equipment can repeat no more referring to above-mentioned carrying out from the said mobile terminal protocol stack method of testing of testing equipment angle execution to the test of mobile terminal protocol stack to be measured here.
The embodiment of the invention also provides a kind of identification card simulator, sees also Fig. 7, and Fig. 7 is the structural representation of the identification card simulator of the embodiment of the invention, and is as shown in Figure 7, and said identification card simulator 2 comprises:
Second receiving element 201, the mobile terminal protocol stack that is used for the transplanting of acceptance test equipment instructs based on the protocol stack that test case produces.
Resolution unit 202 is used for said protocol stack instruction is resolved, to said mobile terminal protocol stack feedback and the corresponding data of said instruction.
Driver element 203 is used to transmit the information between mobile terminal protocol stack and the identification card simulator.
In the present embodiment, said resolution unit 202, second receiving element 201 link to each other through said driver element 203.
In the present embodiment, said identification card simulator 2 also comprises:
Memory cell 204 is used to store the answer that is provided with in advance based on testing requirement; Said resolution unit 202 links to each other with said memory cell 204, through searching in the memory cell 204 answer of storage, with said answer as feeding back to said mobile terminal protocol stack with the corresponding data of said instruction.
Judging unit 205 links to each other with said memory cell 204, is used for judging whether said memory cell 204 exists the answer of instructing to the protocol stack from the mobile terminal protocol stack.
Reply structural unit 206; Link to each other with said judging unit 205, memory cell 204, driver element 203 and second receiving element 201; Be used in judged result for not the time; The EF file build answer of storage in the protocol stack instruction that receives based on said second receiving element 201 and the memory cell 204, with said answer as being sent to mobile terminal protocol stack to be measured via said driver element 203 with the corresponding data of said instruction.
Second transmitting element 207 links to each other with said driver element 203, is used for to said mobile terminal protocol stack active data being provided, and wherein, said active data is based on test purpose structure.Particularly, said second transmitting element 207 is used for sending the active data notice to said mobile terminal protocol stack; Reception is from the active data reading command of said mobile terminal protocol stack; Return active data to said mobile terminal protocol stack.
Control unit 208; Respectively with said second receiving element 201, resolution unit 202, driver element 203, memory cell 204, judging unit 205, reply structural unit 206, second transmitting element 207 links to each other, be used for the work of each unit of identification card simulator is controlled.
In the present embodiment; Said memory cell 204 also comprises: the buffer unit (not shown); Identification card simulator 2 feedbacks that are used for protocol stack instruction that buffer memory mobile terminal protocol stack sends to identification card simulator 2, are provided with in advance based on testing requirement and the corresponding data of said protocol stacks instruction; And buffer memory sends to the active data of mobile terminal protocol stack according to the identification card simulator 2 of test purpose design; Said memory cell 204 also is used to store the EF file, particularly, has comprised the relation between content, EF file structure and the EF file of EF file.
In the present embodiment, said control unit 208 is used for the work of identification card simulator 2 each unit is controlled.Particularly; The 202 analysis protocol stack instructions of control resolution unit; And feedback data corresponding with the instruction of said protocol stack, the protocol stack in the control buffer unit accessed cache unit instruct, and control second transmitting element 207 and to said mobile terminal protocol stack active data etc. are provided.
In addition; Identification card simulator 2 in the present embodiment is except can the normal behaviour and abnormal behaviour of simulating mobile terminal identification card; Can also develop the STK (STK that value-added service is ordered in the simulating mobile terminal identification card; SIM Toolkit), reach USIM application tool (USAT, USIM Application Toolkit) and simulating mobile terminal identification card authentication and encryption behavior or the like.
Need to prove that not necessarily there are buffer unit in above-mentioned identification card simulator 2 and the internal structure of portable terminal identification card and incomplete same in the portable terminal identification card like reality; But; In the present embodiment, for identification card simulator 2, its behavior is the same with the behavior of portable terminal identification card; Particularly; Concerning the mobile terminal protocol stack, on the interface of mobile terminal protocol stack and said identification card simulator 2, the behavior of identification card simulator 2 transmission/reception data is consistent with the behavior of portable terminal identification card transmission/reception data.
In the present embodiment, the course of work of said identification card simulator 2 can be carried out referring to the method for testing that above-mentioned identification card simulator is carried out said mobile terminal protocol stack, no longer launches specifically to detail here.
In sum, the technical scheme of the embodiment of the invention has following beneficial effect at least:
Mobile terminal protocol stack to be measured through transplanting in the testing equipment sends the protocol stack instruction to the portable terminal identification card; And mobile terminal receive identification card feedback with the corresponding data of said protocol stack instruction; Analyze the feedback after mobile terminal protocol stack to be measured receives said data, to obtain test result to said mobile terminal protocol stack to be measured; For manual test; Because testing equipment possesses powerful disposal ability; Can realize on the one hand mutual comprehensively between mobile terminal protocol stack to be measured and the identification card; To comprehensively testing between mobile terminal protocol stack to be measured and the identification card, on the other hand, also improved the testing efficiency of testing between mobile terminal protocol stack to be measured and the portable terminal identification card.
Further; Owing to adopted the identification card simulator that the behavior of portable terminal identification card is simulated; Simulated the different behaviors of portable terminal identification card, particularly, normal behaviour and abnormal behaviour that can the simulating mobile terminal identification card.For instrument test; Since its can the simulating mobile terminal identification card normal behaviour and abnormal behaviour; And then can test the compatibility between different mobile terminals identification card and the mobile terminal protocol stack to be measured; Enlarged the test specification between mobile terminal protocol stack to be measured and the identification card, realized the integrality of testing between mobile terminal protocol stack to be measured and the identification card, and; Because test need not carried out based on real identification card, so reduced testing cost.
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.