CN104239208B - Recovery method for exceptions during automation execution - Google Patents

Recovery method for exceptions during automation execution Download PDF

Info

Publication number
CN104239208B
CN104239208B CN201410480015.2A CN201410480015A CN104239208B CN 104239208 B CN104239208 B CN 104239208B CN 201410480015 A CN201410480015 A CN 201410480015A CN 104239208 B CN104239208 B CN 104239208B
Authority
CN
China
Prior art keywords
execution
function
abnormal
qtp
stop
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.)
Active
Application number
CN201410480015.2A
Other languages
Chinese (zh)
Other versions
CN104239208A (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.)
Fujian Xinghai Communication Technology Co Ltd
Original Assignee
Fujian Xinghai Communication 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 Fujian Xinghai Communication Technology Co Ltd filed Critical Fujian Xinghai Communication Technology Co Ltd
Priority to CN201410480015.2A priority Critical patent/CN104239208B/en
Publication of CN104239208A publication Critical patent/CN104239208A/en
Application granted granted Critical
Publication of CN104239208B publication Critical patent/CN104239208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a recovery method for exceptions during automation execution. The recovery method comprises the following steps: automatically loading a QTP (quick test professional) script, and starting QTP; executing script combination on a series of functions of automation execution software; executing function test on a QTP program frame, recording and saving tested function information to a configuration file, and collating acquired function results into a rest report; capturing the exceptions and handling the exceptions during the execution until normal stop or error stop; capturing stop execution; judging whether the stop execution is abnormal or not; if the stop execution belongs to the normal stop, exiting a program, and otherwise, entering the next step; starting an external script; performing statistics on the number of times of the stop execution with an abnormal function, and deciding whether the function is continued or the function is skipped to enter next function execution according to the number of times of the stop execution. According to the recovery method provided by the invention, automatic handling on the exceptions during the automation is realized, so that continuous operation is performed by the QTP, the manual maintenance is reduced, and the work efficiency is improved.

Description

Abnormal restoring method during a kind of automated execution
Technical field
The present invention relates to abnormal restoring method during technical field of measurement and test, more particularly, to a kind of automated execution.
Background technology
QuickTestProfessional (abbreviation QTP) instrument being provided by Hewlett-Packard Corporation at present can be carried out to product automatically Change unmanned testing, thus time and efforts expending during reducing test etc., but due to automatization, nobody is subject to environment the term of execution, Including network etc., otherwise impact is more, thus a lot of steps can be led to cannot to lead to hold according to the operation execution of design Occur abnormal between the departure date, and because automated execution is usually in quitting time execution, execute in the case of execution exception To be interrupted.For these problems, most abnormal non-automated instrument can avoid problem above, including tool interface itself Problem, but may also need to arrange for a long time accumulation for unusual part, which takes time and effort.
Content of the invention
The technical problem to be solved in the present invention, is to provide abnormal restoring method during a kind of automated execution, it is to avoid Abend during automatization, reduce manual maintenance, improve work efficiency.
The present invention is realized in:Abnormal restoring method during a kind of automated execution, methods described includes walking as follows Suddenly:
Step 10, automatically load QTP script by external scripts, and start QTP;
Step 20, a series of function executing script combinations to automated execution software by a function script;
Step 30, QTP program frame perform function test, the function information recording and preserving test to configuration file, The function result of acquisition is organized into test report;
If the step 40 QTP term of execution runs into exception, judge extremely whether can capture, if can catch the exception, continue Continuous execution, if can not catch the exception, then stops execution;If the QTP term of execution does not run into exception, continue executing with, until Stop execution after having executed repertoire;
Step 50, capture to stopping execution, judge this stopping execution with the presence or absence of abnormal, if this stopping execution belonging to Normal stopping, then quit a program, and otherwise, enters step 60;
Step 60, startup external scripts, count to the stopping execution number of times of abnormal function, judge whether this number of times reaches To preset value, if this number of times reaches preset value, load abnormal configuration, filter the functional identity currently going to, jump to step 40 next function of execution, in term of execution search function ID, with configuration file, the abnormal function ID of record is compared, and works as execution To functional identity be more than abnormal function ID when can perform this function, if this number of times is not up to preset value, read abnormal configure, skip to The abnormal function that step 30 preserved result from last time continues executing with.
Further, the function information in described step 30 includes functional identity.
Further, judging in described step 50 that this stopping execution whether there is abnormal is to be judged by abnormal configurator , there is expression and exist extremely in file.
Further, start external scripts in described step 60 to further include:
Test and related program process required for closing before step 61, startup, the blank environment of recovery;
Step 62, startup QTP simultaneously directly configure to QTP.
Further, described external scripts are passed through to obtain the startup to QTP for the com interface realization of QTP, are called and directly join Put operation.
Further, described external scripts will close test program before starting every time, need to recover blank environment, that is, close Test and related program process required for closing.
Further, in described step 62, the configuration of QTP is included with object time-out and mistake stops.
The invention has the advantages that:The present invention passes through the exception catching function of QTP program frame and external scripts unit Exception during to automated execution is captured and is recovered abnormal, and the present invention can depart from the scene Restoration Mechanism of QTP so that different Often process and be not limited to object, object, algorithm, environment, program etc. extremely all can capture by this way and avoid, decrease artificial Maintenance work, and when One function cannot continue execution, next function executing can be redirected it is achieved that persistently executing test, Improve work efficiency.
Brief description
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is abnormal restoring flow chart of the present invention.
Fig. 2 is the inventive method external scripts Booting sequence figure.
Specific embodiment
Refer to Fig. 1 and Fig. 2, abnormal restoring method during a kind of automated execution, comprise the steps:
Step 10, automatically load QTP script by external scripts, and start QTP;
Step 20, a series of function executing script combinations to automated execution software by a function script;
Step 30, QTP program frame perform function test, the function information recording and preserving test to configuration file, This function information includes functional identity, and the function result of acquisition is organized into test report;
If the step 40 QTP term of execution runs into exception, judge extremely whether can capture, if can catch the exception, continue Continuous execution, if can not catch the exception, then stops execution;If the QTP term of execution does not run into exception, continue executing with, until Stop execution after having executed repertoire;
Step 50, capture to stopping execution, judge that this stopping execution, with the presence or absence of abnormal, judges that this stopping execution is No presence is abnormal to be judged by abnormal configurator, and file has expression and exists extremely, if this stopping execution belonging to normal Stop, then quit a program, otherwise, enter step 60;
Step 60, startup external scripts, external scripts will close test program before starting every time, recovers blank environment, Test and related program process required for closing, start QTP and directly QTP are entered by obtaining the com interface of QTP Row configures, and this configuration includes object time-out and mistake stops, and also includes algorithmic error stopping, environmental factorss stop and program error Stop, external scripts count to the stopping execution number of times of abnormal function, judge whether this number of times reaches preset value, if this time Number reaches preset value, then load abnormal configuration, filter the functional identity currently going to, jump to step 30 and connect by the com of QTP Mouth calls QTP to execute next function, and in term of execution search function ID, with configuration file, the abnormal function ID of record is compared Relatively, can perform this function when the functional identity going to is more than abnormal function ID, if this number of times is not up to preset value, read abnormal Configuration, is skipped to step 30 and is continued executing with by the abnormal function that the com interface interchange QTP of QTP preserved result from last time.
Although the foregoing describing the specific embodiment of the present invention, those familiar with the art should manage Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, are familiar with this Equivalent modification and change that the technical staff in field is made in the spirit according to the present invention, all should cover the present invention's In scope of the claimed protection.

Claims (7)

1. during a kind of automated execution abnormal restoring method it is characterised in that:Comprise the steps:
Step 10, automatically load QTP script by external scripts, and start QTP;
Step 20, a series of function executing script combinations to automated execution software by a function script;
Step 30, the test of QTP program frame perform function, the function information recording and preserving test, to configuration file, will obtain The function result taking is organized into test report;
If the step 40 QTP term of execution runs into exception, judge extremely whether can capture, if can catch the exception, continue to hold OK, if can not catch the exception, then stop execution;If the QTP term of execution does not run into exception, continue executing with, until execution Stop execution after complete repertoire;
Step 50, capture to stopping execution, judge this stopping execution with the presence or absence of abnormal, if this stopping execution belonging to normal Stop, then quit a program, otherwise, enter step 60;
Step 60, startup external scripts, count to the stopping execution number of times of abnormal function, judge whether this number of times reaches pre- If value, if this number of times reaches preset value, load abnormal configuration, filter the functional identity currently going to, jump to step 40 and hold Next function of row, in term of execution search function ID, with configuration file, the abnormal function ID of record is compared, when go to Functional identity can perform this function when being more than abnormal function ID, if this number of times is not up to preset value, reads abnormal configuration, skips to step 30 abnormal functions preserving result from last time continue executing with.
2. during a kind of automated execution according to claim 1 abnormal restoring method it is characterised in that:Described step 30 In function information include functional identity.
3. during a kind of automated execution according to claim 1 abnormal restoring method it is characterised in that:Described step 50 Middle this stopping of judgement is executed and is judged by abnormal configurator with the presence or absence of abnormal, and file presence represents that presence is abnormal.
4. during a kind of automated execution according to claim 1 abnormal restoring method it is characterised in that:Described step 60 Middle startup external scripts further include:
Test and related program process required for closing before step 61, startup, the blank environment of recovery;
Step 62, startup QTP simultaneously directly configure to QTP.
5. during a kind of automated execution according to claim 1 abnormal restoring method it is characterised in that:Described outside foot The com interface that this passes through to obtain QTP is realized the startup to QTP, is called and directly configuration operation.
6. during a kind of automated execution according to claim 1 abnormal restoring method it is characterised in that:Described outside foot This will close test program before starting every time, needs to recover blank environment, that is, test and related program required for closing Process.
7. during a kind of automated execution according to claim 4 abnormal restoring method it is characterised in that:Described step 62 In object time-out is included to the configuration of QTP and mistake stops.
CN201410480015.2A 2014-09-19 2014-09-19 Recovery method for exceptions during automation execution Active CN104239208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410480015.2A CN104239208B (en) 2014-09-19 2014-09-19 Recovery method for exceptions during automation execution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410480015.2A CN104239208B (en) 2014-09-19 2014-09-19 Recovery method for exceptions during automation execution

Publications (2)

Publication Number Publication Date
CN104239208A CN104239208A (en) 2014-12-24
CN104239208B true CN104239208B (en) 2017-02-15

Family

ID=52227324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410480015.2A Active CN104239208B (en) 2014-09-19 2014-09-19 Recovery method for exceptions during automation execution

Country Status (1)

Country Link
CN (1) CN104239208B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095082A (en) * 2015-08-21 2015-11-25 北京金山安全软件有限公司 application program testing method and device
CN107577591A (en) * 2016-07-05 2018-01-12 中兴通讯股份有限公司 A kind of method, apparatus and system of automatic test abnormal protection
CN110895509B (en) * 2019-11-15 2023-04-18 泰康保险集团股份有限公司 Test processing method and device, electronic equipment and storage medium
CN112327812B (en) * 2020-11-18 2022-02-08 杭州电力设备制造有限公司 Multi-mode factory inspection method for intelligent monitor of switch cabinet

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101482849A (en) * 2009-02-24 2009-07-15 北京星网锐捷网络技术有限公司 Test monitoring method and apparatus
CN101599039A (en) * 2008-06-03 2009-12-09 华为技术有限公司 Abnormality eliminating method and device under the embedded type C language environment
CN102222042A (en) * 2011-06-28 2011-10-19 北京新媒传信科技有限公司 Automatic software testing method based on cloud computing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8739131B2 (en) * 2007-05-04 2014-05-27 International Business Machines Corporation Completing functional testing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599039A (en) * 2008-06-03 2009-12-09 华为技术有限公司 Abnormality eliminating method and device under the embedded type C language environment
CN101482849A (en) * 2009-02-24 2009-07-15 北京星网锐捷网络技术有限公司 Test monitoring method and apparatus
CN102222042A (en) * 2011-06-28 2011-10-19 北京新媒传信科技有限公司 Automatic software testing method based on cloud computing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于QTP的自动化功能测试研究与实现";张鹤;《中国优秀硕士学位论文全文数据库 信息科技辑》;20120515(第05期);第四章 *

Also Published As

Publication number Publication date
CN104239208A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN104239208B (en) Recovery method for exceptions during automation execution
US9122671B2 (en) System and method for grammar based test planning
CN109726107A (en) Test method, device, equipment and storage medium
JP2008129714A (en) Abnormality detection method, abnormality detection device, abnormality detection program, and learning model generation method
CN108897676B (en) Flight guidance control software reliability analysis system and method based on formalization rules
CN107861864A (en) Automated testing method, system and computer-readable recording medium
CN106598871A (en) Automatic analysis method and system for collapse file under Linux
CN106330599B (en) Android application program network flow multithreading acquisition system and method
WO2021008029A1 (en) Case execution method, apparatus and device, and computer readable storage medium
CN104246714A (en) Software defect verification
WO2018006702A1 (en) Abnormality processing method, apparatus and system in automation test
CN109840199A (en) A kind of automated testing method and terminal
US9471472B2 (en) Method and system for entering information
JP2008094299A (en) Platform door operation abnormality detection system
JP2010256997A (en) Error reproduction system and error reproduction investigation method for field trouble, and scenario execution program
CN109684222A (en) A kind of user terminal application software remote failure diagnosis system and method
CN108984396B (en) Automatic test method and system and test terminal
CN109189672B (en) Automatic testing method for micro-service, server and computer readable storage medium
CN105868041A (en) Easy-to-apply server configuration automatic testing method
CN102184137A (en) Unattended intelligent automatic regression testing method
CN106130815B (en) Board level testing method and device
CN110825645A (en) Assembly line type full-process automatic testing method
CN109739127B (en) Intelligent program-controlled information capturing method
CN117289144B (en) Fault positioning method, device, equipment, system and medium
CN104778092B (en) It is a kind of to apply the analysis to the energy consumption leak of sensor and detecting system for Android

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