CN106547654A - A kind of automated testing method and device - Google Patents

A kind of automated testing method and device Download PDF

Info

Publication number
CN106547654A
CN106547654A CN201510605076.1A CN201510605076A CN106547654A CN 106547654 A CN106547654 A CN 106547654A CN 201510605076 A CN201510605076 A CN 201510605076A CN 106547654 A CN106547654 A CN 106547654A
Authority
CN
China
Prior art keywords
case
test
resource
owned
publicly
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.)
Withdrawn
Application number
CN201510605076.1A
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.)
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 CN201510605076.1A priority Critical patent/CN106547654A/en
Priority to PCT/CN2016/094384 priority patent/WO2017050037A1/en
Publication of CN106547654A publication Critical patent/CN106547654A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing

Abstract

The present invention provides a kind of automated testing method and device, and wherein method includes:The multiple test plans of poll, extract a test case to be run from test being currently polled to, in the works as current test case;The use-case attribute of current test case is judged for publicly-owned use-case or privately owned use-case, publicly-owned use-case refers to that the test case can be with other test cases while running, privately owned use-case refers to that the test case can not be with other test cases while operation;If current test case is publicly-owned use-case, judge the apllied resource of testing procedure of current test case for publicly-owned resource or private privileges, publicly-owned resource refers to that multiple test cases can be while the resource for taking, and private privileges refer to and are only capable of while the resource taken by a test case;If the apllied resource of testing procedure of current test case is publicly-owned resource, from publicly-owned resource pool, corresponding resource is called to run current test case, publicly-owned resource pool is the set of publicly-owned resource.This programme allows many use-cases to test simultaneously.

Description

A kind of automated testing method and device
Technical field
The present invention relates to technical field of measurement and test, particularly relates to a kind of automated testing method and device.
Background technology
With the development of automatic technology, automatic test efficient, accurate must can substitute manually carry out software, Hardware testing, is increasingly pursued by industry.Automatic test has many benefits, such as can be under artificial After class, replacement is manually operated, until daybreak, it is ensured that utilizing for resource is maximized;Can be with undying Work always, shorten test period etc..There are the automated test tool of oneself in many manufacturers, put down now Platform, script bank, and put on a large scale in use, some manufacturers even establish the automatic of oneself Chemical plant, by automatic test industrialization, actual effect.
Certainly with the continuous accumulation in automatized script storehouse, automation use-case is more and more, and some of which is asked Topic has also manifested out.In order to avoid resource contention, current automatization testing technique is that set of environmental is same One time can only run a use-case.Although more and more automating use-case, increasing people is represent Power can be released, but while also imply that operation use-case storehouse needs to expend the increasing time. Huge automation use-case storehouse, there has also been the such a defect of tediously long run time.People always want to In the limited time, farthest acquire an advantage, so being sought for various to shorten automatic test The method in cycle:
First, cut down automatic test storehouse, but, abatement use-case storehouse represents some function automations and cannot cover Cover, this does not meet the original intention of people.
2nd, increase the resource of automatic test:This is most simple, directly shortens the automatic test cycle Method.Originally automatic test is carried out on set of environmental, after increasing resource, can be same in two set of environments Shi Yunhang, so ensures that script bank scale is constant, and run time can halve.If resource input is more, Time can also reduce more.But, this method needs that input is double, or even more resource, such as sets Standby, instrument, instrument etc..Although people can be met in this method short time shortens the automatic test cycle Requirement, but whether long-term plan, substantial amounts of resource input automatic test have also been run counter to automation and have been surveyed Try efficient original intention.
3rd, many use-cases are run on set of environmental simultaneously:This method can shorten the automatic test time, But also there are some disadvantages:Many use-cases are run simultaneously, the bad distribution of resource, if resource sharing, are easily produced Raw conflict, or if resource is privately owned, then and the operation of many set of environments is not different, advantage is little.So This method is not advocated always yet.
The content of the invention
It is an object of the invention to provide a kind of automated testing method and device, cannot in solving prior art Many use-cases are realized while the problem of test.
In order to solve above-mentioned technical problem, the embodiment of the present invention provides a kind of automated testing method, including:
The multiple test plans of poll, extract a test to be run in the works from test being currently polled to Use-case, as current test case;
The use-case attribute of the current test case is judged for publicly-owned use-case or privately owned use-case, wherein, it is described Publicly-owned use-case refers to that the test case can be with other test cases while running, the privately owned use-case refers to this Test case can not be run simultaneously with other test cases;
When the current test case is publicly-owned use-case, the testing procedure institute of the current test case is judged The resource that need to apply is publicly-owned resource or private privileges, wherein, publicly-owned resource refers to that multiple test cases can With the resource for taking simultaneously, private privileges are referred to and are only capable of while the resource taken by a test case;
When the resource applied needed for the testing procedure of the current test case is publicly-owned resource, then from publicly-owned Corresponding resource is called in resource pool and the current test case that brings into operation, wherein, the publicly-owned resource Pond is the set of publicly-owned resource.
Alternatively, corresponding resource is called from publicly-owned resource pool and the current test that brings into operation described After use-case, the automated testing method also includes:
Judge whether the publicly-owned of current operation is less than predetermined threshold value with number of cases;
If so, the then calculated next test plan of multiple test of poll, and from the test son plan One test case to be run of middle extraction, as current test case, returns the judgement current test The step of use-case attribute of use-case is publicly-owned use-case or privately owned use-case;
If it is not, then etc. after the receipt of test case end of run to be generated, from the test case with end of run Run in the works by one test case to be run of extraction for corresponding son of testing, and circulates execution wait product After the receipt of raw test case end of run, from the test son plan corresponding with the test case of end of run The step of one test case to be run of middle extraction is run.
Alternatively, the automated testing method also includes:
When the current test case is privately owned use-case, the test step of the current test case is directly determined The resource of application needed for rapid is private privileges;
From private privileges pond, call corresponding resource to bring into operation the current test case, wherein, it is described Private privileges pond is the set of private privileges.
Alternatively, in the pond from private privileges, call the current test that brings into operation of corresponding resource to use After example, the automated testing method also includes:
Judge whether the private privileges in the private privileges pond are all called;
If so, then etc. after the receipt of test case end of run to be generated, from the test case with end of run Run in the works by one test case to be run of extraction for corresponding son of testing, and circulates execution wait product After the receipt of raw test case end of run, from the test son plan corresponding with the test case of end of run The step of one test case to be run of middle extraction is run;
If it is not, the then calculated next test plan of multiple test of poll, and from the test son plan One test case to be run of middle extraction, as current test case, returns the judgement current test The step of use-case attribute of use-case is publicly-owned use-case or privately owned use-case.
Alternatively, in the multiple test plans of the poll, extracted from test being currently polled in the works One test case to be run, as current test case before, the automated testing method also includes:
Divide resource pool;With
Determine the predetermined threshold value;
Number and predetermined threshold value identical test son plan are formulated, the same private privileges need to be called Test case be placed in it is same it is described test son in the works.
Alternatively, in the division resource pool;With the determination predetermined threshold value;Formulate number default with described The test son plan of threshold value identical, the test case that need to call the same private privileges is placed in same described Before testing son in the works, the automated testing method also includes:
Judge whether test case can participate in many use-cases while operation;
If, it is determined that the use-case attribute of the test case is publicly-owned use-case;
If not, it is determined that the use-case attribute of the test case is privately owned use-case.
Alternatively, after it is determined that the use-case attribute of the test case is publicly-owned use-case, the automatic test side Method also includes:
The resource for judging application needed for the testing procedure of the test case whether allow multiple test cases while Take;
If, it is determined that the resource of application needed for the testing procedure is publicly-owned resource, need to be from publicly-owned resource pool In call resource;
If not, it is determined that the resource of application needed for the testing procedure is private privileges, need to be from private privileges pond In call resource.
Alternatively, after it is determined that the use-case attribute of the test case is privately owned use-case, the automatic test side Method also includes:
The resource for directly determining application needed for the testing procedure of the test case is private privileges, need to be from privately owned Resource is called in resource pool.
Present invention also offers a kind of automatic test device, including:
Extraction module, for the multiple test plans of poll, is extracted in the works from test being currently polled to One test case to be run, as current test case;
First judge module, for judging the use-case attribute of the current test case for publicly-owned use-case or private Have use-case, wherein, the publicly-owned use-case refer to the test case can with other test cases and meanwhile operation, The privately owned use-case refers to that the test case can not be with other test cases while operation;
Second judge module, for when the current test case is publicly-owned use-case, judging the current survey Needed for the testing procedure of example on probation, the resource of application is publicly-owned resource or private privileges, wherein, publicly-owned resource Refer to that multiple test cases can be while the resource for taking, private privileges are referred to and are only capable of while being used by a test The resource that example takes;
First operation module, for the resource applied needed for the testing procedure of the current test case for public affairs When having resource, then corresponding resource the current test case that brings into operation are called from publicly-owned resource pool, Wherein, the publicly-owned resource pool is the set of publicly-owned resource.
Alternatively, the automatic test device also includes:
3rd judge module, after bringing into operation the current test case in the described first operation module, Judge whether the publicly-owned of current operation is less than predetermined threshold value with number of cases;
First processing module, for the if so, then calculated next test plan of multiple test of poll, And a test case to be run is extracted in the works from test, as current test case, return described The use-case attribute for judging the current test case is the operation of publicly-owned use-case or privately owned use-case;
Second processing module, for if it is not, then etc. after the receipt of test case end of run to be generated, from The sub test case to be run of extracting in the works of test that the test case of end of run is corresponding is run, And after circulating the receipts of test case end of run to be generated such as execution, from the test case phase with end of run Corresponding test extracts the operation run by a test case to be run in the works.
The above-mentioned technical proposal of the present invention has the beneficial effect that:
In such scheme, the automated testing method is by the use-case attribute according to test case and test The operation of the Type Control test case of the resource of application needed for step, in the case where test resource is not increased, The automatic test cycle is greatly shortened, maximally utilizing for resource is realized, and is not in resource The problems such as conflict, additionally, due to the operation simultaneously of many use-cases, multi-service superposition test such that it is able to preferably send out Existing equipment fault.
Description of the drawings
Automated testing method schematic flow sheets of the Fig. 1 for the embodiment of the present invention one;
Fig. 2 writes schematic flow sheet for the use-case of the embodiment of the present invention two;
Test execution schematic flow sheets of the Fig. 3 for the embodiment of the present invention two;
Automatic test device structural representations of the Fig. 4 for the embodiment of the present invention three.
Specific embodiment
To make the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with attached Figure and specific embodiment are described in detail.
The present invention is for realizing many use-cases in existing technology while the problem of test, there is provided various solutions Certainly measure, it is specific as follows:
Embodiment one
As shown in figure 1, the automated testing method in the embodiment of the present invention one, including:
Step 11:The multiple test plans of poll, extract an as ready in the works from test being currently polled to Capable test case, as current test case;
Step 12:The use-case attribute of the current test case is judged for publicly-owned use-case or privately owned use-case, its In, the publicly-owned use-case refers to that the test case can be with other test cases while operation, the privately owned use Example refers to that the test case can not be with other test cases while operation;
Step 13:When the current test case is publicly-owned use-case, the survey of the current test case is judged Needed for try suddenly, the resource of application is publicly-owned resource or private privileges, wherein, publicly-owned resource refers to multiple surveys The resource that example on probation can be taken simultaneously, private privileges are referred to and are only capable of while the money taken by a test case Source;
Step 14:When the resource applied needed for the testing procedure of the current test case is publicly-owned resource, Then corresponding resource the current test case that brings into operation are called from publicly-owned resource pool, wherein, it is described Publicly-owned resource pool is the set of publicly-owned resource.
Wherein, testing procedure can be preferably first testing procedure of test case.
The automated testing method that the embodiment of the present invention one is provided is by the use-case attribute according to test case And the operation of the Type Control test case of the resource of application needed for testing procedure, do not increasing test resource In the case of, the automatic test cycle is greatly shortened, maximally utilizing for resource is realized, and not The problems such as resource contention occurs, test additionally, due to the operation simultaneously of many use-cases, multi-service superposition, so as to Enough more preferable discovering device failures.
In order to ensure the normal operation of automatization test system, it is described call from publicly-owned resource pool it is corresponding After resource the current test case that brings into operation, the automated testing method also includes:Judge to work as Whether the publicly-owned of front operation is less than predetermined threshold value with number of cases;If so, under then multiple test of poll are calculated One test son plan, and a test case to be run is extracted in the works from test, as current survey Example on probation, returns the use-case attribute for judging the current test case for publicly-owned use-case or privately owned use-case The step of;If it is not, then etc. after the receipt of test case end of run to be generated, from the test with end of run Corresponding test of use-case extracts a test case to be run in the works and is run, and circulates execution etc. After the receipt of test case end of run to be generated, from test corresponding with the test case of end of run The step of one test case to be run of extraction is run in the works.
Further, the automated testing method also includes:It is privately owned use-case in the current test case When, directly determine that the resource of application needed for the testing procedure of the current test case is private privileges;From private Corresponding resource is called in having resource pool and the current test case that brings into operation, wherein, the privately owned money Source pond is the set of private privileges.Herein, testing procedure can be preferably first test step of test case Suddenly.
For the purposes of ensureing the normal operation of automatization test system, it is right to call in the pond from private privileges The resource answered brings into operation after the current test case, and the automated testing method also includes:Judge Whether the private privileges in the private privileges pond are all called;If so, the test case to be generated such as then After the receipt of end of run, one is extracted in the works from test corresponding with the test case of end of run and is treated The test case of operation is run, and after circulating the receipts of test case end of run to be generated such as execution, A test case to be run is extracted in the works from test corresponding with the test case of end of run is carried out The step of operation;If it is not, the then calculated next test plan of multiple test of poll, and from the survey Swab extracts a test case to be run in the works, as current test case, returns described in the judgement The step of use-case attribute of current test case is publicly-owned use-case or privately owned use-case.
Further, in the multiple test plans of the poll, carried from test being currently polled in the works Take a test case to be run, as current test case before, the automated testing method also includes: Divide resource pool;With the determination predetermined threshold value;Number is formulated with predetermined threshold value identical test son meter Draw, the test case that need to call the same private privileges is placed in into same test in the works.This step Suddenly fundamentally effectively prevent resource contention.
Corresponding to the process that use-case is write, in the present embodiment, in the division resource pool;It is described pre- with determining If threshold value;Number and predetermined threshold value identical test son plan are formulated, need to be called same described privately owned Before the test case of resource is placed in same test in the works, the automated testing method also includes: Judge whether test case can participate in many use-cases while operation;If, it is determined that the use-case of the test case Attribute is publicly-owned use-case;If not, it is determined that the use-case attribute of the test case is privately owned use-case.
Corresponding to the process of corresponding relation of setting up testing procedure and the resource that need to call between, in the present embodiment, The situation of publicly-owned use-case:After it is determined that the use-case attribute of the test case is publicly-owned use-case, the automation is surveyed Method for testing also includes:Judge whether the resource of application needed for the testing procedure of the test case allows multiple surveys Example on probation is taken simultaneously;If, it is determined that the resource of application needed for the testing procedure is publicly-owned resource, is needed Resource is called from publicly-owned resource pool;If not, it is determined that the resource of application needed for the testing procedure is privately owned Resource, need to call resource from private privileges pond.
The situation of privately owned use-case:It is after it is determined that the use-case attribute of the test case is privately owned use-case, described automatic Changing method of testing also includes:Directly determine that the resource applied needed for the testing procedure of the test case is privately owned Resource, need to call resource from private privileges pond.
Below the automated testing method that the embodiment of the present invention one is provided is illustrated.
Scene one
Hypothesis has three test son plans, when operating instruction is got, is obtained from first test in the works First test case A for taking is publicly-owned use-case, and first testing procedure of A need to call publicly-owned resource, Judgement learns that the publicly-owned of current operation is less than 3 (predetermined threshold values) with number of cases;
Then, first test case B for being obtained from second test in the works is privately owned use-case, and is sentenced The resource in private privileges pond after learning operation B of breaking is not depleted;
Continue to obtain first test case C in the works from the 3rd test, use-case C is publicly-owned use-case, And first testing procedure of C need to call publicly-owned resource, judgement to learn the publicly-owned still little with number of cases of current operation In 3;
First test son plan is polled to, and second test case D is obtained in the works from first test, And first testing procedure of D need to call publicly-owned resource, judgement to learn the publicly-owned not little with number of cases of current operation In 3, then use-case end of run is needed to wait for, then known the test son meter corresponding with the use-case of end of run Draw, then next test case to be run is obtained in the works from test, so circulated, until test All operation is finished use-case.
Scene two
Hypothesis has three test son plans, when operating instruction is got, is obtained from first test in the works First test case A for taking be privately owned use-case, judgement learn operation A after private privileges pond resource not by Deplete;
Then, it is publicly-owned use-case from second test first test case B obtaining in the works of son, and B First testing procedure need to call private privileges, judgement learn the resource in private privileges pond after operation B not by Deplete;Or, first testing procedure of B need to call publicly-owned resource, judgement to learn the publicly-owned use of current operation Number of cases is less than 3 (predetermined threshold values);
Then continue to obtain first test case C in the works from the 3rd test, use-case C is privately owned use-case, Judgement learns that the resource in private privileges pond after running C is depleted, then needed to wait for use-case end of run, then Know the test son plan corresponding with the use-case of end of run, then obtain next in the works from test Test case to be run, so circulates, until test case is all run finishing.
Scene three
Hypothesis has three test son plans, when operating instruction is got, is obtained from first test in the works First test case A for taking be privately owned use-case, judgement learn operation B after private privileges pond resource not by Deplete;
Then, first test case B for being obtained from second test in the works is privately owned use-case, is judged After learning operation B, the resource in private privileges pond is not depleted;
Continue to obtain first test case C in the works from the 3rd test, use-case C is privately owned use-case, Judgement learns that the resource in private privileges pond after running B is depleted, then needed to wait for use-case end of run, then Know the test son plan corresponding with the use-case of end of run, then obtain next in the works from test Test case to be run, so circulates, until test case is all run finishing.
Scene four
Hypothesis has three test son plans, when operating instruction is got, is obtained from first test in the works First test case A for taking is publicly-owned use-case, and first testing procedure of A need to call publicly-owned resource, Judgement learns that the publicly-owned of current operation is less than 3 (predetermined threshold values) with number of cases;
Then, it is publicly-owned use-case from second test first test case B obtaining in the works of son, and B First testing procedure need to call publicly-owned resource, judgement learns the publicly-owned use number of cases of current operation still less than 3 (predetermined threshold value);
Continue to obtain first test case C in the works from the 3rd test, use-case C is publicly-owned use-case, And first testing procedure of C need to call publicly-owned resource, judgement to learn the publicly-owned not little with number of cases of current operation In 3, then use-case end of run is needed to wait for, then known the test son meter corresponding with the use-case of end of run Draw, then next test case to be run is obtained in the works from test, so circulated, until test All operation is finished use-case.
Embodiment two
The automated testing method that the embodiment of the present invention two is provided, is run simultaneously for many use-cases.Multiple use-cases The automatic test cycle can be effectively shortened in operation simultaneously, while also without the extra test resource of increase.
The scheme proposed with regard to the embodiment of the present invention two needs to write in test case and performs two with test case Aspect is improved, specifically described below:
When test case is write in the embodiment of the present invention two, distribute " publicly-owned use-case " and " privately owned use to use-case Two attribute of example "." publicly-owned use-case " can participate in many use-cases while operation, " privately owned use-case " cannot join Run with many use-cases simultaneously." privately owned use-case " requires higher use-case to resources occupation including some.
When writing " publicly-owned use-case ", for the resource pool for needing application, it is also possible to be divided into application " publicly-owned money Two kinds of source " and application " private privileges ":
Publicly-owned resource:The resource that multiple use-cases can be taken simultaneously, such as equipment, instrument, terminal etc., it is multiplex It is also not in conflict that example is taken simultaneously;
Private privileges:Cannot the resource that simultaneously takes of multiple use-cases, once the resource is by a use-case application, Other use-cases are will be unable to using the resource.
During actual automatic test, need separately to run " publicly-owned use-case " and " privately owned use-case ".Operation " privately owned use-case ", as the flow process of current automatic test, is repeated no more.Operation " publicly-owned use-case ", needs Resource pool is divided into into " publicly-owned resource pool " and " private privileges pond ", when resource bid, according to Resource Properties specified in example, are applied in two resource pools respectively.If application is publicly-owned resource, So this resource can be shared with other publicly-owned use-cases.If application is private privileges, then the resource is returned The use-case is exclusive.Many use-cases are effectively solved so while the resource conflict problem being likely to encounter when running.
Wherein, many use-cases that the embodiment of the present invention two is mentioned are while specifically allow how many publicly-owned use-cases in operation Run simultaneously, i.e. " maximum to run publicly-owned use number of cases simultaneously ", can be by user according to Devices to test, test Environment, business characteristic etc. are decided in its sole discretion.
In addition, present invention additionally contemplates that, if calling the use-case testing procedure of same resource while operation is meeting Conflict is produced, but the use-case testing procedure of different resource is called while operation, then can avoid this punching It is prominent.Therefore the present invention is proposed, can be according to " maximum to run publicly-owned use number of cases " of setting simultaneously during automatic test Formulate test plan.Set " maximum is while run publicly-owned use number of cases " and, as N, test case library is divided into into N Height plan, places the use-case of different business in the works per height.Will likely occur the business mould for conflicting as far as possible Block is placed on same height, and serial is run (as long as the use-case comprising the testing procedure for calling publicly-owned resource is i.e. in the works For publicly-owned use-case).Many use-cases simultaneously testing results when, testing tool poll takes a use in the works from every height Example running, the private privileges quilt in the operation number of publicly-owned use-case reaches upper limit N or private privileges pond All call.When the calculated use-case end of run of a certain height, then the next one is taken in the works from the son still Use-case is running, it is ensured that while have N number of use-case in operation, and is all the use-case of different business module, drop The possibility of low conflict.
It should be noted that while the multiple publicly-owned use-case of operation, as operation duration is different, has one Or several use-cases terminate operation in advance, at this moment automatization test system can judge that current the publicly-owned of operation uses number of cases Whether " maximum while run publicly-owned use number of cases " of user setting is reached, if it is, continue waiting for, until There is a use-case end of run;If not, the next use-case that so brings into operation (publicly-owned or privately owned).Ensure There are multiple use-cases the same time in operation, reaches the purpose for shortening run time.
The publicly-owned use-case of privately owned use-case and application private privileges can share private privileges pond, if private privileges Do not exhaust, then can continue to run with the publicly-owned use-case of next privately owned use-case or application private privileges;If Private privileges exhaust, then, after needing to wait the use-case end of run for using private privileges at present, rerun next Individual use-case.
When use-case is designed, by publicly-owned use-case, the division of privately owned use-case attribute, publicly-owned resource, private There is the application of resource, it is possible to many use-cases are realized while the idea of operation, is not so increasing test resource In the case of, the automatic test cycle had both been shortened, and many use-cases had been turn avoid while easy generation when running Resource contention.
From the foregoing, it will be observed that multiple use-cases cannot be run in set of environmental in prior art and ensure to occur without punching simultaneously It is prominent, but with the increasingly huge of use-case storehouse is automated, the test period for constantly extending has been increasingly becoming at present Denouncing for automatic test, has a strong impact on use feeling;And method proposed by the present invention, it is " public by introducing Have use-case ", " privately owned use-case ", " publicly-owned resource ", the concept of " private privileges ", so according to introduce it is general Read, effectively shorten the automatic test cycle, while, it is to avoid resource Conflict, meets people well for the demand of the automatic test for increasingly updating.
Below in conjunction with the accompanying drawings the scheme that the embodiment of the present invention two is proposed is specifically described.
As shown in Fig. 2 be the automation that can be realized many use-cases and run that the embodiment of the present invention two is proposed simultaneously The use-case of method of testing writes flow process:
Step 21:Start to write automation use-case.
Step 22:According to use-case feature, use-case attribute is set.
Judge whether the use-case can participate in many use-cases while operation, if it is, set a property as publicly-owned use-case, Execution step 24;If not, setting a property as privately owned use-case, execution step 23.
Step 23:Privately owned use-case writes flow process with conventional automated use-case, determines that each testing procedure needs Shen After resource please, execution step 27.
Step 24:Judge resource bid situation.
Judge whether the resource that use-case each testing procedure need to be applied can be simultaneously shared with other use-cases, if It is then to apply for publicly-owned resource, execution step 25;If it is not, then application private privileges, execution step 26.
Step 25:Resource, execution step 27 are applied in judgement from publicly-owned resource pool.
Step 26:Resource, execution step 27 are applied in judgement from private privileges pond.
Step 27:Continue to complete use-case to write.
As shown in figure 3, be it is proposed by the present invention can realize many use-cases and meanwhile operation automated testing method Test execution flow process:
Step 31:Divide resource pool.Available resources pond is divided into into publicly-owned resource pool and private privileges pond.
Step 32:According to the features such as product to be measured, environment, it is determined that " maximum to run publicly-owned use number of cases simultaneously ", It is set as N.
Step 33:According to the N of step 32 setting, N number of test plan is formulated.Conflict will likely be produced Business module be placed on same height in the works, it is to avoid conflict.
Step 34:Obtain instruction to bring into operation automatic test, poll takes out from each test in the works and uses Example.
Step 35:Whether use-case attribute is judged as publicly-owned use-case, if it is, execution step 36;If not, Execution step 38.
Step 36:Whether the application resource of first testing procedure of use-case is judged as publicly-owned resource, if it is, Execution step 37;If not, execution step 38.
Step 37:Resource is taken from publicly-owned resource pool to bring into operation, subsequently into step 310.
Step 38:Resource is taken from private privileges pond to bring into operation, subsequently into step 39.
Step 39:Check whether private privileges Pooled resources exhaust, if it is, execution step 311;If not, Execution step 34.
Step 310:Judge whether the publicly-owned of operation simultaneously is less than N with number of cases, if it is, execution step 34; If not, execution step 311.
Step 311:Wait operating use-case to perform to terminate (produce corresponding receipt), from end of run Corresponding test of use-case take out a use-case in the works and run.Circulation performs this step, until all Use-case test terminates.
In sum, the scheme of the embodiment of the present invention two provides one kind need not both increase test resource, and The method that the automatic test cycle can be effectively shortened.
Embodiment three
As shown in figure 4, the automatic test device in the embodiment of the present invention three includes:
Extraction module 41, for the multiple test plans of poll, is carried in the works from test being currently polled to Test case to be run is taken, as current test case;
First judge module 42, for judge the use-case attribute of the current test case for publicly-owned use-case still Privately owned use-case, wherein, the publicly-owned use-case refer to the test case can with other test cases and meanwhile operation, The privately owned use-case refers to that the test case can not be with other test cases while operation;
Second judge module 43, for when the current test case is publicly-owned use-case, judging described current Needed for the testing procedure of test case, the resource of application is publicly-owned resource or private privileges, wherein, publicly-owned money Source refers to that multiple test cases can be while the resource for taking, and private privileges are referred to and are only capable of while being tested by one The resource that use-case takes;
First operation module 44, in the resource applied needed for the testing procedure of the current test case being During publicly-owned resource, then corresponding resource the current test case that brings into operation are called from publicly-owned resource pool, Wherein, the publicly-owned resource pool is the set of publicly-owned resource.
Wherein, testing procedure can be preferably first testing procedure of test case.
The automatic test device that the embodiment of the present invention three is provided is by the use-case attribute according to test case And the operation of the Type Control test case of the resource of application needed for testing procedure, do not increasing test resource In the case of, the automatic test cycle is greatly shortened, maximally utilizing for resource is realized, and not The problems such as resource contention occurs, test additionally, due to the operation simultaneously of many use-cases, multi-service superposition, so as to Enough more preferable discovering device failures.
In order to ensure the normal operation of automatization test system, the automatic test device also includes:3rd Judge module, after bringing into operation the current test case in the described first operation module, judges to work as Whether the publicly-owned of front operation is less than predetermined threshold value with number of cases;First processing module, for if so, then poll is more Individual calculated next test of son of testing is planned, and extracts a survey to be run in the works from test Example on probation, as current test case, returns the use-case attribute for judging the current test case for public There is the operation of use-case or privately owned use-case;Second processing module, for if it is not, the test case to be generated such as then After the receipt of end of run, one is extracted in the works from test corresponding with the test case of end of run and is treated The test case of operation is run, and after circulating the receipts of test case end of run to be generated such as execution, A test case to be run is extracted in the works from test corresponding with the test case of end of run is carried out The operation of operation.
Further, the automatic test device also includes:First determining module, for described current When test case is privately owned use-case, the money of application needed for the testing procedure of the current test case is directly determined Source is private privileges;Second operation module, for calling corresponding resource to bring into operation from private privileges pond The current test case, wherein, the private privileges pond is the set of private privileges.Herein, test step Suddenly first testing procedure of test case can be preferably.
For the purposes of ensureing the normal operation of automatization test system, the automatic test device also includes: 4th judge module, after bringing into operation the current test case in the described second operation module, sentences Whether the private privileges broken in the private privileges pond are all called;3rd processing module, for if so, Then etc. after the receipt of test case end of run to be generated, from the survey corresponding with the test case of end of run Swab is extracted a test case to be run in the works and is run, and circulates the test cases to be generated such as execution After the receipt of end of run, one is extracted in the works from test corresponding with the test case of end of run and is treated The operation run by the test case of operation;Fourth processing module, for if it is not, the then multiple tests of poll The calculated next test plan of son, and a test case to be run is extracted in the works from test, As current test case, return the use-case attribute for judging the current test case for publicly-owned use-case also It is the operation of privately owned use-case.
Further, the automatic test device also includes:Division module, in the extraction module Before the multiple test plans of poll, resource pool is divided;With the second determining module, it is described default for determining Threshold value;5th processing module, for formulating number and predetermined threshold value identical test son plan, need to The test case of the same private privileges is called to be placed in same test in the works.
Corresponding to the process that use-case is write, in the present embodiment, the automatic test device also includes:5th Judge module, divides resource pool for the division module, and second determining module determines the default threshold Value, the 5th processing module are formulated test plan and will need to call the survey of the same private privileges Before example on probation is placed in same test in the works, judge whether test case can participate in many use-cases same Shi Yunhang;3rd determining module, if for, it is determined that the use-case attribute of the test case is publicly-owned use-case; 4th determining module, for if not, it is determined that the use-case attribute of the test case is privately owned use-case.
Corresponding to the process of corresponding relation of setting up testing procedure and the resource that need to call between, in the present embodiment, The situation of publicly-owned use-case:The automatic test device also includes:6th judge module, for the described 3rd After determining module determines that the use-case attribute of the test case is publicly-owned use-case, the survey of the test case is judged Needed for try is rapid, whether the resource of application allows multiple test cases while taking;5th determining module, is used for If, it is determined that needed for the testing procedure, the resource of application is publicly-owned resource, need to be adjusted from publicly-owned resource pool Use resource;6th determining module, for if not, it is determined that the resource of application is private needed for the testing procedure There is resource, resource need to be called from private privileges pond.
The situation of privately owned use-case:The automatic test device also includes:7th determining module, for described After 4th determining module determines that the use-case attribute of the test case is privately owned use-case, the test is directly determined Needed for the testing procedure of use-case, the resource of application is private privileges, need to call resource from private privileges pond.
Wherein, the described of above-mentioned automated testing method realizes that embodiment is applied to the automatic test device Embodiment in, can also reach identical technique effect.
The embodiment of the present invention three provide automatic test device can be applicable to server, client, instrument or Any device that need to carry out automatic test such as equipment, is not limited thereto.
It should be noted that this many functional part described in this description is all referred to as module/submodule, Specifically to emphasize the independence of its implementation.
In the embodiment of the present invention, module/submodule can be realized with software, so as to by various types of processors Perform.For example, the executable code module of a mark can include or many of computer instruction Individual physics or logical block, for example, which can be built as object, process or function.Even so, The executable code of institute's mark module need not be physically located together, and can be including being stored in different positions On different instructions, when being combined together in these command logics, which constitutes and module and realizes the mould The regulation purpose of block.
In fact, executable code module can be individual instructions or the instruction of many bars, and or even can To be distributed on multiple different code segments, it is distributed in the middle of distinct program, and sets across multiple memories Back-up cloth.Similarly, peration data can be identified in module, and can be according to any appropriate shape Formula is realized and is organized in the data structure of any appropriate type.The peration data can be used as single Data set is collected, or can be distributed on diverse location and (be included in different storage device), and extremely Partially only can be present in system or network as electronic signal.
When module can be realized using software, it is contemplated that the level of existing hardware technique, it is possible to soft The module that part is realized, in the case where cost is not considered, those skilled in the art can build corresponding hard Realizing corresponding function, the hardware circuit includes conventional ultra-large integrated (VLSI) electricity to part circuit The existing semiconductor of road or gate array and such as logic chip, transistor etc or other are discrete Element.Module can also use programmable hardware device, such as field programmable gate array, programmable array to patrol Volume, programmable logic device etc. realizes.
Above-described is the preferred embodiment of the present invention, it should be pointed out that for the ordinary people of the art For member, under the premise of without departing from principle of the present invention, some improvements and modifications can also be made, these Improvements and modifications also should be regarded as protection scope of the present invention.

Claims (10)

1. a kind of automated testing method, it is characterised in that include:
The multiple test plans of poll, extract a test to be run in the works from test being currently polled to Use-case, as current test case;
The use-case attribute of the current test case is judged for publicly-owned use-case or privately owned use-case, wherein, it is described Publicly-owned use-case refers to that the test case can be with other test cases while running, the privately owned use-case refers to this Test case can not be run simultaneously with other test cases;
When the current test case is publicly-owned use-case, the testing procedure institute of the current test case is judged The resource that need to apply is publicly-owned resource or private privileges, wherein, publicly-owned resource refers to that multiple test cases can With the resource for taking simultaneously, private privileges are referred to and are only capable of while the resource taken by a test case;
When the resource applied needed for the testing procedure of the current test case is publicly-owned resource, then from publicly-owned Corresponding resource is called in resource pool and the current test case that brings into operation, wherein, the publicly-owned resource Pond is the set of publicly-owned resource.
2. automated testing method as claimed in claim 1, it is characterised in that described from publicly-owned resource Corresponding resource is called in pond and after the current test case that brings into operation, the automated testing method Also include:
Judge whether the publicly-owned of current operation is less than predetermined threshold value with number of cases;
If so, the then calculated next test plan of multiple test of poll, and from the test son plan One test case to be run of middle extraction, as current test case, returns the judgement current test The step of use-case attribute of use-case is publicly-owned use-case or privately owned use-case;
If it is not, then etc. after the receipt of test case end of run to be generated, from the test case with end of run Run in the works by one test case to be run of extraction for corresponding son of testing, and circulates execution wait product After the receipt of raw test case end of run, from the test son plan corresponding with the test case of end of run The step of one test case to be run of middle extraction is run.
3. automated testing method as claimed in claim 1, it is characterised in that the automatic test side Method also includes:
When the current test case is privately owned use-case, the test step of the current test case is directly determined The resource of application needed for rapid is private privileges;
From private privileges pond, call corresponding resource to bring into operation the current test case, wherein, it is described Private privileges pond is the set of private privileges.
4. automated testing method as claimed in claim 3, it is characterised in that described from private privileges Corresponding resource is called to bring into operation after the current test case in pond, the automated testing method is also Including:
Judge whether the private privileges in the private privileges pond are all called;
If so, then etc. after the receipt of test case end of run to be generated, from the test case with end of run Run in the works by one test case to be run of extraction for corresponding son of testing, and circulates execution wait product After the receipt of raw test case end of run, from the test son plan corresponding with the test case of end of run The step of one test case to be run of middle extraction is run;
If it is not, the then calculated next test plan of multiple test of poll, and from the test son plan One test case to be run of middle extraction, as current test case, returns the judgement current test The step of use-case attribute of use-case is publicly-owned use-case or privately owned use-case.
5. automated testing method as claimed in claim 2, it is characterised in that in the multiple surveys of the poll Swab plan, extracts a test case to be run from test being currently polled to, in the works as current Before test case, the automated testing method also includes:
Divide resource pool;With
Determine the predetermined threshold value;
Number and predetermined threshold value identical test son plan are formulated, the same private privileges need to be called Test case be placed in it is same it is described test son in the works.
6. automated testing method as claimed in claim 5, it is characterised in that in the division resource pool; With the determination predetermined threshold value;Number and predetermined threshold value identical test son plan are formulated, need to be called Before the test case of the same private privileges is placed in same test in the works, the automation is surveyed Method for testing also includes:
Judge whether test case can participate in many use-cases while operation;
If, it is determined that the use-case attribute of the test case is publicly-owned use-case;
If not, it is determined that the use-case attribute of the test case is privately owned use-case.
7. automated testing method as claimed in claim 6, it is characterised in that it is determined that the test case Use-case attribute be publicly-owned use-case after, the automated testing method also includes:
The resource for judging application needed for the testing procedure of the test case whether allow multiple test cases while Take;
If, it is determined that the resource of application needed for the testing procedure is publicly-owned resource, need to be from publicly-owned resource pool In call resource;
If not, it is determined that the resource of application needed for the testing procedure is private privileges, need to be from private privileges pond In call resource.
8. automated testing method as claimed in claim 6, it is characterised in that it is determined that the test case Use-case attribute be privately owned use-case after, the automated testing method also includes:
The resource for directly determining application needed for the testing procedure of the test case is private privileges, need to be from privately owned Resource is called in resource pool.
9. a kind of automatic test device, it is characterised in that include:
Extraction module, for the multiple test plans of poll, is extracted in the works from test being currently polled to One test case to be run, as current test case;
First judge module, for judging the use-case attribute of the current test case for publicly-owned use-case or private Have use-case, wherein, the publicly-owned use-case refer to the test case can with other test cases and meanwhile operation, The privately owned use-case refers to that the test case can not be with other test cases while operation;
Second judge module, for when the current test case is publicly-owned use-case, judging the current survey Needed for the testing procedure of example on probation, the resource of application is publicly-owned resource or private privileges, wherein, publicly-owned resource Refer to that multiple test cases can be while the resource for taking, private privileges are referred to and are only capable of while being used by a test The resource that example takes;
First operation module, for the resource applied needed for the testing procedure of the current test case for public affairs When having resource, then corresponding resource the current test case that brings into operation are called from publicly-owned resource pool, Wherein, the publicly-owned resource pool is the set of publicly-owned resource.
10. automatic test device as claimed in claim 9, it is characterised in that the automatic test dress Putting also includes:
3rd judge module, after bringing into operation the current test case in the described first operation module, Judge whether the publicly-owned of current operation is less than predetermined threshold value with number of cases;
First processing module, for the if so, then calculated next test plan of multiple test of poll, And a test case to be run is extracted in the works from test, as current test case, return described The use-case attribute for judging the current test case is the operation of publicly-owned use-case or privately owned use-case;
Second processing module, for if it is not, then etc. after the receipt of test case end of run to be generated, from The sub test case to be run of extracting in the works of test that the test case of end of run is corresponding is run, And after circulating the receipts of test case end of run to be generated such as execution, from the test case phase with end of run Corresponding test extracts the operation run by a test case to be run in the works.
CN201510605076.1A 2015-09-21 2015-09-21 A kind of automated testing method and device Withdrawn CN106547654A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510605076.1A CN106547654A (en) 2015-09-21 2015-09-21 A kind of automated testing method and device
PCT/CN2016/094384 WO2017050037A1 (en) 2015-09-21 2016-08-10 Automated test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510605076.1A CN106547654A (en) 2015-09-21 2015-09-21 A kind of automated testing method and device

Publications (1)

Publication Number Publication Date
CN106547654A true CN106547654A (en) 2017-03-29

Family

ID=58364494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510605076.1A Withdrawn CN106547654A (en) 2015-09-21 2015-09-21 A kind of automated testing method and device

Country Status (2)

Country Link
CN (1) CN106547654A (en)
WO (1) WO2017050037A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597733A (en) * 2018-12-04 2019-04-09 航天恒星科技有限公司 A kind of multifunctional efficient dynamic chip verifying emulation mode and equipment
CN110501627A (en) * 2018-05-17 2019-11-26 大唐移动通信设备有限公司 A kind of the Digital Logical Circuits detection method and device of base station
CN110727600A (en) * 2019-10-17 2020-01-24 网易(杭州)网络有限公司 Automatic testing method, terminal, electronic device and readable storage medium
CN110795297A (en) * 2019-10-31 2020-02-14 杭州迪普科技股份有限公司 Electronic equipment testing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004220269A (en) * 2003-01-14 2004-08-05 Cyx Inc Integrated test management system
CN1967500A (en) * 2006-04-19 2007-05-23 华为技术有限公司 Resource using method in automatic testing process
CN104699616A (en) * 2015-03-31 2015-06-10 北京奇虎科技有限公司 Method, device and system for testing application

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001222436A (en) * 1999-12-30 2001-08-17 Internatl Business Mach Corp <Ibm> Method and system for supporting automation management of resource and recording medium
CN1248116C (en) * 2002-09-23 2006-03-29 上海贝尔有限公司 General purpose testing arrangement for embedded module and subsystem based on host machine platform
CN102609352B (en) * 2011-01-19 2014-11-19 阿里巴巴集团控股有限公司 Parallel testing method and parallel testing server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004220269A (en) * 2003-01-14 2004-08-05 Cyx Inc Integrated test management system
CN1967500A (en) * 2006-04-19 2007-05-23 华为技术有限公司 Resource using method in automatic testing process
CN104699616A (en) * 2015-03-31 2015-06-10 北京奇虎科技有限公司 Method, device and system for testing application

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110501627A (en) * 2018-05-17 2019-11-26 大唐移动通信设备有限公司 A kind of the Digital Logical Circuits detection method and device of base station
CN110501627B (en) * 2018-05-17 2020-11-03 大唐移动通信设备有限公司 Digital logic circuit detection method and device for base station
CN109597733A (en) * 2018-12-04 2019-04-09 航天恒星科技有限公司 A kind of multifunctional efficient dynamic chip verifying emulation mode and equipment
CN109597733B (en) * 2018-12-04 2022-08-09 航天恒星科技有限公司 Multifunctional efficient dynamic chip verification simulation method and equipment
CN110727600A (en) * 2019-10-17 2020-01-24 网易(杭州)网络有限公司 Automatic testing method, terminal, electronic device and readable storage medium
CN110727600B (en) * 2019-10-17 2023-07-25 网易(杭州)网络有限公司 Automatic test method, terminal, electronic equipment and readable storage medium
CN110795297A (en) * 2019-10-31 2020-02-14 杭州迪普科技股份有限公司 Electronic equipment testing method and device
CN110795297B (en) * 2019-10-31 2023-04-28 杭州迪普科技股份有限公司 Electronic equipment testing method and device

Also Published As

Publication number Publication date
WO2017050037A1 (en) 2017-03-30

Similar Documents

Publication Publication Date Title
CN106547654A (en) A kind of automated testing method and device
Sou et al. Computing critical $ k $-tuples in power networks
CN106294120A (en) The test method of code, equipment and computer program
CN107133174A (en) Test case code automatically generating device and method
CN110083528A (en) Distribution method, device, computer equipment and the storage medium of test assignment
CN109840205A (en) Applied program testing method, device, readable storage medium storing program for executing and terminal device
CN106971075A (en) Detection process method, device and relevant device
CN109344066A (en) A kind of test method of browser page, system and terminal
CN113672441B (en) Method and device for testing intelligent equipment
CN107506350A (en) A kind of method and apparatus of identification information
CN111860867B (en) Model training method and system for hybrid heterogeneous system and related device
CN104461603B (en) A kind of information processing method and electronic equipment
CN106294364A (en) Realize the method and apparatus that web crawlers captures webpage
CN106648895A (en) Data processing method and device, and terminal
CN116110033A (en) License plate generation method and device, nonvolatile storage medium and computer equipment
CN112783790B (en) Application program testing method and device
CN109670044A (en) System, method and electronic equipment and storage medium are handled in a kind of collaboration of question thread
CN105930260B (en) A kind of system availability test method and device
CN104102579B (en) A kind of network measuring system and method based on multinuclear or many-core embeded processor
CN114328196A (en) Method, device and equipment for testing data leakage prevention system and storage medium
CN107885649A (en) The performance test methods and device of IOS application programs
CN105549981A (en) Flow control program compiling method
CN114528893A (en) Machine learning model training method, electronic device and storage medium
CN111563033B (en) Simulation data generation method and device
CN114167223B (en) Power supply abnormity detection method and device and computer readable storage medium

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20170329