CN101221530B - Method for automatically leading in test cases - Google Patents

Method for automatically leading in test cases Download PDF

Info

Publication number
CN101221530B
CN101221530B CN2008100043957A CN200810004395A CN101221530B CN 101221530 B CN101221530 B CN 101221530B CN 2008100043957 A CN2008100043957 A CN 2008100043957A CN 200810004395 A CN200810004395 A CN 200810004395A CN 101221530 B CN101221530 B CN 101221530B
Authority
CN
China
Prior art keywords
test case
document
title
management system
test
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
CN2008100043957A
Other languages
Chinese (zh)
Other versions
CN101221530A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2008100043957A priority Critical patent/CN101221530B/en
Publication of CN101221530A publication Critical patent/CN101221530A/en
Application granted granted Critical
Publication of CN101221530B publication Critical patent/CN101221530B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention relates to a test case automatic leading-in method, wherein, test case keywords and corresponding relations of test case fields are set in advance. The invention comprises the following steps: a hierarchical test case organization structure is created in a test case management system according to document hierarchy; test case contents required for introduction are searched layer by layer on the current hierarchy by adoption of a test case keyword recognition method; different field contents of test cases in the current hierarchy and test case fields of the test case management system are automatically and correspondingly led in layer by layer by adoption of a test case field corresponding strategy; graphics and tables in the current hierarchy are automatically recognized layer by layer and taken as enclosures to be led in together according to user requirements. The method of the invention can flexibly realize automatic introduction of documents with different formats according to the user requirements.

Description

A kind of method for automatically leading in test cases
Technical field
The present invention relates to system testing and software test, be specifically related to a kind of method for automatically leading in test cases.
Background technology
Test case is meant for effective verifying software characteristic, finds software defect and the specific collection that comprises test purpose, testing procedure, expectation test result of writing.Test case has embodied testing scheme, method, technology and strategy, and its particular content comprises test target, test environment, input data, testing procedure, expected results, test script etc.
Test case generally exists with the form of WORD document, and the tester is by writing and manage maintenance and the renewal that realizes the test case content to the test case document.Along with the development of software engineering especially database, workflow management software engineering, some test case management systems have appearred at present, and adopt database to come test case is managed, the mode of comparing document management is more convenient and efficient.
But in actual test activity, many tests are still carried out according to the test case of documenting, such as network access testing, the selection test of operator, or some in-company research and development tests etc., all to carry out the record of test execution and test result according to the test case document.These documents may manual directly be write, also may be from above-mentioned test and management instrument, to derive automatically according to fixing template, and also exist simultaneously the test case on the document is increased to needs in the test case management system, with the content of abundant and substantial test case management system.May how that the test case in these documents is more efficient, easy problem that this just exists test case to safeguard: the test case document format of different operators, different company be widely different, in the test case management system that imports to appointment? the general way of industry mainly contains following several at present:
First kind: pure manual import operation, promptly the clauses and subclauses and the content of test case in the artificial judgment document adopt the mode that copies one by one, pastes to be input in the test case management system then.Original, the poor efficiency of this mode, but under the situation that lacks effective ways, still adopted in a large number.
Second kind: some test case management systems provide the method that imports test case from the document of specifying template automatically, and the template of its appointment is generally identical with the template that derives.This method large increase efficient and the accuracy that imports, but only effective, so adaptive surface is narrow to meeting the document that template requires.
The third: is for the document of different templates form, the test case management system that has provides relative flexible processing mode, the different field content place of all test cases manually is provided with the importing mark in document, imports to respectively in the test case field of test case management system correspondence.This method can be applied to the document of different templates, but owing to each test case field in the document all needs artificial judgment and the importing mark is set, actual importing efficient is not high.
Summary of the invention
The technical issues that need to address of the present invention are how a kind of method for automatically leading in test cases is provided, and can satisfy the demand that the test case in the document of different templates is carried out efficiently, imported automatically.
Above-mentioned first technical matters of the present invention solves like this, a kind of method for automatically leading in test cases is provided, default test case key word and test case field corresponding relation, described corresponding relation is the corresponding relation of the concrete cell location of use-case form in test case field and the WORD document, may further comprise the steps:
1.1) according to document header line level in the WORD document, down handle line by line from Document Title, obtain the level and the text of header line, in the test case management system, create the test case institutional framework of stratification;
1.2) successively adopt test case keyword recognition method, search the test case content that needs importing in the current level in document automatically;
1.3) successively adopt test case field relative strategy, the different field content and the test case management system testing use-case field of current level build-in test use-case in the document are carried out the correspondence importing automatically;
1.4) successively discern figure, form in the current level in the document automatically, and import together as annex according to customer requirements.
According to introduction method provided by the invention, it is the WORD document that described document requires.
According to introduction method provided by the invention, described step 1.1) specifically comprise:
1.1.1) document is opened all titles of a display document with " outline view ";
1.1.2) down handle line by line from Document Title, obtain the level and the text of current header line;
1.1.3) judge whether the body matter in the current title is empty, if it is empty, then this title does not import in the test case management system as the test case catalogue, otherwise this title imports in the test case management system as the test case catalogue, its parent directory is the document catalogue of title establishment at the middle and upper levels, then handles next title.
According to introduction method provided by the invention, described test case key word is the word that the fixed position exists in the document form, include, but are not limited to: fixing exist, plural word in the document use-case forms such as test name, test purpose, test environment, testing procedure, expected results, its objective is and automatically other forms in test case form and the document to be distinguished according to key word that the test case key word is all supported equally to Chinese and English.
According to introduction method provided by the invention, described test case management system testing use-case field includes, but are not limited to test case title, test case explanation, test environment, testing procedure, expected results or the like, and Chinese and English is all supported equally.
According to introduction method provided by the invention, described corresponding relation refers to the corresponding relation of each cell of use-case form in test case field contents and the document, such as the position of corresponding test document use-case form the 1st row of the use-case field " test case title (Test Item) " of test case management system the 2nd row, or the like.
Above corresponding relation, according to the difference of form in the concrete test case document, such as each test case field contents in the difference of the cell location of form and difference to some extent.
According to introduction method provided by the invention, described step 1.2), 1.3) and 1.4) specifically comprise:
7.1) for the content of each non-NULL title in the document,, judge whether text or the form in the title belongs to the test case content according to the method for test case keyword matching;
7.2) if belong to the test case content, in the test case management system,, under this catalogue, create test case of the same name according to the next catalogue of in the test case management system, locating the title correspondence of document place title through judging;
7.3) after the test case creation,, from document, extract each field contents according to default field corresponding relation, import in the newly-built test case, form the test case content that meets the test case management system;
7.4) whether search in the document in this test case content drawings attached and table content, if having, then the annex as test case imports in the test case management system.
A kind of method for automatically leading in test cases provided by the invention, be not subjected to the restriction of document format, behind user's nominative testing use-case key word, test case field corresponding relation, realize automatic importing process, than prior art, method of the present invention has following beneficial effect: (1) only needs to be used to discern the key word of test case and the corresponding relation that imports field beginning to set, and just can import automatically, and importing efficient and speed are greatly improved; (2) for the document of different-format, all can realize flexibly according to user's requirement importing automatically; When (3) test case imports, can be automatically come hierarchical relationship between the stroke test case, be convenient to maintenance and management according to the structure of document; (4) for accompanying drawing that belongs to test case in the document and form etc., also can import automatically as annex.
Description of drawings
Further the present invention is described in detail below in conjunction with the drawings and specific embodiments.
Fig. 1 is a process flow diagram of the present invention;
Fig. 2 is of the present invention according to Document Title level establishment test case level process flow diagram;
Fig. 3 is that test case of the present invention imports process flow diagram;
Fig. 4 is the importing schematic flow sheet of a specific embodiment of the present invention.
Embodiment
At first, the inventive method is described, uses software to realize that automatically its concrete treatment scheme comprises the steps: as shown in Figure 1
101) specify the document that needs importing by the user, requiring here is the document of WORD, includes the content of the test case of needs importing in the document, and the concrete template of document, the form of form are not all required.
102) communication of setting up automatically between document and the test case management system connects, here the external interface that use test case management system is provided (as the data bank interface) set up and document between connection, be convenient to follow-uply from document, to extract the test case content, generate test case and import in the test case management system.
103) automatic opening document, from document, find out different header lines, and according to the level of header line, automatically discern the hierarchical structure of document, thereby in the test case management system, successively create the test case institutional framework of stratification, be convenient to test case and import, make that follow-up test case maintenance and management is more convenient by level.This step is actually a round-robin process, and document is successively handled, and repeats following step 104 in each layer again)~105), up to the document ending, all use-case levels are built up, all use-cases import successfully.
104) the test case key word of setting according to the user, in the current level, searching which content automatically is the content that belongs to test case to be imported, in order to importing in document.Because may have some in the document and import test case irrelevant text and form, needing effective method can discern which content automatically is the test case that needs are derived, and the form of test case is still relatively-stationary in one piece of document, show such as form with set form, or show with the paragraph of set form, therefore just provide possible for adopting key word to discern test case.This method allows the user provide the test case key word according to some features of test case in the current document, after the user sets these key words, this method will be carried out keyword matching to the text in the document, form automatically, filters out the test case content that needs derivation.
Test case field corresponding relation according to the user sets imports the test case content that identifies in the corresponding field of test case management system one by one.May there be a plurality of fixing fields in test case in the test case management system, and the field of test case text, form is also had any different in the document of different-format, therefore need the user to set the corresponding relation of field, be convenient to the corresponding automatically importing of field contents.
105) picture in the document, form etc. are automatically identified come and import in the test case management system.A test case imports and finishes thus, if the follow-up test case in addition of the current level of document, then repeating step 104)~step 105).
Wherein:
(1) in above-mentioned step 103) in, need generate the structure of test case according to the structure of document, specifically as shown in Figure 2, may further comprise the steps:
201) document is opened all titles of a display document with " outline view ".
202) down handle line by line from Document Title, obtain the level and the text of current header line.
203) judge whether the body matter in the current title is empty, promptly judges whether there is the content of test case in this title or has subtitle.If the two does not exist, then be empty, this title does not import in the test case management system as the test case catalogue, then handles next title.
204) if title content is not empty, then in the test case management system, create a test case catalogue, its parent directory is the document catalogue of title establishment at the middle and upper levels.
Circulation is carried out thus, until the title of entire document all generates the test case catalogue of corresponding level in the test case management system, is used for depositing the test case that next will import by level.
(2) in above-mentioned step 104)~105) in, test case need be imported the test case management system, specifically as shown in Figure 3, comprise the steps:
301) for the content of each non-NULL title in the document,, judge whether the text (form) in the title belongs to the test case content according to the method for test case keyword matching.
302), in the test case management system,, under this catalogue, create test case of the same name according to the next catalogue of in the test case management system, locating the title correspondence of document place title if belong to the test case content through judging.
303) after the test case creation,, from document, extract each field contents, import in the newly-built test case, form the test case content that meets the test case management system according to default field corresponding relation.
304) whether search in the document in this test case content content such as drawings attached and form.If have, then the annex as test case imports in the test case management system.
At present, by software this use-case introduction method being carried out robotization realizes.The example that imports for an actual document illustrates below:
401) selection contains the WORD document of test case content, prepares to import.
402), be provided for the plural key word of Automatic Logos use-case form, the content of nominal key and the particular location in form according to the concrete form of use-case form in the document.
403) the position corresponding relation of concrete cell in each field of test case in the management system and the document form is set.
404) after above two preliminary works are finished, begin to import, all use-case contents comprise that annex, picture etc. all import in the case management system automatically in document, and set up corresponding use-case hierarchical directory according to the title level of document in management system automatically.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (5)

1. method for automatically leading in test cases, it is characterized in that, default test case key word and test case field corresponding relation, described corresponding relation is the corresponding relation of the concrete cell location of use-case form in test case field and the WORD document, may further comprise the steps:
1.1) according to document header line level in the WORD document, down handle line by line from Document Title, obtain the level and the text of header line, in the test case management system, create the test case institutional framework of stratification;
1.2) successively adopt test case keyword recognition method, search the test case content that needs importing in the current level in document automatically;
1.3) successively adopt test case field relative strategy, the different field content and the test case management system testing use-case field of current level build-in test use-case in the document are carried out the correspondence importing automatically;
1.4) successively discern figure, form in the current level in the document automatically, and import together as annex according to customer requirements.
2. according to the described introduction method of claim 1, it is characterized in that described step 1.1) specifically comprise:
1.1.1) document is opened all titles of a display document with " outline view ";
1.1.2) down handle line by line from Document Title, obtain the level and the text of current header line;
1.1.3) judge whether the body matter in the current title is empty, if it is empty, then this title does not import in the test case management system as the test case catalogue, otherwise this title imports in the test case management system as the test case catalogue, its parent directory is the document catalogue of title establishment at the middle and upper levels, then handles next title.
3. according to the described introduction method of claim 1, it is characterized in that described test case key word is the word that the fixed position exists in the document form.
4. according to the described introduction method of claim 1, it is characterized in that described test case management system testing use-case field comprises: test case title, test case explanation, test environment, testing procedure or expected results.
5. according to claim 1 or 2 described introduction methods, it is characterized in that described step 1.2), 1.3) and 1.4) specifically comprise:
7.1) for the content of each non-NULL title in the document,, judge whether text or the form in the title belongs to the test case content according to the method for test case keyword matching;
7.2) if belong to the test case content, in the test case management system,, under this catalogue, create test case of the same name according to the next catalogue of in the test case management system, locating the title correspondence of document place title through judging;
7.3) after the test case creation,, from document, extract each field contents according to default field corresponding relation, import in the newly-built test case, form the test case content that meets the test case management system;
7.4) whether search in the document in this test case content drawings attached and table content, if having, then the annex as test case imports in the test case management system.
CN2008100043957A 2008-01-22 2008-01-22 Method for automatically leading in test cases Expired - Fee Related CN101221530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100043957A CN101221530B (en) 2008-01-22 2008-01-22 Method for automatically leading in test cases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100043957A CN101221530B (en) 2008-01-22 2008-01-22 Method for automatically leading in test cases

Publications (2)

Publication Number Publication Date
CN101221530A CN101221530A (en) 2008-07-16
CN101221530B true CN101221530B (en) 2010-06-16

Family

ID=39631383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100043957A Expired - Fee Related CN101221530B (en) 2008-01-22 2008-01-22 Method for automatically leading in test cases

Country Status (1)

Country Link
CN (1) CN101221530B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186457A (en) * 2011-12-29 2013-07-03 阿里巴巴集团控股有限公司 Method and device for automatically generating test case
CN107133178A (en) * 2017-05-24 2017-09-05 郑州云海信息技术有限公司 A kind of different-format method for automatically leading in test cases

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840429A (en) * 2010-04-21 2010-09-22 北京中星微电子有限公司 Method and system for pretreatment of test stimulus and a testing method
CN102929700B (en) * 2012-10-11 2015-03-11 福州锐达数码科技有限公司 Method for importing word test library to interactive teaching platform
CN102955738B (en) * 2012-11-13 2014-10-29 中原工学院 Driving and driven hybrid testing method for simulation system
CN103365777B (en) * 2013-07-04 2015-12-02 卫生部统计信息中心 A kind of method for generating test case and system
CN103412818B (en) * 2013-08-14 2016-06-29 迈普通信技术股份有限公司 Automated testing method and system
CN103473045A (en) * 2013-08-27 2013-12-25 广州华多网络科技有限公司 Method and device for generating interface documents
CN103927296A (en) * 2014-03-06 2014-07-16 广东电网公司电网规划研究中心 Intelligent extracting method for engineering characteristic indexes in paragraph contents of word document of transmission and transformation project
CN109408355B (en) * 2017-08-16 2022-02-22 迈普通信技术股份有限公司 Test case obtaining method and device
CN108241607A (en) * 2018-01-22 2018-07-03 中国平安人寿保险股份有限公司 Automatically imported method, server and the storage medium of test of heuristics case
CN111506588A (en) * 2020-04-10 2020-08-07 创景未来(北京)科技有限公司 Method and device for extracting key information of electronic document

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527509A (en) * 2003-03-06 2004-09-08 华为技术有限公司 Test method
CN1534905A (en) * 2003-03-31 2004-10-06 华为技术有限公司 Intelligent business testing method based on structural unit
US20050160322A1 (en) * 2004-01-13 2005-07-21 West John R. Method and system for conversion of automation test scripts into abstract test case representation with persistence
CN1770148A (en) * 2004-11-01 2006-05-10 华为技术有限公司 Automatic generation system and method for script file
CN1780236A (en) * 2004-11-17 2006-05-31 中兴通讯股份有限公司 Universal testing system and method for telecommunication intelligent service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527509A (en) * 2003-03-06 2004-09-08 华为技术有限公司 Test method
CN1534905A (en) * 2003-03-31 2004-10-06 华为技术有限公司 Intelligent business testing method based on structural unit
US20050160322A1 (en) * 2004-01-13 2005-07-21 West John R. Method and system for conversion of automation test scripts into abstract test case representation with persistence
CN1770148A (en) * 2004-11-01 2006-05-10 华为技术有限公司 Automatic generation system and method for script file
CN1780236A (en) * 2004-11-17 2006-05-31 中兴通讯股份有限公司 Universal testing system and method for telecommunication intelligent service

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186457A (en) * 2011-12-29 2013-07-03 阿里巴巴集团控股有限公司 Method and device for automatically generating test case
CN107133178A (en) * 2017-05-24 2017-09-05 郑州云海信息技术有限公司 A kind of different-format method for automatically leading in test cases

Also Published As

Publication number Publication date
CN101221530A (en) 2008-07-16

Similar Documents

Publication Publication Date Title
CN101221530B (en) Method for automatically leading in test cases
CN101661460B (en) Method and device for generating management system report
CN101430714B (en) Content structuring process method and system based on model
CN103218402B (en) General database data structure and data mover system and method thereof
CN103186639B (en) Data creation method and system
CN102780574A (en) Service-oriented office data collocation method and device as well as service-oriented office data inspection method and device
CN102467525A (en) Document associating method and system
CN116361487A (en) Multi-source heterogeneous policy knowledge graph construction and storage method and system
CN107291938A (en) Order Query System and method
CN106021359A (en) CAD file modification method and device
CN102402684A (en) Method and device for determining type of certificate and method and device for translating certificate
CN109800312A (en) A kind of power marketing information management data input system and method
CN104572730A (en) Method and device for importing and exporting digital resources
CN106570189A (en) Convenient management method for computer application systems and documents
CN103761188B (en) A kind of automated testing method of electronic document management system
CN105824968B (en) A kind of method, device and mobile terminal for clearing up file
CN104216986A (en) Device and method for improving data query efficiency through pre-operation according to data update period
CN105786939A (en) Memory database optimization method and apparatus
CN107391695A (en) A kind of information extracting method based on big data
CN108513144A (en) A kind of EPG gray scales dissemination method and its system based on IPTV
CN101685463A (en) Classified indexing method for patent literature
CN104679740A (en) Data processing system
CN100347702C (en) Extendible marked language key constraint verification method based on structural analysis
CN111275409A (en) Power grid overhaul audit data processing system and processing method
CN112882712B (en) Pattern designer for medical inspection LIMS system inspection flow and design method thereof

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100616

Termination date: 20180122

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