CN110321285A - Test case processing method and relevant device - Google Patents

Test case processing method and relevant device Download PDF

Info

Publication number
CN110321285A
CN110321285A CN201910531152.7A CN201910531152A CN110321285A CN 110321285 A CN110321285 A CN 110321285A CN 201910531152 A CN201910531152 A CN 201910531152A CN 110321285 A CN110321285 A CN 110321285A
Authority
CN
China
Prior art keywords
case
test
case title
title
estimate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910531152.7A
Other languages
Chinese (zh)
Inventor
何玉聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910531152.7A priority Critical patent/CN110321285A/en
Publication of CN110321285A publication Critical patent/CN110321285A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the present application discloses a kind of test case processing method and relevant device, and wherein method includes: acquisition requirement documents corresponding with the use-case set identifier of test use cases;Extract multiple first use-case titles that the test case is concentrated;According to presupposed information extraction algorithm, the requirement documents are extracted, obtain multiple second use-case titles;According to the multiple second use-case title, scoring calculating is carried out to the multiple first use-case title, obtains the objective appraisal value of the test use cases.Using the application, it can be used for evaluation test set of uses case, convenient for improving the comprehensive of test.

Description

Test case processing method and relevant device
Technical field
This application involves field of computer technology, a kind of test case processing method and relevant device have been related generally to.
Background technique
Software test is link indispensable in software development cycle, and there are still a large amount of software development activities at present is It is carried out based on document form, software test is also based on what the corresponding document of test case was tested.Therefore, to having edited The test use cases of completion are evaluated, and are conducive to improve the comprehensive of test.
Summary of the invention
The embodiment of the present application provides a kind of test case processing method and relevant device, can be used for evaluation test use-case Collection, convenient for improving the comprehensive of test.
In a first aspect, the embodiment of the present application provides a kind of test case processing method, in which:
Obtain requirement documents corresponding with the use-case set identifier of test use cases;
Extract multiple first use-case titles that the test case is concentrated;
According to presupposed information extraction algorithm, the requirement documents are extracted, obtain multiple second use-case titles;
According to the multiple second use-case title, scoring calculating is carried out to the multiple first use-case title, is obtained described The objective appraisal value of test use cases.
Second aspect, the embodiment of the present application provide a kind of test case processing unit, in which:
Acquiring unit, for obtaining requirement documents corresponding with the use-case set identifier of test use cases;
Extraction unit, the multiple first use-case titles concentrated for extracting the test case;It is extracted according to presupposed information Algorithm extracts the requirement documents, obtains multiple second use-case titles;
Score unit, for scoring the multiple first use-case title according to the multiple second use-case title It calculates, obtains the objective appraisal value of the test use cases.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including processor, memory, communication interface and One or more programs, wherein said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned It manages device to execute, described program includes the instruction for the step some or all of as described in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage Medium storing computer program, wherein the computer program is executed by processor to realize portion described in first aspect Point or Overall Steps.
Implement the embodiment of the present application, will have the following beneficial effects:
After above-mentioned test case processing method and relevant device, the set of uses case with test use cases is first obtained Corresponding requirement documents are identified, then extract multiple first use-case titles of test case concentration, and extract according to presupposed information Algorithm extracts the requirement documents to obtain multiple second use-case titles.Then, according to multiple second use-case titles to multiple First use-case title carries out the evaluation of estimate that the test case is calculated in scoring.In this way, the test use cases that can be completed to editor It scores, convenient for improving the comprehensive of test.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Wherein:
Fig. 1 is a kind of flow diagram of test case processing method provided by the embodiments of the present application;
Fig. 2 is a kind of structural schematic diagram of test case processing unit provided by the embodiments of the present application;
Fig. 3 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.According to the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
It describes in detail below to the embodiment of the present application.
Electronic equipment involved by the embodiment of the present application may include the various handheld devices with wireless communication function, Wearable device calculates equipment or is connected to other processing equipments of radio modem and various forms of users set Standby (user equipment, UE), mobile station (mobile station, MS), terminal device (terminal device) etc. Deng.For convenience of description, apparatus mentioned above is referred to as electronic equipment.
Fig. 1 is please referred to, the embodiment of the present application provides a kind of flow diagram of test case processing method.Specifically, such as Shown in Fig. 1, a kind of test case processing method is applied to electronic equipment, in which:
S101: requirement documents corresponding with the use-case set identifier of test use cases are obtained.
In this application, test case (Test Case) be for some special objective and work out one group of test input, hold Row condition and expected results, to test some Program path or to verify whether meet some particular demands.
In this application, test use cases include multiple test cases having edited editor and having completed, which can To be that tester writes completion manually, it is also possible to other software document structure tree as desired, it is not limited here.
The corresponding use-case mark of each test case, the use-case are identified as the character string being combined by character and number, It can be described using the form of project, test module and use-case number, or by the way of abbreviation, not limit herein It is fixed, should have uniqueness, property easy to identify.
In this application, use-case set identifier is corresponding with test use cases, it may have uniqueness and property easy to identify.Set of uses case mark Know to identify by multiple use-cases and be obtained, i.e., according to use-case identify in project and test module obtain the test use cases pair The test object answered.
In this application, requirement documents are the document that product item is entered " implementation " stage by " preparation " stage, demand Document may include requirement background, requirement objective, feature list, main logic, characteristic functions point, property requirements, performance requirement, number According to report, version number record etc. multiple classifications, it is not limited here.
Requirement documents and test use cases may include Word document, Excel document, HyperText Markup Language (Hypertext Markup Language, HTML) file or rapid prototyping (Axure Rapid Prototyping, Axure RP) multiple formats such as file, herein also without limitation.
Be appreciated that requirement documents same test object corresponding with test use cases, then the use-case set identifier also with demand Document is corresponding.Requirement documents corresponding with the use-case set identifier of test use cases are obtained, can be improved and obtain the accurate of requirement documents Property.
S102: multiple first use-case titles that the test case is concentrated are extracted.
In this application, use-case title specifies use-case intention for summarizing test main contents.The entitled survey of first use-case Example on probation concentrates the corresponding use-case title of each test case.Since the same test use cases correspond to the same test object, Then can be based on multiple first test case titles in set of uses case marker extraction test document, it, can to avoid test case is omitted It improves and extracts the comprehensive of the first test case title.
S103: according to presupposed information extraction algorithm, extracting the requirement documents, obtains multiple second use-case marks Topic.
In this application, the corresponding use-case title of the entitled requirement documents of the second use-case, survey that can according to demand in document Strip part extracts.For example, test condition is " can only input number and decimal point ", then multiple second use-cases are entitled " input positive integer, normal to input ", " inputting positive decimal, normal to input ", " input negative integer, normal to input ", " input is born small Number, normal input ", " having space between number, space can not be inputted ", " having space before number, space can not be inputted ", " number Have space after word, space can not be inputted ", " input capitalization, can not input capitalization ", " input capitalization, can not Input lowercase ", " input chinese character, can not input chinese character ", " input spcial character, can not input special word Symbol ".
It is described according to presupposed information extraction algorithm in a kind of possible example, the requirement documents are extracted, are obtained To multiple second use-case titles, comprising: extract the test document segment in the requirement documents;Extract the test document segment In test keyword with predetermined keyword successful match;According to presupposed information construction algorithm, the test keyword is carried out Construction, obtains the multiple second use-case title.
Wherein, test document segment is used for the main contents of described project test, the i.e. corresponding segment of test point.The application For test document segment quantity also without limitation.It is appreciated that obtaining keyword for test document segment, it can be improved and obtain Take the efficiency of keyword.
Predetermined keyword is that developer goes through to each in advance for stating user to the technical term of test data demand History requirement documents are labeled, to obtain keyword relevant to testing, for example, type of the user to test data, Yong Huxin The demand of the data attributes such as breath, legal, illegal, special, field, number, requirement documents may include that multiple and different tests is crucial Word and corresponding target requirement information, it is not limited here.
Without limitation, mature keyword extraction algorithm, example can be used in method of the application for extracting test keyword Such as TF-IDF, TextRank, Rake, Topic-Model.It can be in the progress of test document segment by keyword extraction algorithm Text participle is matched with predetermined keyword respectively to obtain multiple phrases, then by multiple phrases to obtain the test of successful match Keyword.
In this embodiment, first extract the corresponding test document segment of requirement documents, then extract in test document segment with The efficiency for obtaining keyword can be improved in the test keyword of predetermined keyword successful match.It is calculated finally, being constructed according to presupposed information Method is constructed to obtain multiple second use-case titles to test keyword, to improve the accurate of the second use-case title of construction Property.
The application without limitation, can carry out abstract to the corresponding sentence of test keyword and mention for presupposed information construction algorithm It obtaining, abstract extraction refers to the key message for extracting test keyword place sentence, such as: assuming that test keyword is field Length, the corresponding sentence of test keyword are that " test-types are field length, field length 18 ", then multiple second use-case marks Topic can " field length be less than 18 ", " field length be equal to 18 " and " field length is greater than 18 ".In this way, being based on summary info structure The second use-case title is made, convenient for improving the efficiency and accuracy of construction use-case title.
It is described that the test keyword is constructed according to presupposed information construction algorithm in a kind of possible example, Obtain the multiple second use-case title, comprising: obtain pre-stored target requirement letter corresponding with the test keyword Breath;The corresponding test-types of the requirement documents are determined according to the target requirement information;It is corresponding according to the test-types Pre-set configuration method constructs the target requirement information, obtains the multiple second use-case title.
Wherein, target requirement information is used to describe the relevant information of the test data of meet demand document.
Wherein, test-types are the corresponding test data type of target requirement information, can pass through type, user information, conjunction Multiple dimensions such as method, illegal, special, field, number are obtained.
Wherein, pre-set configuration method corresponding with test-types is stored in advance, for example, if target requirement information is " field Length 18 ", then test-types are the number of character, i.e. pre-set configuration method is constructed for the size of number, multiple second Use-case title be respectively character length less than 18, character length be equal to 18 and character length be greater than 18;If target requirement information is " ID card No. ", then test-types are number, designated character and length, then pre-set configuration method is for number, designated word Symbol and length are constructed, and multiple second use-case titles are respectively that character length is long equal to 13, character less than 13, character length Degree is greater than the X that 13, character includes capitalization, and character includes the x that letter, character other than X includes small letter, and character includes special Character, and including use-case title made of above-mentioned at least two second use-case titles combination.
It is appreciated that the corresponding target requirement information of different test keywords is stored in advance, then keyword is tested obtaining Later, target requirement information corresponding with the test keyword is obtained.Then according to the target requirement access to information demand document Corresponding test-types are configured to the target requirement information further according to the corresponding pre-set configuration method of the test-types To multiple second use-case titles.In this way, the accuracy of the second use-case title of construction is improved, convenient for improving evaluation test set of uses case Accuracy.
The application for obtain target requirement information method without limitation, in a kind of possible example, the acquisition Pre-stored target requirement information corresponding with the test keyword, comprising: obtain the pre-stored and test and close The corresponding multiple preset need information of keyword;Obtain it is described test keyword where sentence and the multiple preset need information In matching value between each preset need information, obtain multiple matching values;Maximum value in the multiple matching value is corresponding Preset need information as the target requirement information.
In this embodiment, the corresponding multiple preset need information of different test keywords are stored in advance, then survey obtaining After trying keyword, the corresponding multiple preset need information of the test keyword are obtained.It then, will be where the test keyword Sentence is compared to obtain multiple matching values with each preset need information, and the maximum value in multiple matching values is corresponding Preset need information is as target requirement information.In this way, being obtained based on the matching value between preset need information and requirement documents The accuracy for obtaining target requirement information can be improved in target requirement information.
In a kind of possible example, the test document segment extracted in the requirement documents, comprising: to the need It asks document to carry out specification handles, obtains destination document;Extract the test document segment in the destination document.
Wherein, specification handles can be the word of the word that will be obscured in requirement documents or expression inaccuracy or not meet The word etc. of technical term is adjusted, can also be regular according to the format progress of standard requirement document by requirement documents, may be used also According to formats such as type of message, required parameter, message addresses, execution route, verifying routing table, message format and message examples Requirement documents are divided.In this way, the normalization of requirement documents can be improved.
In this embodiment, specification handles first are carried out to obtain destination document to requirement documents, then extracts the destination document In test document segment, the normalization of requirement documents can be improved, extract test document segment and test is crucial to improve The efficiency and accuracy of word.
S104: according to the multiple second use-case title, scoring calculating is carried out to the multiple first use-case title, is obtained The objective appraisal value of the test use cases.
The application scores for it calculation method without limitation, it will be understood that since the same test use cases are corresponding same One test object is then used based on the corresponding multiple second use-case titles corresponding to test use cases multiple first of requirement documents Example title is evaluated, and can avoid omitting test case, the comprehensive of evaluation test set of uses case can be improved.
It is described according to the multiple second use-case title in a kind of possible example, to the multiple first use-case mark Topic carries out scoring calculating, obtains the objective appraisal value of the test use cases, comprising: by the multiple first use-case title and institute It states multiple second use-case titles to be compared, obtains multiple third use-case titles of successful match;According to default scoring calculating side Method carries out scoring calculating to one first use-case title every in the multiple first use-case title, obtains multiple first evaluations of estimate;Meter The ratio between the quantity of the multiple third use-case title and the quantity of the multiple second use-case title is calculated, the first ratio is obtained Value;The objective appraisal value is obtained according to the multiple first evaluation of estimate and first ratio.
Wherein, third use-case title refer to a successful first use-case title of the second use-case title match, matching at Function refers to that the corresponding intention of use-case title is identical, i.e., test purpose is identical.The application is for comparing the first use-case title and second The method of use-case title without limitation, can be based respectively on test input, execution condition and expected results and compare, will test Input, the first use-case title for executing condition and the equal successful match of expected results are tested as third use-case title with detecting Measurement direction whether is omitted or increased in set of uses case.
Optionally, the multiple first use-case title is compared with the multiple second use-case title, is matched Multiple 4th use-case titles of failure;The corresponding test of every one the 4th use-case title in the multiple 4th use-case title is exported to use Example.It is appreciated that omitting determining that test case is concentrated to exist with after extra use-case title, it is corresponding to export the use-case title Test case, the comprehensive of testing efficiency and test can be improved.
In this embodiment, the first evaluation of estimate is used to describe the reasonability of each first use-case title.The application is for pre- If the calculation method that scores is without limitation, described according to default scoring calculation method in a kind of possible example, to the multiple Every one first use-case title carries out scoring calculating in first use-case title, obtains multiple first evaluations of estimate, comprising: obtains multiple pre- If corresponding evaluation of estimate between each default dimension and target use-case title, obtains multiple evaluation score values, the target in dimension Any first use-case title in the entitled the multiple first use-case title of use-case;According to each in the multiple default dimension The default corresponding weight of dimension and the multiple evaluation score value obtain corresponding first evaluation of estimate of the target use-case title.
Wherein, multiple default dimensions may include integrality, terseness, functionality etc., and whether integrality refers to use-case title Statement is complete, and terseness refers to whether use-case title can be used shorter mode and stated, and functionality refers to that use-case title is No description is clear.
In this embodiment, the corresponding weight of each default dimension is also pre-set, such as: the corresponding weight of integrality It is 0.4, the corresponding weight of terseness is 0.2, functional corresponding weight is 0.4.
It is appreciated that being illustrated with the target use-case title in multiple first use-case titles, other first use-case marks Topic can refer to the method and obtain corresponding first evaluation of estimate.Specifically, first obtaining target user's title and multiple default dimensions Evaluation score value in degree between each default dimension is to obtain multiple evaluation score values, further according to the corresponding weight of each default dimension Corresponding first evaluation of estimate of the target use-case title is obtained with evaluation score value.So, it is contemplated that each default dimension is improved and obtained Take the accuracy of the first evaluation of estimate.
Optionally, the method also includes output the multiple first evaluations of estimate.It is appreciated that in output each first After corresponding first evaluation of estimate of use-case title, test case can be modified convenient for tester, improve the normalization of test case And reasonability.
In this embodiment, the first ratio refers to the quantity of multiple third use-case titles and the number of multiple second use-case titles Ratio between amount.That is, the first ratio describe in the corresponding multiple first use-case titles of test use cases matching at Multiple third use-case titles of function, the ratio of number between multiple second use-case titles corresponding with requirement documents.
It is appreciated that the first evaluation of estimate describes the accuracy of each first use-case title, the first ratio describes description Ratio between accurate test case test case corresponding with requirement documents, in this way, according to multiple first evaluations of estimate and the One ratio obtains objective appraisal value, and the accuracy of evaluation test set of uses case can be improved.
How the application is for not limit according to the method that multiple first evaluations of estimate and the first ratio obtain objective appraisal value It is fixed, it is described to be commented according to the multiple first evaluation of estimate and first ratio acquisition target in a kind of possible example Value, comprising: classify to the multiple first use-case title, obtain the first use-case title set and the second use-case title set; The quantity for determining the first use-case title set and the test data in the second use-case title set respectively, respectively obtains first Quantity and the second quantity;Obtain pre-stored weight distribution ratio corresponding with first quantity and second quantity; Ratio is distributed according to the weight, the multiple first evaluation of estimate is weighted, the second evaluation of estimate is obtained;Described in calculating Product between second evaluation of estimate and first ratio obtains the objective appraisal value.
Wherein, the corresponding test data of the first use-case title in the first use-case title set is used for positive test, and second uses The corresponding test data of the first use-case title in example title set is used for negative testing.
Weight distribution ratio is for describing every one first in the first use-case title set and the second use-case title set The corresponding weight of use-case title set.For example, weight distribution ratio is 3:1, then during weighted calculation, the first use-case title The corresponding weight of the first use-case title concentrated is 0.75, and the corresponding weight of the first use-case title in the second use-case title set is 0.25。
In this embodiment, multiple first use-case titles are classified to obtain the first use-case title for positive test Collection and for negative testing the second use-case title set, then determine the first use-case title set in test data the first quantity, And the second quantity of the second test data in use-case title set.Then, according to pre-set first quantity and the second number Corresponding weight distribution ratio is measured, the corresponding score value of each first use-case title is weighted to obtain the second evaluation Value, then the product calculated between the second evaluation of estimate and the first ratio obtain objective appraisal value.In this way, the second evaluation of estimate also contemplates Influence of the data of positive test and negative testing for test result can further improve and obtain the accurate of objective appraisal value Property.
Further, if the objective appraisal value is less than preset threshold, the first use-case title set and described is adjusted The quantity of the corresponding test data of second use-case title set.It is appreciated that the quantity of adjustment test data, is conducive to improve test It is comprehensive.
In test case processing method as shown in Figure 1, first obtain corresponding with the use-case set identifier of test use cases Requirement documents, then multiple first use-case titles of test case concentration are extracted, and need to this according to presupposed information extraction algorithm Document is asked to extract to obtain multiple second use-case titles.Then, according to multiple second use-case titles to multiple first use-case marks Topic carries out the evaluation of estimate that the test case is calculated in scoring.In this way, the test use cases that can be completed to editor score, just In the comprehensive of raising test.
Consistent with the embodiment of Fig. 1, referring to figure 2., Fig. 2 is a kind of knot for test case processing unit that the application proposes Fruit schematic diagram.As shown in Fig. 2, test case processing unit 200 includes:
Acquiring unit 201, for obtaining requirement documents corresponding with the use-case set identifier of test use cases;
Extraction unit 202, the multiple first use-case titles concentrated for extracting the test case;It is mentioned according to presupposed information Algorithm is taken, the requirement documents are extracted, obtains multiple second use-case titles;
Score unit 203, for commenting the multiple first use-case title according to the multiple second use-case title Divide and calculate, obtains the objective appraisal value of the test use cases.
It is appreciated that first obtaining requirement documents corresponding with the use-case set identifier of test use cases, then extract test use Multiple first use-case titles that example is concentrated, and extract to obtain multiple the to the requirement documents according to presupposed information extraction algorithm Two use-case titles.Then, scoring is carried out to multiple first use-case titles according to multiple second use-case titles and the test is calculated The evaluation of estimate of use-case.In this way, the test use cases that can be completed to editor score, convenient for improving the comprehensive of test.
In a possible example, described according to the multiple second use-case title, to the multiple first use-case Title carries out scoring calculating, and in terms of obtaining the objective appraisal value of the test use cases, the acquiring unit 201 is specifically used for will The multiple first use-case title is compared with the multiple second use-case title, obtains multiple third use-cases of successful match Title;According to default scoring calculation method, scoring meter is carried out to one first use-case title every in the multiple first use-case title It calculates, obtains multiple first evaluations of estimate;Calculate the multiple third use-case title quantity and the multiple second use-case title Ratio between quantity obtains the first ratio;The target is obtained according to the multiple first evaluation of estimate and first ratio Evaluation of estimate.
In a possible example, described according to default scoring calculation method, to the multiple first use-case title In every one first use-case title carry out scoring calculating, in terms of obtaining multiple first evaluations of estimate, the acquiring unit 201 is specifically used for Corresponding evaluation of estimate between each default dimension and the target use-case title is obtained in multiple default dimensions, multiple evaluations are obtained Score value, any first use-case title in the entitled the multiple first use-case title of target use-case;According to the multiple It is corresponding to obtain the target use-case title for each default corresponding weight of dimension and the multiple evaluation score value in default dimension First evaluation of estimate.
In a possible example, described according to the multiple first evaluation of estimate and first ratio acquisition In terms of objective appraisal value, the acquiring unit 201 is specifically used for classifying to the multiple first use-case title, obtains first Use-case title set and the second use-case title set, the corresponding test data of the first use-case title in the first use-case title set are used The corresponding test data of the first use-case title in positive test, the second use-case title set is used for negative testing;Respectively The quantity for determining the first use-case title set and the test data in the second use-case title set, respectively obtains the first quantity With the second quantity;Pre-stored weight distribution ratio corresponding with first quantity and second quantity is obtained, it is described Weight distribution ratio is for describing every one first use-case title in the first use-case title set and the second use-case title set Collect corresponding weight;Ratio is distributed according to the weight, the multiple first evaluation of estimate is weighted, second is obtained and comments Value;The product between second evaluation of estimate and first ratio is calculated, the objective appraisal value is obtained.
In a possible example, the requirement documents are extracted according to presupposed information extraction algorithm described, In terms of obtaining multiple second use-case titles, the extraction unit 202 is specifically used for extracting the test document in the requirement documents Segment;Extract the test keyword in the test document segment with predetermined keyword successful match;It is constructed according to presupposed information Algorithm constructs the test keyword, obtains the multiple second use-case title.
In a possible example, described according to presupposed information construction algorithm, structure is carried out to the test keyword It makes, in terms of obtaining the multiple second use-case title, the extraction unit 202 is specifically used for obtaining the pre-stored and survey Try the corresponding target requirement information of keyword;The corresponding test class of the requirement documents is determined according to the target requirement information Type;According to the corresponding pre-set configuration method of the test-types, the target requirement information is constructed, is obtained the multiple Second use-case title.
In a possible example, pre-stored target requirement corresponding with the test keyword is obtained described Message context, the extraction unit 202 are specifically used for obtaining pre-stored corresponding with the test keyword multiple default Demand information;Obtain it is described test keyword where sentence and the multiple preset need information in each preset need information Between matching value, obtain multiple matching values;Using the corresponding preset need information of the maximum value in the multiple matching value as The target requirement information.
Consistent with the embodiment of Fig. 1, referring to figure 3., Fig. 3 is the structure of a kind of electronic equipment provided by the embodiments of the present application Schematic diagram.As shown in figure 3, the electronic equipment 300 includes processor 310, memory 320, communication interface 330 and one or more A program 340, wherein said one or multiple programs 340 are stored in above-mentioned memory 320, and are configured by above-mentioned Processor 310 executes, and above procedure 340 includes the instruction for executing following steps:
Obtain requirement documents corresponding with the use-case set identifier of test use cases;
Extract multiple first use-case titles that the test case is concentrated;
According to presupposed information extraction algorithm, the requirement documents are extracted, obtain multiple second use-case titles;
According to the multiple second use-case title, scoring calculating is carried out to the multiple first use-case title, is obtained described The objective appraisal value of test use cases.
It is appreciated that first obtaining requirement documents corresponding with the use-case set identifier of test use cases, then extract test use Multiple first use-case titles that example is concentrated, and extract to obtain multiple the to the requirement documents according to presupposed information extraction algorithm Two use-case titles.Then, scoring is carried out to multiple first use-case titles according to multiple second use-case titles and the test is calculated The evaluation of estimate of use-case.In this way, the test use cases that can be completed to editor score, convenient for improving the comprehensive of test.
In a possible example, described according to the multiple second use-case title, to the multiple first use-case Title carries out scoring calculating, in terms of obtaining the objective appraisal value of the test use cases, described program 340 be specifically used for executing with The instruction of lower step:
The multiple first use-case title is compared with the multiple second use-case title, obtains the more of successful match A third use-case title;
According to default scoring calculation method, score one first use-case title every in the multiple first use-case title It calculates, obtains multiple first evaluations of estimate;
The ratio between the quantity of the multiple third use-case title and the quantity of the multiple second use-case title is calculated, Obtain the first ratio;
The objective appraisal value is obtained according to the multiple first evaluation of estimate and first ratio.
In a possible example, described according to default scoring calculation method, to the multiple first use-case title In every one first use-case title carry out scoring calculating, in terms of obtaining multiple first evaluations of estimate, described program 340 is specifically used for executing The instruction of following steps:
Corresponding evaluation of estimate between each default dimension and target use-case title is obtained in multiple default dimensions, is obtained multiple Evaluate score value, any first use-case title in the entitled the multiple first use-case title of target use-case;
Institute is obtained according to each default corresponding weight of dimension in the multiple default dimension and the multiple evaluation score value State corresponding first evaluation of estimate of target use-case title.
In a possible example, described according to the multiple first evaluation of estimate and first ratio acquisition In terms of objective appraisal value, described program 340 is specifically used for executing the instruction of following steps:
Classify to the multiple first use-case title, obtains the first use-case title set and the second use-case title set, institute The corresponding test data of the first use-case title in the first use-case title set is stated for positive test, the second use-case title set In the corresponding test data of the first use-case title be used for negative testing;
The quantity of the first use-case title set and the test data in the second use-case title set is determined respectively, respectively Obtain the first quantity and the second quantity;
Obtain pre-stored weight distribution ratio corresponding with first quantity and second quantity, the weight Distribution ratio is for describing every one first use-case title set pair in the first use-case title set and the second use-case title set The weight answered;
Ratio is distributed according to the weight, the multiple first evaluation of estimate is weighted, the second evaluation of estimate is obtained;
The product between second evaluation of estimate and first ratio is calculated, the objective appraisal value is obtained.
In a possible example, the requirement documents are extracted according to presupposed information extraction algorithm described, In terms of obtaining multiple second use-case titles, described program 340 is specifically used for executing the instruction of following steps:
Extract the test document segment in the requirement documents;
Extract the test keyword in the test document segment with predetermined keyword successful match;
According to presupposed information construction algorithm, the test keyword is constructed, the multiple second use-case mark is obtained Topic.
In a possible example, described according to presupposed information construction algorithm, structure is carried out to the test keyword It makes, in terms of obtaining the multiple second use-case title, described program 340 is specifically used for executing the instruction of following steps:
Obtain pre-stored target requirement information corresponding with the test keyword;
The corresponding test-types of the requirement documents are determined according to the target requirement information;
According to the corresponding pre-set configuration method of the test-types, the target requirement information is constructed, institute is obtained State multiple second use-case titles.
In a possible example, pre-stored target requirement corresponding with the test keyword is obtained described Message context, described program 340 are specifically used for executing the instruction of following steps:
Obtain pre-stored multiple preset need information corresponding with the test keyword;
Obtain it is described test keyword where sentence and the multiple preset need information in each preset need information Between matching value, obtain multiple matching values;
Using the corresponding preset need information of the maximum value in the multiple matching value as the target requirement information.
The embodiment of the present application also provides a kind of computer storage medium, wherein the computer storage medium is stored for depositing Store up computer program, the computer program be executed by processor in implementation method embodiment record either method part or Overall Steps.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, related movement and mode not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of unit, only a kind of logic Function division, there may be another division manner in actual implementation, such as multiple unit or assemblies can combine or can collect At another system is arrived, or some features can be ignored or not executed.Another point, shown or discussed mutual coupling It closes or direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit can be with It is electrical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also be realized in the form of software program mode.
If integrated unit is realized and when sold or used as an independent product in the form of software program mode, can To be stored in a computer-readable access to memory.According to such understanding, the technical solution of the application is substantially in other words The all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Come, which is stored in a memory, including some instructions are used so that a computer equipment (can be Personal computer, server or network equipment etc.) execute each embodiment method of the application all or part of the steps.And it is preceding The memory stated includes: USB flash disk, read-only memory (read-only memory, ROM), random access memory (random Access memory, RAM), mobile hard disk, the various media that can store program code such as magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory It may include: flash disk, ROM, RAM, disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, to sum up, the contents of this specification should not be construed as limiting the present application.

Claims (10)

1. a kind of test case processing method characterized by comprising
Obtain requirement documents corresponding with the use-case set identifier of test use cases;
Extract multiple first use-case titles that the test case is concentrated;
According to presupposed information extraction algorithm, the requirement documents are extracted, obtain multiple second use-case titles;
According to the multiple second use-case title, scoring calculating is carried out to the multiple first use-case title, obtains the test The objective appraisal value of set of uses case.
2. the method according to claim 1, wherein described according to the multiple second use-case title, to described Multiple first use-case titles carry out scoring calculating, obtain the objective appraisal value of the test use cases, comprising:
The multiple first use-case title is compared with the multiple second use-case title, obtains multiple the of successful match Three use-case titles;
According to default scoring calculation method, scoring meter is carried out to one first use-case title every in the multiple first use-case title It calculates, obtains multiple first evaluations of estimate;
The ratio between the quantity of the multiple third use-case title and the quantity of the multiple second use-case title is calculated, is obtained First ratio;
The objective appraisal value is obtained according to the multiple first evaluation of estimate and first ratio.
3. according to the method described in claim 2, it is characterized in that, described according to default scoring calculation method, to the multiple Every one first use-case title carries out scoring calculating in first use-case title, obtains multiple first evaluations of estimate, comprising:
Corresponding evaluation of estimate between each default dimension and target use-case title is obtained in multiple default dimensions, multiple evaluations are obtained Score value, any first use-case title in the entitled the multiple first use-case title of target use-case;
The mesh is obtained according to each default corresponding weight of dimension in the multiple default dimension and the multiple evaluation score value Mark corresponding first evaluation of estimate of use-case title.
4. according to the method described in claim 2, it is characterized in that, described according to the multiple first evaluation of estimate and described first Ratio obtains the objective appraisal value, comprising:
Classify to the multiple first use-case title, obtains the first use-case title set and the second use-case title set, described The corresponding test data of the first use-case title in one use-case title set is used for positive test, in the second use-case title set The corresponding test data of first use-case title is used for negative testing;
The quantity for determining the first use-case title set and the test data in the second use-case title set respectively, respectively obtains First quantity and the second quantity;
Obtain pre-stored weight distribution ratio corresponding with first quantity and second quantity, the weight distribution Ratio is corresponding for describing every one first use-case title set in the first use-case title set and the second use-case title set Weight;
Ratio is distributed according to the weight, the multiple first evaluation of estimate is weighted, the second evaluation of estimate is obtained;
The product between second evaluation of estimate and first ratio is calculated, the objective appraisal value is obtained.
5. any one of -4 the method according to claim 1, which is characterized in that it is described according to presupposed information extraction algorithm, to institute It states requirement documents to extract, obtains multiple second use-case titles, comprising:
Extract the test document segment in the requirement documents;
Extract the test keyword in the test document segment with predetermined keyword successful match;
According to presupposed information construction algorithm, the test keyword is constructed, the multiple second use-case title is obtained.
6. according to the method described in claim 5, it is characterized in that, described according to presupposed information construction algorithm, to the test Keyword is constructed, and the multiple second use-case title is obtained, comprising:
Obtain pre-stored target requirement information corresponding with the test keyword;
The corresponding test-types of the requirement documents are determined according to the target requirement information;
According to the corresponding pre-set configuration method of the test-types, the target requirement information is constructed, is obtained described more A second use-case title.
7. according to the method described in claim 6, it is characterized in that, described obtain the pre-stored and test keyword pair The target requirement information answered, comprising:
Obtain pre-stored multiple preset need information corresponding with the test keyword;
It obtains in sentence and the multiple preset need information where the test keyword between each preset need information Matching value, obtain multiple matching values;
Using the corresponding preset need information of the maximum value in the multiple matching value as the target requirement information.
8. a kind of test case processing unit characterized by comprising
Acquiring unit, for obtaining requirement documents corresponding with the use-case set identifier of test use cases;
Extraction unit, the multiple first use-case titles concentrated for extracting the test case;According to presupposed information extraction algorithm, The requirement documents are extracted, multiple second use-case titles are obtained;
Score unit, for carrying out scoring calculating to the multiple first use-case title according to the multiple second use-case title, Obtain the objective appraisal value of the test use cases.
9. a kind of electronic equipment, which is characterized in that including processor, memory, communication interface and one or more program, In, one or more of programs are stored in the memory, and are configured to be executed by the processor, described program Include the steps that requiring the instruction in any one of 1-7 method for perform claim.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage computer journey Sequence, wherein the computer program is executed by processor to realize the described in any item methods of claim 1-7.
CN201910531152.7A 2019-06-18 2019-06-18 Test case processing method and relevant device Pending CN110321285A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910531152.7A CN110321285A (en) 2019-06-18 2019-06-18 Test case processing method and relevant device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910531152.7A CN110321285A (en) 2019-06-18 2019-06-18 Test case processing method and relevant device

Publications (1)

Publication Number Publication Date
CN110321285A true CN110321285A (en) 2019-10-11

Family

ID=68121056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910531152.7A Pending CN110321285A (en) 2019-06-18 2019-06-18 Test case processing method and relevant device

Country Status (1)

Country Link
CN (1) CN110321285A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475404A (en) * 2020-03-24 2020-07-31 平安银行股份有限公司 Test method and device based on case network, computer equipment and storage medium
CN112131103A (en) * 2020-09-10 2020-12-25 上海云轴信息科技有限公司 Method and equipment for organizing test cases
CN112346989A (en) * 2020-11-26 2021-02-09 网易(杭州)网络有限公司 Interface testing method, device, medium and computing equipment
CN112579466A (en) * 2020-12-25 2021-03-30 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN113778902A (en) * 2021-09-29 2021-12-10 中国银行股份有限公司 Method and device for detecting coverage of test case
CN113918471A (en) * 2021-11-19 2022-01-11 中国工商银行股份有限公司 Test case processing method and device and computer readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475404A (en) * 2020-03-24 2020-07-31 平安银行股份有限公司 Test method and device based on case network, computer equipment and storage medium
CN112131103A (en) * 2020-09-10 2020-12-25 上海云轴信息科技有限公司 Method and equipment for organizing test cases
CN112346989A (en) * 2020-11-26 2021-02-09 网易(杭州)网络有限公司 Interface testing method, device, medium and computing equipment
CN112346989B (en) * 2020-11-26 2023-06-20 网易(杭州)网络有限公司 Interface testing method, device, medium and computing equipment
CN112579466A (en) * 2020-12-25 2021-03-30 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN112579466B (en) * 2020-12-25 2024-06-07 深圳证券交易所 Method and device for generating test cases and computer readable storage medium
CN113778902A (en) * 2021-09-29 2021-12-10 中国银行股份有限公司 Method and device for detecting coverage of test case
CN113918471A (en) * 2021-11-19 2022-01-11 中国工商银行股份有限公司 Test case processing method and device and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110321285A (en) Test case processing method and relevant device
CN102262632B (en) Method and system for processing text
Resch et al. Citizen-centric urban planning through extracting emotion information from twitter in an interdisciplinary space-time-linguistics algorithm
CN102768659B (en) Method and system for identifying repeated account
CN103399901B (en) A kind of keyword abstraction method
CN103455545A (en) Location estimation of social network users
CN103744905A (en) Junk mail judgment method and device
JP2015518210A (en) Method, apparatus and computer-readable medium for organizing data related to products
US20140280173A1 (en) System and method for real-time dynamic measurement of best-estimate quality levels while reviewing classified or enriched data
JP5370159B2 (en) Information extraction apparatus and information extraction system
CN104281563A (en) Method and system for discovering relationships in tabular data
CN103577989A (en) Method and system for information classification based on product identification
CN105893484A (en) Microblog Spammer recognition method based on text characteristics and behavior characteristics
CN104346408A (en) Method and equipment for labeling network user
CN110471835A (en) A kind of similarity detection method and system based on power information system code file
US20230308381A1 (en) Test script generation from test specifications using natural language processing
CN110781673B (en) Document acceptance method and device, computer equipment and storage medium
CN105630931A (en) Document classification method and device
US9298697B2 (en) Techniques for grammar rule composition and testing
KR101638535B1 (en) Method of detecting issue patten associated with user search word, server performing the same and storage medium storing the same
CN113590810A (en) Abstract generation model training method, abstract generation device and electronic equipment
CN112069833B (en) Log analysis method, log analysis device and electronic equipment
CN111859146B (en) Information mining method and device and electronic equipment
CN105045924A (en) Question classification method and system
CN101882259A (en) Method and equipment for filtering entity relationship instance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination