CN105281977B - A kind of intelligent behaviour method of testing and system based on binary tree algorithm - Google Patents

A kind of intelligent behaviour method of testing and system based on binary tree algorithm Download PDF

Info

Publication number
CN105281977B
CN105281977B CN201510689259.6A CN201510689259A CN105281977B CN 105281977 B CN105281977 B CN 105281977B CN 201510689259 A CN201510689259 A CN 201510689259A CN 105281977 B CN105281977 B CN 105281977B
Authority
CN
China
Prior art keywords
test
granularity
module
point
binary tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510689259.6A
Other languages
Chinese (zh)
Other versions
CN105281977A (en
Inventor
周悦
郭振东
何泾沙
王威
潘铁
万雪姣
张伊璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING SOFTWARE TESTING CENTER
Original Assignee
BEIJING SOFTWARE TESTING CENTER
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 BEIJING SOFTWARE TESTING CENTER filed Critical BEIJING SOFTWARE TESTING CENTER
Priority to CN201510689259.6A priority Critical patent/CN105281977B/en
Publication of CN105281977A publication Critical patent/CN105281977A/en
Application granted granted Critical
Publication of CN105281977B publication Critical patent/CN105281977B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention discloses a kind of intelligent behaviour method of testing based on binary tree algorithm, including:System acceptance test is asked, it is determined that required test section, the granularity and test point of displacement, are tested test point, judgement tests whether success, it is if unsuccessful, two first son test sections of generation, if success, form two second son test sections, if each siding-to-siding block length is more than granularity, repetition is above-mentioned, and otherwise record test saturation point, stops test.Intelligent behaviour test system, including:Test request module is received, tests interval determination module, granularity determining module, test point locating module, test module, judge module, previous step and next step Bit andits control module, comparison module, test saturation point logging modle.The present invention is used as the location path of test point using binary tree structure, the defects of overcoming manual control, improves efficiency, more fast and accurately quantification bound, realizes and automates.

Description

A kind of intelligent behaviour method of testing and system based on binary tree algorithm
Technical field
The present invention relates to automated performance testing technical field, more particularly to a kind of intelligent behaviour based on binary tree algorithm Method of testing and system.
Background technology
With the continuous specification of testing process and the further refinement of software testing technology, software test automation is Have become a very important strength.Automatic test typically refers to runtime on a preset condition based or application program, Operation result is assessed, preparatory condition should include normal condition and exceptional condition.
The saturation point of performance test can be regarded as the upper limit or lower limit in the section for meeting test request.The upper limit in the section is The minimum test quantity of system acceptable, lower limit is system acceptable full test quantity.In the range of the section, System can normal operation.Meanwhile saturation point should be less than or equal to newest granularity size.
Current Performance measurement software is all to initiate to ask from client according to user's request by the way of Ask, parallel multi-user is simulated by multithreading and asked, for example, system requirements supports 1000 people login system simultaneously, in reality In test, artificially 500 analog subscribers are set to log in, if success, then number of users is progressively raised, if finding, 720 simulations are used Family has no problem when logging in, but is gone wrong during 800 analog subscribers logins, it is possible to determines on the analog subscriber of system under test (SUT) Limit is between 720-800.But at present this performance test be by manual control number of users, can not automatically, quickly, Correctly find the upper limit for the analog subscriber quantity that system under test (SUT) can be supported.
The content of the invention
To solve the above problems, the invention provides a kind of intelligent behaviour method of testing based on binary tree algorithm and it is System.Automatically control number of users to realize, and can automatically, quickly and accurately find out the simulation use that system under test (SUT) can be supported The upper limit of amount amount.
To achieve these goals, technical scheme is as follows:
A kind of intelligent behaviour method of testing based on binary tree algorithm, comprises the following steps:
S1. test system acceptance test is asked;
S2. test section, the granularity and test point of displacement needed for determining;
S3. the test point is tested, success is tested whether described in judgement, if unsuccessful, perform S41, if success, Then perform S42;
S41. higher limit m, lower limit n, displacement granularity d based on the test section, generate two first son tests Section, and the pilot q that tests oneself is tested, and examines whether its siding-to-siding block length is more than the granularity, if more than S2 is returned, otherwise, Perform S5;
S42. higher limit m, lower limit n based on test section, two second son test sections, and the pilot q that tests oneself are generated Tested, examine whether its siding-to-siding block length is more than the granularity, if more than S2 is returned, otherwise, perform S5;
S5. record test saturation point, stops test.
Wherein, S2 includes following sub-step:
S21. the higher limit m and the lower limit n are determined;
S22. the displacement granularity d is determined;
S23. the test point q and more new record are positioned.
Wherein, the test point
Wherein, the generating process in the first son test section is as follows:In units of the granularity d, in the test Point q each side moves one, forms two first son tests section (q+d, m) and (n, q-d).
Wherein, the generating process in the second son test section is as follows:Using the test point as boundary, by the test section Again it is divided into two second son tests section (q, m) and (n, q).
Wherein, when being tested described in each run, the value of the granularity d is adjusted according to testing requirement.
Wherein, the test saturation point is that the described first son tests siding-to-siding block length or the second son test siding-to-siding block length is first Secondary test point when being less than or equal to the granularity.
Secondly, there is provided a kind of system of the intelligent behaviour test based on binary tree algorithm, including:
Receive test request module, the test request sent for receiving operator;
Interval determination module is tested, for determining the higher limit and lower limit in test section;
Granularity determining module, for determining the value of granularity according to testing requirement;
Test point locating module, for according to determination test point;
Test module, for testing the test point;
Judge module, for judging that what the test module carried out tests whether success;
Previous step Bit andits control module, for the test point to be moved to the left to the value of a granularity, formed new Son test section lower limit;
Next step Bit andits control module, for the value for a granularity that the test point moves right, formed new Son test section higher limit;
Comparison module, for judging the siding-to-siding block length and the size of the granularity in each test section;
Saturation point logging modle is tested, for recording test saturation point and storing.
Wherein, the granularity determining module can be adjusted according to testing requirement to the value of the granularity.
Wherein, the test point locating module is based on genetic algorithm and positions the test point with binary tree algorithm.
Compared with prior art, the beneficial effects of the present invention are:On the premise of given test scope, with binary tree knot Location path of the structure as test point, the defects of controlling number of users manually is overcome, improves efficiency, and can more accelerate Fast accurately quantification bound, calculating process is more accurate, and is truly realized automation.
Brief description of the drawings
Fig. 1 is the flow chart of the intelligent behaviour method of testing based on binary tree algorithm in the present invention.
Embodiment
The present invention is described in further detail below by specific embodiment.
Before being tested, initial upper limit value, lower limit and the initial particle size of test are first obtained from user's request Value.
As shown in figure 1, its flow chart for the intelligent behaviour method of testing based on binary tree algorithm in the present invention, from figure Understand, this method comprises the following steps:
S1. test system acceptance test is asked;
S2. test section, the granularity and test point of displacement needed for determining;
S2 includes following sub-step:
S21. the higher limit m and lower limit n in test section are determined;
S22. displacement granularity d is determined;
The displacement granularity of test point refers to the minimum number that test point increaseds or decreases every time.Each round retests Before, in units of granularity, test point quantity is adjusted according to binary tree result of calculation.Granularity calculation formula N × δ, wherein N For the full test amount of test system, δ is the measuring accuracy of customer requirement.
S23. assignment test point q and more new record, test pointTest can also be met using other The value of demand.
S3. the test point is tested, success is tested whether described in judgement, if unsuccessful, perform S41, if success, Then perform S42;
S41. in units of the granularity d, one is each side moved in the test point q, is formed described in two First son test section (q+d, m) and (n, q-d), and examine whether its siding-to-siding block length is more than the granularity, if more than return S2, otherwise, perform S5;
S42. using the test point as boundary, by it is described test section be divided into again two it is described second son test section (q, M) and (n, q), and examine whether its siding-to-siding block length is more than the granularity, if more than S2 is returned, otherwise, execution S5;
S5. record test saturation point, stops test, test saturation point herein for the described first son test siding-to-siding block length or The second son test siding-to-siding block length is less than or equal to the test point during granularity first.
When being tested described in each run, granularity d value is adjusted according to testing requirement.Test point in S4 is based on losing Propagation algorithm and binary tree algorithm positioning.
Granular Computing is a kind of new concept and calculation of information processing, covers all reasons related to granularity By, method, technology and instrument, be mainly used in not knowing, the Intelligent treatment of incomplete fuzzy magnanimity information.Granular Computing conduct A kind of methodology, it is intended to effectively establish the concept based on the external world and customer-centric, while simplify us to physics The understanding of the world and virtual world and based on this, during Solve problems, pair of processing is used as by the use of suitable granularity As so as on the premise of ensureing to try to achieve satisfactory solution, improve the efficiency solved the problems, such as.Suitable granularity is often asked by what is proposed For the environment of topic and problem come what is determined, this point is significant to data processing shelf of the design based on Granule Computing.
It is succinct to implement code using recursive definition for binary tree.And it has in specific computer science Critically important utilization, it is a kind of critically important data structure.
Effect of the binary tree algorithm in the design be:Given test scope, test node is used as using binary tree structure Location path, target are structure binary tree test path and determine the saturation point and its bound of performance test.Tree is a kind of non- Linear data structure, tree have the concepts such as root node, subtree.The building process of binary tree is:First create the left son of a certain subtree Tree, if (during input negative) is not present in left subtree, its right subtree is created, if left subtree is present, then creates a left side for the tree Subtree, circulate successively.Wherein, its right subtree is then judged when a certain subtree left subtree is not present, right subtree is not present and then returns to it Father node judges right subtree again.
Illustrated below by a specific example.
Test system receives test request, it is determined that the higher limit m=1000 in test section, lower limit n=200, that is, is tested Section is (200,1000), determines displacement granularity d=100, assignment test point q1=600, and to test point q1=600 are carried out Test.
1. if be successfully tested, that is, meet demand, then in units of granularity d=100, in test point q1=600 or so The value of each one granularity of movement in both sides, two the first new son tests section (700,1000) and (200,500) are formed, are judged Show that the siding-to-siding block length in each section is all higher than granularity 100, still determine granularity d=100, test test point q21=850, q22=350, if q21=850 are successfully tested, and it is (950,1000) and (700,750) to redefine the first son test section, inspection Each siding-to-siding block length for measuring the first test subinterval is respectively less than granularity 100, and record test saturation point is 850.
Displacement granularity, such as d=50 can certainly be redefined, in test point q21=850 each side move one The value of individual granularity, then redefine the first test subinterval respectively (900,1000), (700,800).Test point q31= 950, q32=750, it is tested, if q31=950 are successfully tested, it is determined that the first son test to be tested next time Section is respectively (900,900) and (1000,1000), and siding-to-siding block length is less than granularity 50, therefore it is 950 to record saturation point, or Person still reduces the value of granularity, continues to repeat the above steps, until reaching the precision of customer demand.
2. if test is unsuccessful, that is, demand is not met, in test point q1=600 be boundary, will test section (200, 1000) it is divided into two second son tests section (600,1000) and (200,600), and the section in above-mentioned two section is grown at judgement Degree is all higher than granularity 100, and it is 100 to determine granularity, test test point q '21=800, q '22=400, if test point q '21 =800 successes, then tested according to the step in 1.If two test points are unsuccessful, respectively with test point q '21= 800,q’22=400 be boundary, redefines the second son test section, is respectively (600,800), (800,1000), (200,400), (400,600), but the siding-to-siding block length in above-mentioned section is equal to granularity 100, and as needed, granularity d size is changed to 50 or other values, the test point q ' in each test section is drawn respectively31=700, q '31=900, q '31=300, q '31=500, And it is tested respectively, if q '31=700 are successfully tested, then the second son test section tested next time is (600,650) and (750,800), because its siding-to-siding block length is equal to granularity 50, therefore it is 700 to test saturation point.
In summary, premise of the intelligent behaviour method of testing of the binary tree algorithm in the present invention in given test scope Under, using binary tree structure as the location path of test point, the defects of controlling number of users manually is overcome, improves efficiency, And can more fast and accurately quantification bound, calculating process is more accurate, and is truly realized automation.
In order to realize the above method, the system for implementing the above method is additionally provided in the present invention, including:
Receive test request module, the test request sent for receiving operator;
Interval determination module is tested, for determining the higher limit and lower limit in test section;
Granularity determining module, for determining the value of granularity according to testing requirement, and can be according to testing requirement pair The value of granularity is adjusted;
Test point locating module, for according to test point is determined, it to be based on genetic algorithm and binary tree algorithm assignment test Point;
Test module, for testing the test point;
Judge module, for judging that what the test module carried out tests whether success;
Previous step Bit andits control module, for the test point to be moved to the left into a particle angle value, formed new The lower limit in son test section;
Next step Bit andits control module, for the test point to be moved right a particle angle value, formed new The higher limit in son test section;
Comparison module, for judging the siding-to-siding block length and the size of the granularity in each test section;
Saturation point logging modle is tested, for recording test saturation point and storing.
The preferred embodiments of the present invention are these are only, are not intended to limit the invention, for those skilled in the art For member, the present invention can have various modifications and variations.Any modification within the spirit and principles of the invention, being made, Equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

1. a kind of intelligent behaviour method of testing based on binary tree algorithm, it is characterised in that comprise the following steps:
S1. test system acceptance test is asked;
S2. test section, the granularity and test point of displacement needed for determining;
S3. the test point is tested, success is tested whether described in judgement, if unsuccessful, perform S41, if success, holds Row S42;
S41. higher limit m, lower limit n, displacement granularity d based on the test section, two first son test sections are generated, Two the first son test sections are respectively (q+d, m) and (n, q-d), and the pilot q that tests oneself is tested, and examines its section to grow Whether degree is more than the granularity, if more than S2 is returned, otherwise, performs S5;
S42. higher limit m, lower limit n based on test section, generate two second son test sections, and two second sons are surveyed It is respectively (q, m) and (n, q) to try section, and the pilot q that tests oneself is tested, and examines whether its siding-to-siding block length is more than the particle Degree, if more than S2 is returned, otherwise, perform S5;
S5. record test saturation point, stops test.
2. the intelligent behaviour method of testing according to claim 1 based on binary tree algorithm, it is characterised in that S2 is included such as Lower sub-step:
S21. the higher limit m and the lower limit n are determined;
S22. the displacement granularity d is determined;
S23. the test point q and more new record are positioned.
3. the intelligent behaviour method of testing according to claim 2 based on binary tree algorithm, it is characterised in that the test Point
4. the intelligent behaviour method of testing according to claim 2 based on binary tree algorithm, it is characterised in that described first The generating process in son test section is as follows:In units of the granularity d, one is each side moved in the test point q, Form two first son tests section (q+d, m) and (n, q-d).
5. the intelligent behaviour method of testing according to claim 2 based on binary tree algorithm, it is characterised in that described second The generating process in son test section is as follows:Using the test point as boundary, the test section is divided into two described second again Son test section (q, m) and (n, q).
6. the intelligent behaviour method of testing according to claim 2 based on binary tree algorithm, it is characterised in that each run During the test, the value of the granularity d is adjusted according to testing requirement.
7. the intelligent behaviour method of testing according to claim 1 based on binary tree algorithm, it is characterised in that the test Saturation point is that the described first son tests siding-to-siding block length or the second son test siding-to-siding block length is less than or equal to the particle first Test point when spending.
8. a kind of system for any described tests of the intelligent behaviour based on binary tree algorithm of claim 1-7, its feature It is, including:
Receive test request module, the test request sent for receiving operator;
Interval determination module is tested, for determining the higher limit and lower limit in test section;
Granularity determining module, for determining the value of granularity according to testing requirement;
Test point locating module, for according to determination test point;
Test module, for testing the test point;
Judge module, for judging that what the test module carried out tests whether success;
Previous step Bit andits control module, for the test point to be moved to the left to the value of a granularity, form new son Test the lower limit in section;
Next step Bit andits control module, for the value for a granularity that the test point moves right, form new son Test the higher limit in section;
Comparison module, for judging the siding-to-siding block length and the size of the granularity in each test section;
Saturation point logging modle is tested, for recording test saturation point and storing.
9. the intelligent behaviour test system according to claim 8 based on binary tree algorithm, it is characterised in that the particle Degree determining module can be adjusted according to testing requirement to the value of the granularity.
10. the intelligent behaviour test system according to claim 8 based on binary tree algorithm, it is characterised in that the survey Pilot locating module is based on genetic algorithm and positions the test point with binary tree algorithm.
CN201510689259.6A 2015-10-21 2015-10-21 A kind of intelligent behaviour method of testing and system based on binary tree algorithm Active CN105281977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510689259.6A CN105281977B (en) 2015-10-21 2015-10-21 A kind of intelligent behaviour method of testing and system based on binary tree algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510689259.6A CN105281977B (en) 2015-10-21 2015-10-21 A kind of intelligent behaviour method of testing and system based on binary tree algorithm

Publications (2)

Publication Number Publication Date
CN105281977A CN105281977A (en) 2016-01-27
CN105281977B true CN105281977B (en) 2018-04-03

Family

ID=55150346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510689259.6A Active CN105281977B (en) 2015-10-21 2015-10-21 A kind of intelligent behaviour method of testing and system based on binary tree algorithm

Country Status (1)

Country Link
CN (1) CN105281977B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111047592B (en) * 2020-03-13 2020-06-05 武汉理工大学 Monitoring system and image communication processing method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197734A (en) * 2007-12-27 2008-06-11 华为技术有限公司 Test approach and device for command line interface
CN102508780A (en) * 2011-11-21 2012-06-20 电子科技大学 Crossed dynamic software testing method and device
CN104572430A (en) * 2013-10-24 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for testing terminal application interface
CN104575621A (en) * 2013-10-21 2015-04-29 鸿富锦精密工业(深圳)有限公司 Memory device testing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197734A (en) * 2007-12-27 2008-06-11 华为技术有限公司 Test approach and device for command line interface
CN102508780A (en) * 2011-11-21 2012-06-20 电子科技大学 Crossed dynamic software testing method and device
CN104575621A (en) * 2013-10-21 2015-04-29 鸿富锦精密工业(深圳)有限公司 Memory device testing method and system
CN104572430A (en) * 2013-10-24 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for testing terminal application interface

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"自动化软件测试技术研究";金虎;《四川大学博士学位论文》;20080625;全文 *
"软件内建自测试中的模板库及测试路径分析";李文锋,徐拾义;《计算机工程》;20040812;第30卷(第14期);全文 *
"软件测试用例自动生成技术研究";李军义;《湖南大学博士学位论文》;20080917;全文 *

Also Published As

Publication number Publication date
CN105281977A (en) 2016-01-27

Similar Documents

Publication Publication Date Title
CN112819169B (en) Quantum control pulse generation method, device, equipment and storage medium
CN110084271A (en) A kind of other recognition methods of picture category and device
CN110413510B (en) Data processing method, device and equipment
CN107729621B (en) A kind of verification tool of statical model
US11650903B2 (en) Computer programming assessment
WO2021121296A1 (en) Exercise test data generation method and apparatus
CN110264274A (en) Objective group's division methods, model generating method, device, equipment and storage medium
CN107038120A (en) A kind of method for testing software and equipment
CN105281977B (en) A kind of intelligent behaviour method of testing and system based on binary tree algorithm
US20150286753A1 (en) Estimating Think Times
CN105372989B (en) A kind of estimation method and device of Dispatching Control System deficiency of data parameter
CN113297371A (en) Method, device and equipment for generating recommended question library and storage medium
JP2018190129A (en) Determination device, analysis system, determination method and determination program
CN106778048B (en) The method and device of data processing
KR101478935B1 (en) Risk-profile generation device
Duenyas et al. Release policies for assembly systems
CN111598390B (en) Method, device, equipment and readable storage medium for evaluating high availability of server
CN114490405A (en) Resource demand determination method, device, equipment and storage medium
CN104298729B (en) Data classification method and device
CN106301880A (en) One determines that cyberrelationship degree of stability, Internet service recommend method and apparatus
CN105930260A (en) Method and apparatus for testing system availability
CN109993313A (en) Sample label processing method and processing device, community partitioning method and device
CN116069646B (en) Test set determination method and system for multi-objective testability optimization
CN112632883B (en) Method, device, equipment and medium for testing simulation result of device model
CN110647466B (en) Program quality supervision method and device based on DevOps

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant