Nothing Special   »   [go: up one dir, main page]

CN103631590B - The edit methods of automatic test script - Google Patents

The edit methods of automatic test script Download PDF

Info

Publication number
CN103631590B
CN103631590B CN201310628679.4A CN201310628679A CN103631590B CN 103631590 B CN103631590 B CN 103631590B CN 201310628679 A CN201310628679 A CN 201310628679A CN 103631590 B CN103631590 B CN 103631590B
Authority
CN
China
Prior art keywords
test script
script
edit methods
database
mapping form
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
CN201310628679.4A
Other languages
Chinese (zh)
Other versions
CN103631590A (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 MINGCHUANG SOFTWARE SCIENCE & 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 GUANGDONG MINGCHUANG SOFTWARE SCIENCE & TECHNOLOGY Co Ltd filed Critical GUANGDONG MINGCHUANG SOFTWARE SCIENCE & TECHNOLOGY Co Ltd
Priority to CN201310628679.4A priority Critical patent/CN103631590B/en
Publication of CN103631590A publication Critical patent/CN103631590A/en
Application granted granted Critical
Publication of CN103631590B publication Critical patent/CN103631590B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of edit methods of automatic test script, comprise the following steps:Mapping form is generated according to test script to be edited;Any row of the mapping form is selected to be operated;The test script is automatically updated according to the operation.Compared with prior art, the edit methods of automatic test script of the present invention, mapping form is generated according to test script to be edited first, then after any row in Choose for user form is operated, can be according to operation automatic updating test script, it is achieved thereby that simply, quickly editing test script, the reusability of test script is increased, the work of developer is reduced.

Description

The edit methods of automatic test script
Technical field
The present invention relates to automatic test field, relates more specifically to a kind of edit methods of automatic test script.
Background technology
With being continuously increased for cell-phone function, customized version increases, and market cycle shortens, and cell phone software test becomes more It is complicated, and test period it is shorter, so as to cell phone software test automation has become important software test means.It is middle and high End cell phone software test case is in large scale, can reach 3000-6000 bars, wherein automation use-case about 1500-3000 bars, Effectively carry out automatic test, it has to be possible to automatic test script that is inexpensive, quickly developing high coverage, while effectively dropping The maintenance of low test script, transplanting cost.
At present using it is more be that hand-coding automatic test script, i.e. developer are write according to manual test use-case Automatic test script.However, in the method, the reusability of test script is poor, generate the less efficient of test script.
Therefore, it is badly in need of a kind of edit methods of automatic test script to overcome drawbacks described above.
The content of the invention
It is an object of the invention to provide a kind of edit methods of automatic test script, to realize quick editor's test pin This, increases the reusability of test script, reduces the work of developer.
For achieving the above object, the invention provides a kind of edit methods of automatic test script, comprise the following steps:
Mapping form is generated according to test script to be edited;
Any row of the mapping form is selected to be operated;
The test script is automatically updated according to the operation.
Compared with prior art, the edit methods of automatic test script of the present invention, first according to test pin to be edited This generation mapping form, after then any row in Choose for user form is operated, can automatically update test pin according to operation This, it is achieved thereby that simply, quickly generating new test script on the basis of existing test script, increased test script Reusability, reduce the work of developer.
It is preferred that the test script includes multiple script units, each script unit includes action type and control Part is numbered, and one processing mode of each script unit correspondence.
It is preferred that " the generating mapping form according to test script to be edited " is specially:
The row information of the mapping form is generated according to the id that each script unit is stored in database;
Action type and control numbering according to included by the script unit generates the column information of the mapping form.
It is preferred that " the selecting any row of the mapping form to be operated " specifically includes:
Select any row of the mapping form;
The corresponding id of row according to selecting searches picture corresponding with the script unit and layout in database File;
The picture is included, on interface, parsing the topology file and being shown on the picture;
Click the picture by right key to provide multiple operations;
Select any operation and perform.
It is preferred that the operation includes time delay, increases checkpoint, deletion, insertion circulation.
It is preferred that also including while described " automatically updating the test script according to the operation ":
The mapping form and the database are automatically updated according to the operation.
It is preferred that also including after described " automatically updating the test script according to the operation ":
Choose whether to preserve the renewal;
When selecting to be, the test script and the database after updating are preserved.
It is preferred that also including before described " generating mapping form according to test script to be edited ":
Select test script to be edited.
By description below and accompanying drawing is combined, the present invention will become more fully apparent, these accompanying drawings are used to explain the present invention Embodiment.
Description of the drawings
Fig. 1 is the flow chart of one embodiment of edit methods of automatic test script of the present invention.
Specific embodiment
With reference now to Description of Drawings embodiments of the invention, the element numbers being similar in accompanying drawing represent similar element.This In invention, automatic test script is that, based on Android platform, each test script includes multiple script units, each script Unit corresponds to a processing mode, and each script unit includes the information such as action type and control numbering, and such as qq was logged in During Cheng Jinhang automatic tests, test script includes clicking on multiple operations such as account frame, input qq accounts, and these operations are as right Processing mode in qq software test procedures.
Fig. 1 is refer to, the idiographic flow of one embodiment of edit methods of automatic test script of the present invention is described.As schemed Shown in 1, comprise the following steps:
Step S101, arranges a form in automatic test software, it is stipulated that every a line correspondence of form shows script list The id that unit is stored in database, each of which script unit correspond to a processing mode, and the row of form show script unit institute Comprising content, such as action type and control numbering etc.;
Step S102, selects test script to be edited, clicks on editor;
Step S103, generates mapping form according to test script to be edited and the form for pre-setting;
Specifically, the id that each script unit is stored in database is corresponded to the row on form, then successively will be every The action type and control numbering included by the corresponding script unit of a line is shown in the row of form, and the form for obtaining is and reflects Firing table lattice, so as to generate mapping form, wherein action type bag according to test script to be edited and the form for pre-setting Include click, it is long refer to table 1, described the schematic diagram of mapping form by, dragging, button, time delay and checkpoint etc., it is as follows Shown in table 1, to click on control 2, the corresponding script unit of the operation is stored in data for the corresponding operation of the first row of mapping form Id in storehouse is 1, the like, the full content of test script can be reflected so as to pass through the mapping form;
Table 1
Step S104, any row of Choose for user form;
Step S105, calls database, is searched and the script unit pair according to the corresponding id of row for selecting in database Picture and topology file that the processing mode answered is included, wherein picture and topology file are test script in test process before The picture and topology file of middle recording, topology file is XML type;When such as clicking on the second row in selection table 1, can be by the The corresponding id of two rows(Now id=2)Picture corresponding with the script unit and topology file are searched in database;
Step S106, picture is included, on interface, parsing XML layout file and reflecting the layout information obtained after parsing Penetrate on picture;The control that sliding trace is passed through can be shown when mouse slides on picture, so as to test man can be clearly See the layout scenarios on current operation interface;
Step S107, clicks picture by right key, there is provided multiple operations are selected for user;Operation herein includes time delay, increases Checkpoint, deletion, insertion circulation etc.;Such as unnecessary step deletion, to needing to add checkpoint where adding checkpoint Deng, after the insertion circulation in test script, test script can be made to carry out pressure test, after test script editor's time delay, energy The execution of automatic test script is adapted to enough;
Step S108, selects any operation and performs;A certain step is deleted such as;
Step S109, according to the picture in the operation synchronized update database for performing and topology file, mapping form and survey Training sheet;Wherein often carry out single stepping, all can automatic updating test script and corresponding database, mapping form, such as exist Corresponding steps after a certain step is deleted in mapping form, in meeting synchronization removal test script and database;
Step S110, after the completion of editor, chooses whether the renewal before preserving, if so, then execution step S111, conversely, Execution step S112;
Step S111, automatically saves test script and database after updating, so as to generate new test script;
Step S112, does not preserve renewal, recovers initial test script and database.
It should be noted that when a certain row of the present invention in mapping form is operated, both can be by shown in Fig. 1 After certain a line is selected in embodiment, right button operate on picture, it is also possible to directly in mapping form right button to a certain traveling Row operation.
By above description as can be seen that the edit methods of automatic test script of the present invention, when needing to edit test script When, mapping form, after then any row of Choose for user form is operated, meeting are generated according to test script to be edited first Automatic updating test script and database, it is achieved thereby that simply, quickly generating on the basis of existing test script new Test script, increased the reusability of test script, reduce the work of developer.
Above in association with most preferred embodiment, invention has been described, but the invention is not limited in enforcement disclosed above Example, and modification, the equivalent combinations that various essence of the invention are carried out should be covered.

Claims (4)

1. a kind of edit methods of automatic test script, it is characterised in that the test script includes multiple script units, often Script unit described in one includes action type and control numbering, and each script unit one processing mode of correspondence, including with Lower step:
The row information of mapping form is generated according to the id that each script unit is stored in database;
Action type and control numbering according to included by the script unit generates the column information of the mapping form;
Select any row of the mapping form;
The corresponding id of row according to selecting searches picture corresponding with the script unit and topology file in database;
The picture is included, on interface, parsing the topology file and being shown on the picture;
Click the picture by right key to provide multiple operations;
Select any operation and perform;
The test script is automatically updated according to the operation.
2. edit methods of automatic test script as claimed in claim 1, it is characterised in that the operation include time delay, Increase checkpoint, deletion, insertion circulation.
3. edit methods of automatic test script as claimed in claim 2, it is characterised in that described " according to the operation Automatically update the test script " while also include:
The mapping form and the database are automatically updated according to the operation.
4. edit methods of automatic test script as claimed in claim 3, it is characterised in that described " according to the operation Automatically update the test script " also include afterwards:
Choose whether to preserve the renewal;
When selecting to be, the test script and the database after updating are preserved.
CN201310628679.4A 2013-11-29 2013-11-29 The edit methods of automatic test script Expired - Fee Related CN103631590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310628679.4A CN103631590B (en) 2013-11-29 2013-11-29 The edit methods of automatic test script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310628679.4A CN103631590B (en) 2013-11-29 2013-11-29 The edit methods of automatic test script

Publications (2)

Publication Number Publication Date
CN103631590A CN103631590A (en) 2014-03-12
CN103631590B true CN103631590B (en) 2017-04-05

Family

ID=50212688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310628679.4A Expired - Fee Related CN103631590B (en) 2013-11-29 2013-11-29 The edit methods of automatic test script

Country Status (1)

Country Link
CN (1) CN103631590B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699607A (en) * 2015-03-06 2015-06-10 惠州Tcl移动通信有限公司 Automation testing method and system for mobile terminal
CN106874190B (en) * 2016-12-30 2018-03-16 上海壹账通金融科技有限公司 The method of testing and server of user interface
CN106909504A (en) * 2017-02-14 2017-06-30 上海斐讯数据通信技术有限公司 A kind of automatic test script maintaining method and equipment
CN108268373A (en) * 2017-09-21 2018-07-10 平安科技(深圳)有限公司 Automatic test cases management method, device, equipment and storage medium
CN107908566A (en) * 2017-11-27 2018-04-13 平安科技(深圳)有限公司 Automatic test management method, device, terminal device and storage medium
CN108255706A (en) * 2017-11-27 2018-07-06 平安科技(深圳)有限公司 Edit methods, device, terminal device and the storage medium of automatic test script
CN108038052A (en) * 2017-11-27 2018-05-15 平安科技(深圳)有限公司 Automatic test management method, device, terminal device and storage medium
CN115952103A (en) * 2023-03-10 2023-04-11 北京全路通信信号研究设计院集团有限公司 Test script editing method, device, medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526919A (en) * 2009-04-29 2009-09-09 福建星网锐捷网络有限公司 Method for generating script files to test Web application software and device thereof
CN102521120A (en) * 2011-11-16 2012-06-27 中国民航信息网络股份有限公司 Software automation test system and method
CN103019937A (en) * 2012-12-13 2013-04-03 广东欧珀移动通信有限公司 Human-machine interaction interface traverse test method
CN103034583A (en) * 2011-09-30 2013-04-10 国际商业机器公司 Method and system for processing automatic test scrip of software

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526919A (en) * 2009-04-29 2009-09-09 福建星网锐捷网络有限公司 Method for generating script files to test Web application software and device thereof
CN103034583A (en) * 2011-09-30 2013-04-10 国际商业机器公司 Method and system for processing automatic test scrip of software
CN102521120A (en) * 2011-11-16 2012-06-27 中国民航信息网络股份有限公司 Software automation test system and method
CN103019937A (en) * 2012-12-13 2013-04-03 广东欧珀移动通信有限公司 Human-machine interaction interface traverse test method

Also Published As

Publication number Publication date
CN103631590A (en) 2014-03-12

Similar Documents

Publication Publication Date Title
CN103631590B (en) The edit methods of automatic test script
CN104679658B (en) The test method and system of WEB page
CN107544806B (en) Visualize list method for drafting
CN108293081B (en) Deep linking of program playback to mobile application state through user interface events
CN106033393B (en) A kind of applied program testing method and system and mobile terminal
CN103019925B (en) Selector acquisition method and device
CN109448100B (en) Three-dimensional model format conversion method, system, computer device and storage medium
CN106293664A (en) Code generating method and device
JP2021006889A (en) Method, apparatus and device for optimizing wake-up model, and storage medium
CN103597469A (en) Live browser tooling in an integrated development environment
CN104375934B (en) Method for testing reliability of Android mobile phone software
CN109117372A (en) Test code generating method, device, computer equipment and storage medium
CN104408118B (en) The creation method and device of database
CN101499063A (en) Tracing-based database schema evolution method and system
CN102984737B (en) A kind of improve parameter unification collocation method of wireless network and device
CN112506766B (en) Automatic generation method of interactive test case
CN109062570A (en) A kind of method and storage medium automatically generating drawing based on EPLAN software
CN104123401A (en) CAE intelligent system
US20180081878A1 (en) Enhanced batch updates on records and related records system and method
CN106919374B (en) Script generation method and device
CN102929853A (en) DCS (Data Communication System) project data generating system and method based on Excel sheet association
US20230267255A1 (en) Semiconductor equipment modeling method and device
CN108073511A (en) test code generating method and device
CN106776275B (en) A kind of testing process automatic generation method based on Packet Multiplexing
CN105867995A (en) Editing method and device for XML (extensible markup language) file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170807

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: GUANG DONG MING CHUANG SOFTWARE TECHNOLOGY Corp.,Ltd.

CP01 Change in the name or title of a patent holder
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.

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

Granted publication date: 20170405