CN102855127A - Device and method for generating testing script - Google Patents

Device and method for generating testing script Download PDF

Info

Publication number
CN102855127A
CN102855127A CN 201110178019 CN201110178019A CN102855127A CN 102855127 A CN102855127 A CN 102855127A CN 201110178019 CN201110178019 CN 201110178019 CN 201110178019 A CN201110178019 A CN 201110178019A CN 102855127 A CN102855127 A CN 102855127A
Authority
CN
China
Prior art keywords
test script
assignment
entries
type
numerical value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 201110178019
Other languages
Chinese (zh)
Inventor
白璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANGHAI BASECOM TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI BASECOM TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI BASECOM TECHNOLOGY Co Ltd filed Critical SHANGHAI BASECOM TECHNOLOGY Co Ltd
Priority to CN 201110178019 priority Critical patent/CN102855127A/en
Publication of CN102855127A publication Critical patent/CN102855127A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a device and a method for generating a testing script. The testing script has multiple types; each type of the testing script has at least one parameter; the generation device comprises an input module for receiving the type input by a user and data, and a generation module for generating the testing script having the type which is input by the user and endowing at least one parameter of the testing script to be the data input by the user. By the device and the method, necessary parameters are supplied by testing personnel, and the corresponding testing scripts can be automatically, quickly and correctly generated, so that the testing efficiency and the testing accuracy are greatly improved.

Description

The generating apparatus of test script and method
Technical field
The present invention relates to a kind of method of testing of wireless module, particularly relate to a kind of generation method of generating apparatus and the test script that a kind of generating apparatus that utilizes this test script is realized of test script.
Background technology
To the test of the phonebook function piece of wireless module generally be by execution read phone book entries, the operation of writing phone book entries and deletion phone book entries carries out, and comprises particularly pressure test and volume test etc.
At present, carrying out the test script that phone directory test adopts is all manually write by the tester usually, this in the situation that heavier will inevitably causing of test assignment expend a large amount of time writing of test script, and also easily cause the content of test script to make mistakes in chaos, these all can produce adverse influence to the efficient of test and the accuracy of test.
In addition, because different SIM (Subscriber Identity Module, client identification module) card is not quite similar to the memory capacity of phone book entries, therefore the tester also need to carry out accommodation to the capacity of test script for the memory capacity of current SIM card when manually writing test script, this undoubtedly can so that efficient and the accuracy of test descend further.
Summary of the invention
The technical problem to be solved in the present invention is need to manually write test script in order to overcome in the prior art by the tester when the phone directory that carries out wireless module is tested, therefore the accuracy that causes the efficient of testing and test is lower defective all, provide a kind of to need the tester that necessary parameter is provided, just can automatically, rapidly and correctly generate the generating apparatus of the test script of corresponding test script, and the generation method of the test script realized of a kind of generating apparatus that utilizes this test script.
The present invention solves above-mentioned technical matters by following technical proposals: a kind of generating apparatus of test script, test script is divided into polytype, every type test script all has at least one parameter, this generating apparatus comprises: a load module is used for accepting type and the data that the user inputs; One generates module, is used for generating a test script of the type of user's input, and the data that this at least one parameter assignment of this test script is inputted for the user.
The syntax format of the test script that the generating apparatus precognition of this test script of the present invention is every type, in case therefore the user has indicated the particular type of test script to be generated, and (these concrete values are referred to as data in the present invention to provide the concrete value of each contained in the test script of the type parameter, and value had herein both comprised the situation of single numerical point, the situation that also comprises a numerical range), this generating apparatus just can be on the backstage automatically, generate rapidly and correctly the test script an of the type, thus the tester is freed from heavy manually writing the work.
This generating apparatus can adopt the method for software programming to realize, the present invention does not limit the programming language that this software programming process adopts, and for example can preferably adopt C Plus Plus.
Wherein, the test script of this test script for being consisted of by the AT order.
Wherein, this test script is for being used for the test script of phone directory test.
Wherein, this test script is divided into and reads the phone book entries type, writes phone book entries type and deletion phone book entries type.
Wherein, the parameter of reading the test script of phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders, and the data of user's input comprise that one is used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment; The parameter of writing the test script of phone book entries type comprises the execution time interval between range of entries, entry contents and per two the adjacent AT orders, and the data of user's input comprise that one is used to the numerical value, one of this range of entries assignment to be used to the character string and of this entry contents assignment to be used to the numerical value of this execution time interval assignment; The parameter of the test script of deletion phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders, and the data of user's input comprise that one is used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment.
The present invention also aims to provide the generation method of the test script that a kind of generating apparatus that utilizes above-mentioned test script realizes, this generation method comprises: S 1, the user is to these load module input type and data; S 2, this generation module generates the test script of the type of user's input, and data that this at least one parameter assignment of this test script is inputted for the user.
Wherein, the test script of this test script for being consisted of by the AT order.
Wherein, this test script is for being used for the test script of phone directory test.
Wherein, this test script is divided into and reads the phone book entries type, writes phone book entries type and deletion phone book entries type.
Wherein, the parameter of reading the test script of phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders; At S 1In, the type of user input is for reading the phone book entries type, and the data that the user inputs are one to be used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment; At S 2In, the test script of phone book entries type is read in this generation module generation one, and this range of entries assignment is used to the numerical value of this range of entries assignment for this, and this execution time interval assignment is used to the numerical value of this execution time interval assignment for this.
Wherein, the parameter of writing the test script of phone book entries type comprises the execution time interval between range of entries, entry contents and per two the adjacent AT orders; At S 1In, the type of user input is for writing the phone book entries type, and the data that the user inputs are one to be used to the numerical value, one of this range of entries assignment to be used to the character string and of this entry contents assignment to be used to the numerical value of this execution time interval assignment; At S 2In, the test script of phone book entries type is write in this generation module generation one, and this range of entries assignment is used to the numerical value of this range of entries assignment for this, be the character string that is used to this entry contents assignment with this entry contents assignment, this execution time interval assignment is used to the numerical value of this execution time interval assignment for this.
Wherein, the parameter of the test script of deletion phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders; At S 1In, the type of user input is deletion phone book entries type, the data of user's input are one to be used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment; At S 2In, this generation module generates the test script of a deletion phone book entries type, and this range of entries assignment is used to the numerical value of this range of entries assignment for this, and this execution time interval assignment is used to the numerical value of this execution time interval assignment for this.
Positive progressive effect of the present invention is: the present invention can reduce tester's work load significantly, they no longer need manually to write one by one various test scripts, but only need to indicate to the generating apparatus of this test script the particular type of test script to be generated, and provide the concrete value of each contained in the test script of the type parameter, then this generating apparatus of the present invention just can be automatically, rapidly and correctly for the tester generates a complete satisfactory test script, thereby greatly improve testing efficiency and test accuracy.
Description of drawings
Fig. 1 is the screenshot capture of software interface of an embodiment of the generating apparatus of this test script of the present invention.
Fig. 2 has adopted the process flow diagram of the phone directory test after the present invention.
Embodiment
Provide preferred embodiment of the present invention below in conjunction with accompanying drawing, to describe technical scheme of the present invention in detail.
The generating apparatus of this test script of the present invention can generate for the tester of various career fields various types of test scripts, as long as the syntax format of the test script of this type that this generating apparatus precognition is to be generated should the precognition process then can embody in the software programming implementation procedure of this generating apparatus.
Generally speaking, all can contain one or more parameters in every type the test script.Correspondingly, include a load module and in this generating apparatus of the present invention and generate module.
This load module is used for indicating for the user particular type of test script to be generated, and is used for inputting necessary data with the concrete value of each contained parameter of the test script that provides the type for the user.
This generation module then is used for generating a test script according to the syntax format of the test script of the type of having predicted, and in this test script, each parameter will adopt the corresponding data of user's input to carry out assignment.
Correspondingly, the generation method of this test script of the present invention mainly comprises following two steps:
S 1, the user is to the particular type of this load module input test script to be generated, and the concrete value of each contained parameter in the test script of the type;
S 2, this generation module generates the test script of the type of user's input, in this test script, the corresponding data that each parameter will adopt the user to input carries out assignment.
Next the present invention will be described as example take the test script for the phone directory test, and because the test of present phone directory generally all is to adopt the test script that is made of the AT order to carry out, therefore hereinafter will be emphatically be illustrated based on the situation that adopts AT to order to write test script.
The test script that is used for the phone directory test generally includes following three types: be used for carrying out read the phone book entries test read the phone book entries type, be used for carrying out write the phone book entries test write phone book entries type and the deletion phone book entries type that is used for carrying out the test of deletion phone book entries.
The generating apparatus of this test script of the present invention can adopt such as the method for the various programming languages such as C Plus Plus with software programming and realize, therefore it will have one and be used for the software interface that carries out man-machine interaction with the user, shown in Figure 1ly just be the screenshot capture of this generating apparatus at the software interface of an embodiment who is used for phone directory is tested.
This screenshot capture among Fig. 1 is in fact a kind of optional design of the visualization interface of above-mentioned load module, and those skilled in the art also can adopt other design form certainly.
" reading phone directory " among Fig. 1 and " writing phone directory " these two options are the particular types that indicate test script to be generated for the user, just can generate a test script of reading the phone book entries type when selecting " reading phone directory " option, write phone book entries type or the test script of deletion phone book entries type and just can generate one when selecting " writing phone directory " option, specifically generate in the two any type will by the user further the data of input determine.
Next the other parts among Fig. 1 are described.
When the test script of phone book entries type is read in needs generation one, the user at first selects " reading phone directory " option, then vacant " character string " fills frame, and fills to insert a numerical value (this numerical value can not greater than the capacity of current SIM card) in the frame and fill in the frame to " Sleep Time " to " Index " and also insert a numerical value.The syntax format of the test script that generate this moment just is:
AT+CPBR=<i>
Sleep(N)
Wherein, the span of parameter i is 1~Index, and the value of parameter N is the numerical value that the user inserts in " SleepTime " filling frame.A test script like this can read the 1st content to Index clauses and subclauses in the phone directory, and the execution time between per two adjacent AT orders is spaced apart N.
When the test script of phone book entries type is write in needs generation one, the user at first selects " writing phone directory " option, then to the character string of inserting a string representative phone book entries content during " character string " fills frame, and fill to insert a numerical value (this numerical value can not greater than the capacity of current SIM card) in the frame and fill in the frame to " Sleep Time " to " Index " and also insert a numerical value.The syntax format of the test script that generate this moment just is:
AT+CPBW=<i 〉,<character string 〉
Sleep(N)
Wherein, the span of parameter i is 1~Index, and parameter<character string〉value be the user and fill the character string of inserting in the frame in " character string ", the value of parameter N is the user and fills the numerical value of inserting in the frame at " SleepTime ".Particularly, according to the form AT+CPBW=<index1 for the AT order of writing phone book entries〉[,<number 〉, [<type 〉, [<text 〉]]] as can be known, parameter<character string〉in content should be<number, [<type 〉, [<text 〉]], wherein number represents telephone number to be written, the type of the telephone number that the type representative is to be written, the corresponding title of the telephone number that the text representative is to be written, for example when filling in the frame in " character string ", the user inserts [" 10086 ", 129, " CHINAMOBILE "] time, a such test script just can be write as to the content of Index clauses and subclauses the 1st in the phone directory: telephone number is 10086, the type of telephone number is 129 (being national number), the corresponding name of telephone number is called CHINAMOBILE, and the execution time between per two adjacent AT orders is spaced apart N.
When needs generate the test script of a deletion phone book entries type, the user at first selects " writing phone directory " option, then vacant " character string " fills frame, and fills to insert a numerical value (this numerical value can not greater than the capacity of current SIM card) in the frame and fill in the frame to " Sleep Time " to " Index " and also insert a numerical value.The syntax format of the test script that generate this moment just is:
AT+CPBW=<i>
Sleep(N)
Wherein, the span of parameter i is 1~Index, and the value of parameter N is the numerical value that the user inserts in " SleepTime ".A test script like this can be deleted in the phone directory the 1st to Index clauses and subclauses, and the execution time between per two adjacent AT orders is spaced apart N.
As shown in Figure 2, the testing process of having used the phonebook function piece after the present invention just will for:
Step 100, open the software interface of the generating apparatus of this test script of the present invention, select therein " reading phone directory " or " writing phone directory " option, and in " character string ", " Index " and " SleepTime " filling frame, carry out suitable filling in, then press " determining " button on this software interface, then this generating apparatus just can generate a complete satisfactory test script automatically.According to concrete test request, in this step, also can generate a plurality of dissimilar test scripts, use for follow-up test.
Step 101 utilizes Serial Port Line that wireless module to be tested is linked to each other with PC, and confirms that the AT order communication between the two is normal.
Step 102 imports this test script that generates in the step 100 in the testing tool on PC, and carries out test according to common flow process this test script that brings into operation.
Step 103 checks after test is finished whether wireless module has the record of restarting, and test log (daily record) is backed up, and judges then whether wireless module has passed through this time test.
In sum, the present invention can reduce tester's work load significantly, they no longer need manually to write one by one various test scripts, but only need to indicate to the generating apparatus of this test script the particular type of test script to be generated, and provide the concrete value of each contained in the test script of the type parameter, then this generating apparatus of the present invention just can automatically, rapidly and correctly meet the test script of demand for the tester generates one fully, thereby greatly improves testing efficiency and test accuracy.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited by appended claims.Those skilled in the art can make various changes or modifications to these embodiments under the prerequisite that does not deviate from principle of the present invention and essence, but these changes and modification all fall into protection scope of the present invention.

Claims (12)

1. the generating apparatus of a test script, test script is divided into polytype, and every type test script all has at least one parameter, and this generating apparatus comprises:
One load module is used for accepting type and the data that the user inputs;
One generates module, is used for generating a test script of the type of user's input, and the data that this at least one parameter assignment of this test script is inputted for the user.
2. the generating apparatus of test script as claimed in claim 1 is characterized in that, the test script of this test script for being made of the AT order.
3. the generating apparatus of test script as claimed in claim 2 is characterized in that, this test script is for being used for the test script of phone directory test.
4. the generating apparatus of test script as claimed in claim 3 is characterized in that, this test script is divided into to be read the phone book entries type, write the phone book entries type and delete the phone book entries type.
5. the generating apparatus of test script as claimed in claim 4, it is characterized in that, the parameter of reading the test script of phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders, and the data of user's input comprise that one is used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment; The parameter of writing the test script of phone book entries type comprises the execution time interval between range of entries, entry contents and per two the adjacent AT orders, and the data of user's input comprise that one is used to the numerical value, one of this range of entries assignment to be used to the character string and of this entry contents assignment to be used to the numerical value of this execution time interval assignment; The parameter of the test script of deletion phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders, and the data of user's input comprise that one is used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment.
6. the generation method of the test script realized of a generating apparatus that utilizes test script claimed in claim 1, this generation method comprises:
S 1, the user is to these load module input type and data;
S 2, this generation module generates the test script of the type of user's input, and data that this at least one parameter assignment of this test script is inputted for the user.
7. the generation method of test script as claimed in claim 6 is characterized in that, the test script of this test script for being made of the AT order.
8. the generation method of test script as claimed in claim 7 is characterized in that, this test script is for being used for the test script of phone directory test.
9. the generation method of test script as claimed in claim 8 is characterized in that, this test script is divided into to be read the phone book entries type, write the phone book entries type and delete the phone book entries type.
10. the generation method of test script as claimed in claim 9 is characterized in that, the parameter of reading the test script of phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders;
At S 1In, the type of user input is for reading the phone book entries type, and the data that the user inputs are one to be used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment;
At S 2In, the test script of phone book entries type is read in this generation module generation one, and this range of entries assignment is used to the numerical value of this range of entries assignment for this, and this execution time interval assignment is used to the numerical value of this execution time interval assignment for this.
11. the generation method of test script as claimed in claim 9 is characterized in that, the parameter of writing the test script of phone book entries type comprises the execution time interval between range of entries, entry contents and per two the adjacent AT orders;
At S 1In, the type of user input is for writing the phone book entries type, and the data that the user inputs are one to be used to the numerical value, one of this range of entries assignment to be used to the character string and of this entry contents assignment to be used to the numerical value of this execution time interval assignment;
At S 2In, the test script of phone book entries type is write in this generation module generation one, and this range of entries assignment is used to the numerical value of this range of entries assignment for this, be the character string that is used to this entry contents assignment with this entry contents assignment, this execution time interval assignment is used to the numerical value of this execution time interval assignment for this.
12. the generation method of test script as claimed in claim 9 is characterized in that, the parameter of the test script of deletion phone book entries type comprises the execution time interval between range of entries and per two the adjacent AT orders;
At S 1In, the type of user input is deletion phone book entries type, the data of user's input are one to be used to the numerical value and one of this range of entries assignment to be used to the numerical value of this execution time interval assignment;
At S 2In, this generation module generates the test script of a deletion phone book entries type, and this range of entries assignment is used to the numerical value of this range of entries assignment for this, and this execution time interval assignment is used to the numerical value of this execution time interval assignment for this.
CN 201110178019 2011-06-28 2011-06-28 Device and method for generating testing script Pending CN102855127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110178019 CN102855127A (en) 2011-06-28 2011-06-28 Device and method for generating testing script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110178019 CN102855127A (en) 2011-06-28 2011-06-28 Device and method for generating testing script

Publications (1)

Publication Number Publication Date
CN102855127A true CN102855127A (en) 2013-01-02

Family

ID=47401741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110178019 Pending CN102855127A (en) 2011-06-28 2011-06-28 Device and method for generating testing script

Country Status (1)

Country Link
CN (1) CN102855127A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776336A (en) * 2016-12-29 2017-05-31 武汉船舶通信研究所 Test script generation method and device, method for testing software and device
CN108139896A (en) * 2015-08-09 2018-06-08 甲骨文国际公司 EVM(extended virtual machine) instruction set framework

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108139896A (en) * 2015-08-09 2018-06-08 甲骨文国际公司 EVM(extended virtual machine) instruction set framework
CN108139896B (en) * 2015-08-09 2021-10-19 甲骨文国际公司 Extended virtual machine instruction set architecture
US11385872B2 (en) 2015-08-09 2022-07-12 Oracle International Corporation Extending a virtual machine instruction set architecture
CN106776336A (en) * 2016-12-29 2017-05-31 武汉船舶通信研究所 Test script generation method and device, method for testing software and device

Similar Documents

Publication Publication Date Title
CN102831052B (en) Test exemple automation generating apparatus and method
CN102541740B (en) A kind of mobile phone notes automated testing method based on Android
CN101930400B (en) SDK (Software Development Kit) automatic test system and method
CN101867501B (en) Method and system for automatically testing consistence of SNMP (Simple Network Management Protocol) interface information model
CN104899016B (en) Allocating stack Relation acquisition method and device
CN105808417A (en) Automated testing method and proxy server
CN104461846B (en) The method and apparatus for detecting application program power consumption
CN101944128A (en) Data export and import method and device
CN103336805A (en) Method and device for automatic customized report form generation based on graphical mapping relationship
CN1248116C (en) General purpose testing arrangement for embedded module and subsystem based on host machine platform
CN106557308B (en) Software continuous integration method and device
CN111930617B (en) Automatic test method and device based on data objectification
CN101604290B (en) Background module test method and backstage module test system
CN103377123B (en) A kind of web page code automated testing method and device
CN102135939B (en) Test case operation dispatching device and method
CN102289445A (en) Method and device for analyzing XML (Extensible Markup Language) file and terminal
CN101727199A (en) Input method and input equipment
CN103914212B (en) A kind of terminal device and its application configuration method
CN104156430A (en) Device and method for fast extracting Android mobile phone data
CN102855127A (en) Device and method for generating testing script
CN103109289A (en) Web-based script language editing method, system and web client
CN103327178B (en) Automatically method and the device of extension telephone in the page is dialed
CN103389938A (en) Log CPK analysis method and system
CN106204252A (en) Internal credit and debt remaining sum identification, the method and system gathering and checking
CN103699482A (en) Method and device for testing reasonableness of controls

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130102