CN102710833B - Mobile phone test case and automatic generation method thereof - Google Patents

Mobile phone test case and automatic generation method thereof Download PDF

Info

Publication number
CN102710833B
CN102710833B CN201210133083.2A CN201210133083A CN102710833B CN 102710833 B CN102710833 B CN 102710833B CN 201210133083 A CN201210133083 A CN 201210133083A CN 102710833 B CN102710833 B CN 102710833B
Authority
CN
China
Prior art keywords
checkpoint
case
numbering
data
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210133083.2A
Other languages
Chinese (zh)
Other versions
CN102710833A (en
Inventor
曾元清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201210133083.2A priority Critical patent/CN102710833B/en
Publication of CN102710833A publication Critical patent/CN102710833A/en
Application granted granted Critical
Publication of CN102710833B publication Critical patent/CN102710833B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a test case, which comprises a test case management list. In the test case management list, a module list is arranged under an item list and internally comprises a functional list; and a detection point list is arranged in the functional list and comprises a test case list. An automatic generation method of the test case comprises the following steps of: filling information in the item list, the module list, the functional list and the detection point list; then starting to call an inquiry function, and searching the detection point list to find all non-automatically-generated detection points; intersecting all the non-automatically-generated detection points with a public data list; and generating a new view according to a relation between the types of the detection points and the types of data, a relation among an extreme value upper limit, the types of the data and an extreme value length and a relation among an extreme value lower limit, the types of the data and the extreme value length, wherein the view comprises all information of the detection point list and the public data list. According to the invention, repeated work of writing automatic test cases is reduced; and the system is stable and convenient to maintain.

Description

A kind of mobile phone test case and automatic generation method thereof
Technical field
The present invention relates to a kind of for mobile phone automatized testing tool, particularly relate to a kind of test case and automatic generation method thereof.
Background technology
Existing automation use-case is that Mechanic Engineer oneself is write by Edit Document instruments such as EXCEL and preserved substantially.Use-case due to automatic test is different from the use-case of Black-box Testing, and each use-case needs to be accurate to every single stepping, and its accuracy is 3-10 times of black box use-case, therefore it is also very large to write the manpower expended.And in automation use-case, the type of detection of repetition is very many, entering is that test point is different, repeats and loaded down with trivial details use-case of writing wastes Mechanic Engineer's suitable time.Sometimes engineer does not directly write use-case to save time, and automatic test will be made like this without reference, and its result is quite bad.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of test case and automatic generation method thereof are provided, save duplication of labour when writing automatic test cases, system stability, be convenient to safeguard.
In order to achieve the above object, the technical solution used in the present invention is: a kind of test case, and described test case comprises management of test cases table, and management of test cases table comprises
Repertory, comprises bullets, project name and item remark;
Module table, comprises module numbering, module title, module remarks and bullets;
Menu, comprises function numbering, function title, function remarks and module numbering;
Whether checkpoint is shown, comprise checkpoint numbering, function numbering, checkpoint title, checkpoint type, the limiting value upper limit, limiting value lower limit, generated and system default parameter;
Common data table, comprises data type, data content, limiting value length and data explanation;
Test case table, comprises use-case numbering, function numbering, use-case explanation, the expectation of use-case data, use-case and parameter;
In described test case table, repertory divides into module table, divides into menu in module table, and menu divides into test point table, by test point table generating test use case table.
Further, the checkpoint type of described checkpoint table is character, literal code, floating number, integer, English digital underline, ASCII encodes.
Further, the limiting value upper limit of described character and limiting value lower limit be greater than zero natural number, by default, and adjust with test environment.
Further, whether the system default parameter in the table of described checkpoint comprises checkpoint type, checkpoint length, uses, checkpoint numbering.
Further, data type in described common data table is character, literal code, floating number, integer, English digital underline, ASCII encodes, data content is the data that corresponding data type uses, limiting value length be greater than zero natural number, by default, and adjust with test environment.
Further, a kind of described test data auto generation method, its step is as follows:
Step 1, program start, and in repertory entry item information, comprise bullets, project name and item remark;
Step 2, fill in module information at module table, comprise module numbering, module title, module remarks and bullets;
Step 3, fill in function information at menu, comprise function numbering, function title, function remarks and module numbering;
Whether step 4, in checkpoint, the information of checkpoint filled in by table, comprise checkpoint numbering, function numbering, checkpoint title, checkpoint type, the limiting value upper limit, limiting value lower limit, generated and system default parameter;
Step 5, start to call query function;
Step 6, search checkpoint table, find all checkpoints automatically do not generated;
Step 7, all checkpoints automatically do not generated to be intersected with common data table, associated with data type by checkpoint type, the limiting value upper limit associates with data type and limiting value length, limiting value lower limit associates with data type and limiting value length, generate a new view, view will comprise all information of checkpoint table and common data table;
Step 8, the data in view are inserted test case table, the generation automatically of use-case numbering, function numbering uses the function numbering of checkpoint table, and checkpoint title addend is allegedly bright to be illustrated as use-case, data content conversion, as use-case data, is expected as use-case by data content;
Step 9, call query function and terminate, be designated automatically generate being designated the checkpoint automatically do not generated, automatic generating test use case completes;
Whether the use-case that step 10, inspection generate automatically meets test request, does not meet, returns step 1 according to results modification;
Step 11, automatic generating case are complete.
Compared with prior art, the invention has the beneficial effects as follows: by automatic generating test use case, save duplication of labour when writing automatic test cases, system stability, be convenient to safeguard.
Accompanying drawing explanation
Fig. 1 is test case theory diagram of the present invention;
Fig. 2 is method flow diagram of the present invention.
Embodiment
Purport of the present invention is to overcome the deficiencies in the prior art, a kind of test case is provided, described test case comprises management of test cases table, in described test case table, repertory divides into module table, comprise menu in module table, in menu, be provided with test point table, and comprise test case table in test point table.This test data auto generation method is for filling in and information at repertory, module table, menu, checkpoint table, then start to call query function, search checkpoint table, find all checkpoints automatically do not generated, all checkpoints automatically do not generated are intersected with common data table, associated with data type by checkpoint type, the limiting value upper limit associates with data type and limiting value length, limiting value lower limit associates with data type and limiting value length, generate new view, view will comprise all information of checkpoint table with common data table.The present invention saves duplication of labour when writing automatic test cases, system stability, is convenient to safeguard.
Be described in detail, to be interpretated more in-depth technical characteristic of the present invention and advantage with reference to accompanying drawing below in conjunction with embodiment.
As shown in Figure 1, a kind of test case, described test case comprises management of test cases table to test case theory diagram of the present invention, and management of test cases table comprises
Repertory, comprises bullets, project name and item remark;
Module table, comprises module numbering, module title, module remarks and bullets;
Menu, comprises function numbering, function title, function remarks and module numbering;
Whether checkpoint is shown, comprise checkpoint numbering, function numbering, checkpoint title, checkpoint type, the limiting value upper limit, limiting value lower limit, generated and system default parameter;
Common data table, comprises data type, data content, limiting value length and data explanation;
Test case table, comprises use-case numbering, function numbering, use-case explanation, the expectation of use-case data, use-case and parameter;
In described test case table, repertory divides into module table, divides into menu in module table, and menu divides into test point table, by test point table generating test use case table.
Further, the checkpoint type of described checkpoint table is character, literal code, floating number, integer, English digital underline, ASCII encodes, and described character is unrestricted character, and literal code is various countries' literal codes such as Chinese/Japanese.
Further, the limiting value upper limit of described character and limiting value lower limit be greater than zero natural number, by default, and adjust with test environment.
Further, whether the system default parameter in the table of described checkpoint comprises checkpoint type, checkpoint length, uses, checkpoint numbering.
Further, data type in described common data table is character, literal code, floating number, integer, English digital underline, ASCII encodes, data content is the data that corresponding data type uses, limiting value length be greater than zero natural number, by default, and adjust with test environment.Described character is unrestricted character, and literal code is various countries' literal codes such as Chinese/Japanese.
The repertory of test case, module table, menu, checkpoint table and test case table be distributed as repertory, module table, menu, checkpoint table and test case table all only have one, and the content of subordinate's table associates the content of higher level's table by external key, thus mark attaching relation.
Method flow diagram of the present invention as shown in Figure 2, further, a kind of described test data auto generation method, its step is as follows:
Step 1, program start, and in repertory entry item information, comprise bullets, project name and item remark;
Step 2, fill in module information at module table, comprise module numbering, module title, module remarks and bullets;
Step 3, fill in function information at menu, comprise function numbering, function title, function remarks and module numbering;
Whether step 4, in checkpoint, the information of checkpoint filled in by table, comprise checkpoint numbering, function numbering, checkpoint title, checkpoint type, the limiting value upper limit, limiting value lower limit, generated and system default parameter;
Step 5, start to call query function;
Step 6, search checkpoint table, find all checkpoints automatically do not generated;
Step 7, all checkpoints automatically do not generated to be intersected with common data table, associated with data type by checkpoint type, the limiting value upper limit associates with data type and limiting value length, limiting value lower limit associates with data type and limiting value length, generate a new view, view will comprise all information of checkpoint table and common data table;
Step 8, the data in view are inserted test case table, the generation automatically of use-case numbering, function numbering uses the function numbering of checkpoint table, and checkpoint title addend is allegedly bright to be illustrated as use-case, data content conversion, as use-case data, is expected as use-case by data content;
Step 9, call query function and terminate, be designated automatically generate being designated the checkpoint automatically do not generated, automatic generating test use case completes;
Whether the use-case that step 10, inspection generate automatically meets test request, does not meet, returns step 1 according to results modification;
Step 11, automatic generating case are complete.
Further, in step 8, use-case numbering system generates, use checkpoint numbering to illustrate that merging becomes use-case title (as " number "+" for adding 00 before pure digi-tal "), data content makes data (as " 00123 ") as test case, be transformed to use-case according to data content as external key, checkpoint title and data expects for (expectation as " 00123 " is " 123 "), and these data are inserted special envoy's use-case table.
Although the present invention has made clear and complete description by specific embodiment to test case and test data auto generation method, but the present invention is not limited only to described embodiment, and to one skilled in the art, the all improvement made based on the present invention and selection are contingent and be all included in the present invention.

Claims (5)

1. an automatic generation method for mobile phone test case, its spy is being: described test case comprises management of test cases table, and management of test cases table comprises
Repertory, comprises bullets, project name and item remark;
Module table, comprises module numbering, module title, module remarks and bullets;
Menu, comprises function numbering, function title, function remarks and module numbering;
Whether checkpoint is shown, comprise checkpoint numbering, function numbering, checkpoint title, checkpoint type, the limiting value upper limit, limiting value lower limit, generated and system default parameter;
Common data table, comprises data type, data content, limiting value length and data explanation;
Test case table, comprises use-case numbering, function numbering, use-case explanation, the expectation of use-case data, use-case and parameter;
In described test case table, repertory divides into module table, divides into menu in module table, and menu divides into test point table, by test point table generating test use case table;
The automatic generation method of described mobile phone test case comprises the steps:
Step 1, program start, and in repertory entry item information, comprise bullets, project name and item remark;
Step 2, fill in module information at module table, comprise module numbering, module title, module remarks and bullets;
Step 3, fill in function information at menu, comprise function numbering, function title, function remarks and module numbering;
Whether step 4, in checkpoint, the information of checkpoint filled in by table, comprise checkpoint numbering, function numbering, checkpoint title, checkpoint type, the limiting value upper limit, limiting value lower limit, generated and system default parameter;
Step 5, start to call query function;
Step 6, search checkpoint table, find all checkpoints automatically do not generated;
Step 7, all checkpoints automatically do not generated to be intersected with common data table, associated with data type by checkpoint type, the limiting value upper limit associates with data type and limiting value length, limiting value lower limit associates with data type and limiting value length, generate a new view, view will comprise all information of checkpoint table and common data table;
Step 8, the data in view are inserted test case table, the generation automatically of use-case numbering, function numbering uses the function numbering of checkpoint table, and checkpoint title addend is allegedly bright to be illustrated as use-case, data content conversion, as use-case data, is expected as use-case by data content;
Step 9, call query function and terminate, be designated automatically generate being designated the checkpoint automatically do not generated, automatic generating test use case completes;
Whether the use-case that step 10, inspection generate automatically meets test request, does not meet, returns step 1 according to results modification;
Step 11, automatic generating case are complete.
2. the automatic generation method of mobile phone test case according to claim 1, is characterized in that: the checkpoint type of described checkpoint table is character, literal code, floating number, integer, English digital underline, ASCII encodes.
3. the automatic generation method of mobile phone test case according to claim 2, is characterized in that: the limiting value upper limit of described character and limiting value lower limit be greater than zero natural number, by default, and adjust with test environment.
4. the automatic generation method of mobile phone test case according to claim 3, is characterized in that: whether the system default parameter in the table of described checkpoint comprises checkpoint type, checkpoint length, uses, checkpoint numbering.
5. the automatic generation method of mobile phone test case according to claim 4, it is characterized in that: the data type in described common data table is character, literal code, floating number, integer, English digital underline, ASCII encodes, data content is the data that corresponding data type uses, limiting value length be greater than zero natural number, by default, and adjust with test environment.
CN201210133083.2A 2012-05-03 2012-05-03 Mobile phone test case and automatic generation method thereof Expired - Fee Related CN102710833B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210133083.2A CN102710833B (en) 2012-05-03 2012-05-03 Mobile phone test case and automatic generation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210133083.2A CN102710833B (en) 2012-05-03 2012-05-03 Mobile phone test case and automatic generation method thereof

Publications (2)

Publication Number Publication Date
CN102710833A CN102710833A (en) 2012-10-03
CN102710833B true CN102710833B (en) 2015-07-08

Family

ID=46903376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210133083.2A Expired - Fee Related CN102710833B (en) 2012-05-03 2012-05-03 Mobile phone test case and automatic generation method thereof

Country Status (1)

Country Link
CN (1) CN102710833B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425579B (en) * 2013-07-26 2016-07-06 南方电网科学研究院有限责任公司 Mobile terminal system security evaluation method based on potential function
CN106407105B (en) * 2016-08-26 2019-02-01 上海合福信息科技有限公司 A kind of test design sheets generation method
CN107066380B (en) * 2017-02-23 2023-05-16 海信视像科技股份有限公司 Authentication method and device for application containing redundancy function
CN109840193A (en) * 2017-11-27 2019-06-04 中兴通讯股份有限公司 A kind of method and device generating automation use-case
CN109144867B (en) * 2018-08-15 2021-07-13 优信拍(北京)信息科技有限公司 Test method and test system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1677197A1 (en) * 2004-12-31 2006-07-05 ST Incard S.r.l. Test case automatic generation method for testing proactive GSM applications on SIM card
CN101847120A (en) * 2010-03-31 2010-09-29 中兴通讯股份有限公司 Design method and system of test case

Also Published As

Publication number Publication date
CN102710833A (en) 2012-10-03

Similar Documents

Publication Publication Date Title
CN102710833B (en) Mobile phone test case and automatic generation method thereof
US6816779B2 (en) Programmatically computing street intersections using street geometry
US7046827B2 (en) Adapting point geometry for storing address density
CN106777644B (en) Automatic generation method and device for power plant identification system code
CN105159822A (en) Software defect positioning method based on text part of speech and program call relation
CN104965714A (en) Code generation method and system of application software
CN101719095A (en) Method and device for managing regression testing
CN101859303A (en) Metadata management method and management system
US6658356B2 (en) Programmatically deriving street geometry from address data
CN108509199A (en) Method, device, equipment and storage medium for automatically generating Chinese annotations
CN104102881A (en) Kernel object link relation based memory forensics method
CN104636401A (en) Data rollback method and device for SCADA system
CN103780448A (en) Widget layer code generation method and device
CN109725894B (en) Java language based elastic search code generation method and tool
CN109543164B (en) Method for generating drilling histogram by combining Autocad with Excel
CN102929982A (en) Media scanned file indexing method and device
CN105912723A (en) Storage method of custom field
CN101013430A (en) Searching method and apparatus
CN100377158C (en) Method for creating library file
CN101452387A (en) Service flow management method
CN102799423A (en) Method and device for implementing dynamic method in JSF (java service face)
CN111401051B (en) Express information analysis method and system
CN107357784B (en) Intelligent analysis method for data model of relay protection device equipment
CN102339342B (en) Method for fast materializing of parameterization device unit
CN110675729B (en) Multi-version local geographic information integrated drawing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150708

CF01 Termination of patent right due to non-payment of annual fee