CN106547695B - A kind of test macro and method of scale software - Google Patents

A kind of test macro and method of scale software Download PDF

Info

Publication number
CN106547695B
CN106547695B CN201610947172.9A CN201610947172A CN106547695B CN 106547695 B CN106547695 B CN 106547695B CN 201610947172 A CN201610947172 A CN 201610947172A CN 106547695 B CN106547695 B CN 106547695B
Authority
CN
China
Prior art keywords
test
target collection
path
test target
vector
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
CN201610947172.9A
Other languages
Chinese (zh)
Other versions
CN106547695A (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.)
Shanghai Jiaotong University
China Nuclear Power Engineering Co Ltd
Original Assignee
Shanghai Jiaotong University
China Nuclear Power Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University, China Nuclear Power Engineering Co Ltd filed Critical Shanghai Jiaotong University
Priority to CN201610947172.9A priority Critical patent/CN106547695B/en
Publication of CN106547695A publication Critical patent/CN106547695A/en
Application granted granted Critical
Publication of CN106547695B publication Critical patent/CN106547695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses the test macro and method of a kind of scale software, which includes: vector generation module, for generating test vector using function-driven and the method for random test for measurand;Monitoring modular, for according to the generation test vector, the path coverage of the test target collection of the measurand is monitored, and when monitoring that the path coverage of the test target collection reaches critical state, searches for and obtain the uncovered path of test target collection of the measurand;And model computation module solves the test vector for obtaining the uncovered path of the test target collection to the mathematical model for the path founding mathematical models uncovered according to the test target collection.The present invention provides a kind of succinct test vector set constructing plan, can be improved the coverage rate of test target collection, and improve testing reliability and testing efficiency.

Description

A kind of test macro and method of scale software
Technical field
The present invention relates to field of computer technology more particularly to a kind of test macros and method of scale software.
Background technique
Software test (Software testing) describes a kind of correctness, integrality, peace for promoting identification software The process of full property and quality.In other words, software test be a kind of reality output audited between anticipated output or compared with process. The classical definition of software test is: operating under the defined conditions to program, to find program error, measures software quality And whether the process that design requirement is assessed is able to satisfy to it.Software test is software development and software verification and confirmation activity In ensure the important technical of software quality.
The realistic problem that software test is faced is, input state Space Scale big software complicated for algorithm logic, Test is difficult to traverse all possible input state.For there is the software of high security, high reliability application requirement, how to pass through The test of limited quantity improves the coverage rate of test target collection, to guarantee that the quality of software is that important in software test is asked Topic.
The most important is design test vector (also referred to as test case) in software test, and test vector is for some Special test target and one group of test input, execution condition and the expected results designed, so as to test some Program path or Verify whether some Program path meets some particular demands.Test vector is to carry out test to a specific software product to appoint The description of business embodies testing scheme, method, technology and strategy.Content includes test target, test environment, input data, test Step, expected results, test script etc., and form document.Different test target collection is chosen for measurand, test to Amount will be different.
The generation method of test vector mainly directly test and random test in the prior art.Directly test hit be The specific point of some in the test space, it is desirable that tester is functional to the institute of measurand to be all perfectly clear, and needs needle To each function point design test vector, requirement of this method to tester is very high, and not too many simplifies leeway. Random test may hit any one function point in input state space, it is possible to the function that hit-test personnel do not expect Point, to mitigate the workload of tester, but this randomness is likely to result in the repetition covering of function point, random test Tend not to reach expected test target collection coverage rate, many test vectors are redundancies for function point, need repeatedly weight Test is built, to reduce the reliability and testing efficiency of test.
Summary of the invention
The present invention aiming at the problems existing in the prior art, provides the test macro and method of a kind of scale software, energy The coverage rate of test target collection is enough improved, and improves testing reliability and testing efficiency.
The technical solution that the present invention is proposed with regard to above-mentioned technical problem is as follows:
On the one hand, the present invention provides a kind of test macro of scale software, comprising:
Vector generation module, for for measurand using the method for function-driven and random test generate test to Amount;
Monitoring modular, for monitoring the path of the test target collection of the measurand according to the generation test vector Coverage rate, and when monitoring that the path coverage of the test target collection reaches critical state, it searches for and obtains described tested The uncovered path of the test target collection of object;And
Model computation module, for the path founding mathematical models uncovered according to the test target collection, to described Mathematical model solves the test vector for obtaining the uncovered path of the test target collection.
Further, the monitoring modular includes:
Monitoring unit, for monitoring the path of the test target collection of the measurand according to the generation test vector Whether coverage rate reaches critical state;
Acquiring unit is searched for, for stopping when monitoring that the path coverage of the test target collection reaches critical state Test vector is only generated using function-driven and the method for random test, searches for and obtain the test target collection of the measurand Uncovered path;And
Generation unit, for continuing when monitoring that the path coverage of the test target collection is not up to critical state Test vector is generated using function-driven and the method for random test.
Further, the monitoring unit is specifically used for monitoring the measurand according to the generation test vector Whether the path coverage of test target collection reaches critical state;
It is not less than preset threshold in the path coverage for monitoring the test target collection, and follow-up function driving and random When test does not promote the path coverage of the test target collection, determine that the path coverage of the test target collection reaches critical State;
It is less than the road of preset threshold or the test target collection in the path coverage for detecting the test target collection Diameter coverage rate is not less than preset threshold, but follow-up function driving and random test still promote the path covering of the test target collection When rate, determine that the path coverage of the test target collection is not up to critical state.
Further, described search acquiring unit is specifically used for monitoring that the path coverage of the test target collection reaches When to critical state, stop generating test vector using function-driven and the method for random test, and reported according to test statistics The current path coverage information for obtaining the test target collection obtains the test target according to the current path coverage information Collect uncovered path.
Further, the model computation module specifically includes:
Model foundation unit, for establishing mathematical modulo by the logical construction path uncovered to the test target collection Type;And
Vector acquiring unit obtains the test target collection for solving using formalization method to the mathematical model The test vector in uncovered path.
On the other hand, the present invention provides a kind of test method of scale software, comprising:
Test vector is generated using function-driven and the method for random test for measurand;
According to the generation test vector, the path coverage of the test target collection of the measurand is monitored;
When monitoring that the path coverage of the test target collection reaches critical state, searches for and obtain described tested pair The uncovered path of the test target collection of elephant;
According to the uncovered path founding mathematical models of the test target collection, the mathematical model is solved and obtains institute State the test vector in the uncovered path of test target collection.
Further, described according to the generation test vector, monitor the path of the test target collection of the measurand Coverage rate specifically includes:
According to the generation test vector, whether the path coverage for monitoring the test target collection of the measurand reaches Critical state;
It is not less than preset threshold in the path coverage for monitoring the test target collection, and follow-up function driving and random When test does not promote the path coverage of the test target collection, determine that the path coverage of the test target collection reaches critical State;
It is less than the road of preset threshold or the test target collection in the path coverage for detecting the test target collection Diameter coverage rate is not less than preset threshold, but follow-up function driving and random test still promote the path covering of the test target collection When rate, determine that the path coverage of the test target collection is not up to critical state.
Further, the test method of the scale software further include:
When monitoring that the path coverage of the test target collection is not up to critical state, continue function-driven and use The method of random test generates test vector.
Further, described when monitoring that the path coverage of the test target collection reaches critical state, search is simultaneously The uncovered path of the test target collection of the measurand is obtained, is specifically included:
When monitoring that the path coverage of the test target collection reaches critical state, stop using function-driven and with The method of machine test generates test vector, and the current path of the test target collection according to test statistics report acquisition covers letter Breath, obtains the uncovered path of the test target collection according to the current path coverage information.
Further, the path founding mathematical models uncovered according to the test target collection, to the mathematics Model solution obtains the test vector in the uncovered path of the test target collection, specifically includes:
Pass through the logical construction path founding mathematical models uncovered to the test target collection;
The mathematical model is solved using formalization method, obtains the survey in the uncovered path of the test target collection Try vector.
Technical solution provided in an embodiment of the present invention has the benefit that
In the test initial stage, generated for measurand using the method for function-driven and random test largely test to Amount, when the test vector of generation makes the path coverage of test target collection reach critical state, test target collection is not coated The path founding mathematical models of lid, and it is solved, to obtain the test vector in the uncovered path of test target collection, The coverage rate of test target collection is effectively improved, and test complexity is effectively reduced, improves testing reliability and testing efficiency.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the structural schematic diagram of the test macro for the scale software that the embodiment of the present invention one provides;
Fig. 2 be the embodiment of the present invention one provide scale software test macro in test target collection path coverage with The relation schematic diagram of time;
Fig. 3 is the building-block of logic in the test macro for the scale software that the embodiment of the present invention one provides;
Fig. 4 is the flow diagram of the test method of scale software provided by Embodiment 2 of the present invention;
Fig. 5 is the idiographic flow schematic diagram of the test method of scale software provided by Embodiment 2 of the present invention.
Specific embodiment
In order to solve prior art testing reliability present in the test macro of scale software is poor, testing efficiency is low etc. Technical problem, the present invention is intended to provide a kind of test macro of scale software, core concept is: providing a kind of vector generation Module, monitoring modular and model computation module, wherein vector generation module is for measurand using function-driven and random survey The method of examination generates a large amount of test vectors, and monitoring modular supervises the path coverage of test target collection according to the vector of generation It surveys, when detecting that path coverage reaches critical state, obtains the uncovered path of test target collection, model is made to calculate mould The root tuber path founding mathematical models uncovered according to test target collection, and then model solve and obtains test target collection not The test vector in capped path.The test macro of scale software provided by the present invention provides a kind of succinct validity test The constructing plan of vector, effectively improves the coverage rate of test target collection, and test complexity is effectively reduced, and improves testing reliability And testing efficiency.
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment one
The embodiment of the invention provides a kind of test macros of scale software, and referring to Fig. 1, which includes:
Vector generation module 1, for generating test vector using the method for random test for measurand;
Monitoring modular 2, for monitoring the path of the test target collection of the measurand according to the generation test vector Coverage rate, and when monitoring that the path coverage of the test target collection reaches critical state, it searches for and obtains described tested The uncovered path of the test target collection of object;And
Model computation module 3, for the path founding mathematical models uncovered according to the test target collection, to described Mathematical model solves the test vector for obtaining the uncovered path of the test target collection.
It should be noted that building test platform before test execution, various test softwares are integrated into same computer On platform.In the test initial stage, vector generation module 1 is generated for measurand with function-driven and the method for random test Test vector.Wherein, vector generation module 1 can be first in test using any one test vector generation software in the prior art Stage beginning generates test vector with function-driven and the method for random test, is not limited to this embodiment.
When generating test vector, the test vector that 2 real-time monitoring vector generation module 1 of monitoring modular generates is to tested pair The path coverage of the test target collection of elephant.As shown in Fig. 2, in 0~t1Moment builds test platform, the road of test target collection Diameter coverage rate is 0;In the test initial stage, i.e., in t1~t2Moment, vector generation module 1 generate test vector, test target collection The stepped continuous rising of path coverage.It monitors in monitoring modular 2 in t2The path coverage of moment test target collection When reaching critical state, stops generating test vector with function-driven and the method for random test, search for and obtain test target Collect uncovered path.The path founding mathematical models uncovered to test target collection of model computation module 3, and to the number Model solution being learned, the test vector in the uncovered path of coverage test object set is capable of by can be obtained after solving.Such as Fig. 2 It is shown, reach critical state, i.e. t in the path coverage of test target collection2Continue to rise after moment, finally in t3Moment approach In 100%.The test macro of scale software provided by the present invention is suitable for function and algorithm logic complexity, state space quantity Greatly or security reliability requires high, the demanding software of test target.It is combined application of embodiment of the present invention function-driven, random Test and Coverage- Driven method quickly generate validity test vector, the coverage rate of test target collection are improved, using validity test Vector tests scale software, and test complexity is effectively reduced, and improves testing reliability and testing efficiency.
Further, the monitoring modular includes:
Monitoring unit, for monitoring the path of the test target collection of the measurand according to the generation test vector Whether coverage rate reaches critical state;
Acquiring unit is searched for, for stopping when monitoring that the path coverage of the test target collection reaches critical state Test vector is only generated using function-driven and the method for random test, searches for and obtain the test target collection of the measurand Uncovered path;And
Generation unit, for continuing when monitoring that the path coverage of the test target collection is not up to critical state Test vector is generated using function-driven and the method for random test.
It should be noted that monitoring unit is in real time according to the test vector of generation to the road of the test target collection of measurand Diameter coverage rate is monitored, and judges whether it reaches critical state.If path coverage reaches critical state, stop with function The method of driving and random test generates test vector, obtains the uncovered path of test target collection;If path coverage is not Reach critical state, then continues to generate test vector in a manner of function-driven and random test, until path coverage reaches Until critical state.
Further, the monitoring unit is specifically used for monitoring the measurand according to the generation test vector Whether the path coverage of test target collection reaches critical state;
It is not less than preset threshold in the path coverage for monitoring the test target collection, and follow-up function driving and random When test does not promote the path coverage of the test target collection, determine that the path coverage of the test target collection reaches critical State;
It is less than the road of preset threshold or the test target collection in the path coverage for detecting the test target collection Diameter coverage rate is not less than preset threshold, but follow-up function driving and random test still promote the path covering of the test target collection When rate, determine that the path coverage of the test target collection is not up to critical state.
It should be noted that Rule of judgment of the monitoring unit to critical state are as follows: with the side of function-driven and random test Whether the test vector that method generates is not less than preset threshold to the path coverage of measurand, and whether there is or not obvious for path coverage It is promoted.Wherein, preset threshold is generally 90%, path coverage whether there is or not the judgment criteria obviously risen can according to different situations into Row setting, such as growth rate.Specifically, if the path coverage of test target collection reaches 90% or more, and path coverage base This stabilization is not apparent from rising, then decision paths coverage rate has been in critical state;If the path coverage of test target collection does not reach Reach 90% or more to 90% or more or path coverage, but path coverage is still constantly rising, then decision paths cover Rate is also not up to critical state.
As shown in Fig. 2, in t2Moment, the path coverage of test target collection reach 91.8%, at this time with function-driven and The data for the test vector that the method for random test generates reach 20~30, and path coverage is not apparent from rising, substantially surely It is scheduled on 91.8%, then determines t2The path coverage at moment has been in critical state.
Further, described search acquiring unit is specifically used for monitoring that the path coverage of the test target collection reaches When to critical state, stop generating test vector using function-driven and the method for random test, and reported according to test statistics The current path coverage information for obtaining the test target collection obtains the test target according to the current path coverage information Collect uncovered path.
It should be noted that reported when the path coverage of test target collection reaches critical state according to test statistics, Test mesh can be obtained further according to the routing information of test target collection in the current path coverage rate information for obtaining test target collection Mark collects uncovered path.
Further, the model computation module specifically includes:
Model foundation unit, for establishing mathematical modulo by the logical construction path uncovered to the test target collection Type;And
Vector acquiring unit obtains the test target collection for solving using formalization method to the mathematical model The test vector in uncovered path.
It should be noted that the path founding mathematical models uncovered to test target collection by program logic structure, The mathematical model is solved using formalization method again.Wherein, formalization method is any formalization method, including but not It is limited to the formalization method based on Boolean satisfiability (SAT), it being capable of coverage test by the way that mathematics model solution can be obtained The test vector in the uncovered path of object set.
As shown in figure 3, the thick segment in figure is the uncovered path of the test target collection that gets, pass through logical construction Scheme path founding mathematical models automatically uncovered to the test target collection, as follows:
Wherein, BI2.D and BI3.D is to actually enter parameter, and BI1.S, BI2.S, BI3.S and BI4.S are input quality mark Know parameter, the mathematical model in the path that test target collection is uncovered in Fig. 3 is constructed by above-mentioned logical relation.Using shape Formula method solves the mathematical model, that is, adjusts the input parameter of mathematical model, keeps the output result of mathematical model full Sufficient Formalization Problems, the vector that the input parameter obtained after adjustment is constituted are the survey in the uncovered path of test target collection Vector is tried, to obtain the test vector for capableing of the uncovered path of coverage test object set.Wherein, using formalization method The detailed process solved to mathematical model is the prior art, is not described in detail herein.As shown in Fig. 2, being covered obtaining After the test vector in the uncovered path of test target collection, path coverage continues to rise after critical state, final to approach In 100%.
It not only needs to consider programmed logic when carrying out programming using hardware description language, it is also necessary to examine from hardware point of view Consider the feasibility of design;And only need to consider programmed logic when carrying out programming using software high-level language etc., relative to hardware For the programming of description language, simple software design is relatively easy.The test macro of scale software of the invention is applicable in In the programming of hardware description language, the test and verifying of software High-level Language Programming.
The embodiment of the present invention generates a large amount of tests using the method for random test in the test initial stage, for measurand Vector, when the test vector of generation makes the path coverage of test target collection reach critical state, by test target collection not by Path founding mathematical models of covering, and it is solved, with obtain the test in the uncovered path of test target collection to Amount, effectively improves the coverage rate of test target collection, and test complexity is effectively reduced, and improves testing reliability and testing efficiency.
Embodiment two
The embodiment of the invention provides a kind of test methods of scale software, can be applied to the scale in above-described embodiment The test macro of software, referring to fig. 4, comprising:
S1, test vector is generated using function-driven and the method for random test for measurand;
S2, according to the generation test vector, monitor the path coverage of the test target collection of the measurand;
S3, when monitoring that the path coverage of the test target collection reaches critical state, search for and obtain the quilt Survey the uncovered path of the test target collection of object;
S4, according to the uncovered path founding mathematical models of the test target collection, mathematical model solution is obtained Obtain the test vector in the uncovered path of the test target collection.
Further, described according to the generation test vector, monitor the path of the test target collection of the measurand Coverage rate specifically includes:
According to the generation test vector, whether the path coverage for monitoring the test target collection of the measurand reaches Critical state;
It is not less than preset threshold in the path coverage for monitoring the test target collection, and follow-up function driving and random When test does not promote the path coverage of the test target collection, determine that the path coverage of the test target collection reaches critical State;
It is less than the road of preset threshold or the test target collection in the path coverage for detecting the test target collection Diameter coverage rate is not less than preset threshold, but follow-up function driving and random test still promote the path covering of the test target collection When rate, determine that the path coverage of the test target collection is not up to critical state.
Further, the test method of the scale software further include:
When monitoring that the path coverage of the test target collection is not up to critical state, continue function-driven and use The method of random test generates test vector.
Further, described when monitoring that the path coverage of the test target collection reaches critical state, search is simultaneously The uncovered path of the test target collection of the measurand is obtained, is specifically included:
When monitoring that the path coverage of the test target collection reaches critical state, stop using function-driven and with The method of machine test generates test vector, and the current path of the test target collection according to test statistics report acquisition covers letter Breath, obtains the uncovered path of the test target collection according to the current path coverage information.
Further, the path founding mathematical models uncovered according to the test target collection, to the mathematics Model solution obtains the test vector in the uncovered path of the test target collection, specifically includes:
Pass through the logical construction path founding mathematical models uncovered to the test target collection;
The mathematical model is solved using formalization method, obtains the survey in the uncovered path of the test target collection Try vector.
It is the idiographic flow schematic diagram of the test method of scale software provided in an embodiment of the present invention referring to Fig. 5, comprising:
S101, at test initial stage, test vector is generated using function-driven and random testing method for measurand;
S102, according to generate test vector, judge whether the path coverage of the test target collection of the measurand is located In critical state;If it is not, then return step S101, if so, thening follow the steps S103;
The uncovered path of S103, the test target collection for obtaining the measurand;
S104, it is solved described in acquisition not to the uncovered path founding mathematical models, and to the mathematical model The test vector in capped path;
S105, judge whether test vector reaches the covering requirement of test target collection;If it is not, then return step S104, if It is then to terminate this test.
The embodiment of the present invention is in the test initial stage, for measurand using function-driven and the life of the method for random test It will be tested at a large amount of test vectors when the test vector of generation makes the path coverage of test target collection reach critical state The uncovered path founding mathematical models of object set, and it is solved, to obtain the uncovered road of test target collection The test vector of diameter, effectively improves the coverage rate of test target collection, and test complexity is effectively reduced, improve testing reliability and Testing efficiency.
In conclusion there is preferable practical effect the invention proposes the test macro and method of a kind of scale software Fruit: in the test initial stage, test vector is generated using function-driven and the method for random test for measurand, monitoring is surveyed Vector is tried to the path coverage of the test target collection of measurand, and judges whether the path coverage of test target collection is in Critical state continues if the path coverage of test target collection is not in critical state with the side of function-driven and random test Method generates test vector, if test target collection coverage rate reaches critical state, stops with the side of function-driven and random test Method generates test vector, obtains the path that test target collection is uncovered in measurand.It is uncovered to test target collection Path founding mathematical models, and the mathematical model is solved with formalization method, to obtain test vector for test target collection Uncovered path covering.The present invention is that a combined application function-driven, random test and Coverage- Driven method generate The technology of test vector provides a kind of succinct test vector set constructing plan, is effectively reduced test complexity, improves and survey The coverage rate of object set is tried, and improves testing reliability and testing efficiency.Therefore, the present invention has high industrial utilization value.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (9)

1. a kind of test macro of scale software characterized by comprising
Vector generation module, for generating test vector using function-driven and the method for random test for measurand;
Monitoring modular, for monitoring the path covering of the test target collection of the measurand according to the generation test vector Rate, and when monitoring that the path coverage of the test target collection reaches critical state, it searches for and obtains the measurand The uncovered path of test target collection;And
Model computation module, for the path founding mathematical models uncovered according to the test target collection, to the mathematics Model solution obtains the test vector in the uncovered path of the test target collection;The monitoring modular includes:
Monitoring unit, for monitoring the path covering of the test target collection of the measurand according to the generation test vector Whether rate reaches critical state;
Acquiring unit is searched for, for stopping adopting when monitoring that the path coverage of the test target collection reaches critical state Generate test vector with function-driven and the method for random test, search for and obtain the test target collection of the measurand not by The path of covering;And
Generation unit, for continuing to use when monitoring that the path coverage of the test target collection is not up to critical state Function-driven and the method for random test generate test vector.
2. the test macro of scale software as described in claim 1, which is characterized in that the monitoring unit is specifically used for basis Whether the generation test vector, the path coverage for monitoring the test target collection of the measurand reach critical state;
It is not less than preset threshold, and follow-up function driving and random test in the path coverage for monitoring the test target collection When not promoting the path coverage of the test target collection, determine that the path coverage of the test target collection reaches critical shape State;
It is covered in the path that the path coverage for detecting the test target collection is less than preset threshold or the test target collection Lid rate is not less than preset threshold, but follow-up function driving and random test still promote the path coverage of the test target collection When, determine that the path coverage of the test target collection is not up to critical state.
3. the test macro of scale software as described in claim 1, which is characterized in that described search acquiring unit is specifically used for When monitoring that the path coverage of the test target collection reaches critical state, stops generating using the method for random test and survey Vector, and the current path coverage information of the test target collection according to test statistics report acquisition are tried, according to the current road Diameter coverage information obtains the uncovered path of the test target collection.
4. the test macro of scale software as described in any one of claims 1 to 3, which is characterized in that the model calculates mould Block specifically includes:
Model foundation unit, for the path founding mathematical models uncovered to the test target collection by logical construction; And
Vector acquiring unit, for being solved to the mathematical model using formalization method, obtain the test target collection not by The test vector in the path of covering.
5. a kind of test method of scale software, which is characterized in that utilize the test system of scale software as described in claim 1 System, the test method of the scale software include:
Test vector is generated using function-driven and the method for random test for measurand;
According to the generation test vector, the path coverage of the test target collection of the measurand is monitored;
When monitoring that the path coverage of the test target collection reaches critical state, searches for and obtain the measurand The uncovered path of test target collection;
According to the uncovered path founding mathematical models of the test target collection, the mathematical model is solved and obtains the survey Try the test vector in the uncovered path of object set.
6. the test method of scale software as claimed in claim 5, which is characterized in that it is described according to the generation test to Amount, monitors the path coverage of the test target collection of the measurand, specifically includes:
According to the generation test vector, whether the path coverage for monitoring the test target collection of the measurand reaches critical State;
Be not less than preset threshold in the path coverage for monitoring the test target collection, and subsequent random test do not promoted it is described When the path coverage of test target collection, determine that the path coverage of the test target collection reaches critical state;
It is covered in the path that the path coverage for detecting the test target collection is less than preset threshold or the test target collection Lid rate is not less than preset threshold, but follow-up function driving and random test still promote the path coverage of the test target collection When, determine that the path coverage of the test target collection is not up to critical state.
7. the test method of scale software as claimed in claim 6, which is characterized in that the test method of the scale software is also Include:
When monitoring that the path coverage of the test target collection is not up to critical state, continue using function-driven and random The method of test generates test vector.
8. the test method of scale software as claimed in claim 5, which is characterized in that described to monitor the test target When the path coverage of collection reaches critical state, the uncovered road of test target collection of the measurand is searched for and obtained Diameter specifically includes:
When monitoring that the path coverage of the test target collection reaches critical state, stop using function-driven and random survey The method of examination generates test vector, and the current path coverage information of the test target collection according to test statistics report acquisition, The uncovered path of the test target collection is obtained according to the current path coverage information.
9. such as the test method of the described in any item scale softwares of claim 5 to 8, which is characterized in that described according to the survey The uncovered path founding mathematical models of object set are tried, the acquisition test target collection is solved to the mathematical model and is not coated The test vector in the path of lid, specifically includes:
Pass through the logical construction path founding mathematical models uncovered to the test target collection;
The mathematical model is solved using formalization method, obtain the test in the uncovered path of the test target collection to Amount.
CN201610947172.9A 2016-10-26 2016-10-26 A kind of test macro and method of scale software Active CN106547695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610947172.9A CN106547695B (en) 2016-10-26 2016-10-26 A kind of test macro and method of scale software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610947172.9A CN106547695B (en) 2016-10-26 2016-10-26 A kind of test macro and method of scale software

Publications (2)

Publication Number Publication Date
CN106547695A CN106547695A (en) 2017-03-29
CN106547695B true CN106547695B (en) 2019-03-05

Family

ID=58392579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610947172.9A Active CN106547695B (en) 2016-10-26 2016-10-26 A kind of test macro and method of scale software

Country Status (1)

Country Link
CN (1) CN106547695B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107132837B (en) * 2017-04-24 2019-07-23 中广核工程有限公司 A kind of test method and system of nuclear plant digital reactor protection system
CN107480051B (en) * 2017-07-20 2020-07-17 深圳中广核工程设计有限公司 Software testing system and method for digital reactor protection system of nuclear power plant
CN110209593B (en) * 2019-06-14 2021-05-28 南京大学 Preference setting-oriented android application testing method
CN111723008A (en) * 2020-05-29 2020-09-29 北京机电工程研究所 Test path generation method based on state transition diagram

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567165A (en) * 2011-12-29 2012-07-11 中国科学院自动化研究所 System and method for verifying register transfer level (RTL) hardware
CN103019933A (en) * 2012-11-27 2013-04-03 网宿科技股份有限公司 Automatic test case coverage identification method and device
CN103885876A (en) * 2012-12-21 2014-06-25 百度在线网络技术(北京)有限公司 Testing method and testing equipment
CN104166744A (en) * 2013-05-16 2014-11-26 郭若杉 Method and system for verifying video algorithm register transfer level implementation
CN105930272A (en) * 2016-04-22 2016-09-07 中国矿业大学 Important statement-based branch coverage testing data generation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030046029A1 (en) * 2001-09-05 2003-03-06 Wiener Jay Stuart Method for merging white box and black box testing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567165A (en) * 2011-12-29 2012-07-11 中国科学院自动化研究所 System and method for verifying register transfer level (RTL) hardware
CN103019933A (en) * 2012-11-27 2013-04-03 网宿科技股份有限公司 Automatic test case coverage identification method and device
CN103885876A (en) * 2012-12-21 2014-06-25 百度在线网络技术(北京)有限公司 Testing method and testing equipment
CN104166744A (en) * 2013-05-16 2014-11-26 郭若杉 Method and system for verifying video algorithm register transfer level implementation
CN105930272A (en) * 2016-04-22 2016-09-07 中国矿业大学 Important statement-based branch coverage testing data generation method

Also Published As

Publication number Publication date
CN106547695A (en) 2017-03-29

Similar Documents

Publication Publication Date Title
CN106547695B (en) A kind of test macro and method of scale software
CN104375842B (en) A kind of adaptable software UML modelings and its formalization verification method
Zhou et al. Review on testing of cyber physical systems: Methods and testbeds
McMinn et al. Empirical evaluation of a nesting testability transformation for evolutionary testing
Nguyen et al. Testing in multi-agent systems
CN106776208B (en) Fault Locating Method when a kind of running software
Aggarwal et al. Test case generation from uml state machine diagram: A survey
Iqbal et al. Combining search-based and adaptive random testing strategies for environment model-based testing of real-time embedded systems
Hua et al. Validation of digital twins: challenges and opportunities
CN105868115A (en) Building method and system for software test model of software intensive system
De Benedictis et al. Digital twins for anomaly detection in the industrial internet of things: Conceptual architecture and proof-of-concept
Xiao et al. Adaptive testing based on moment estimation
Alenazi et al. Using obstacle analysis to support SysML-based model testing for cyber physical systems
Cioroaica et al. Towards creation of automated prediction systems for trust and dependability evaluation
Saeed et al. Cost and effectiveness of search-based techniques for model-based testing: an empirical analysis
Stürmer et al. Model quality assessment in practice: How to measure and assess the quality of software models during the embedded software development process
Karmore et al. New approach for testing and providing security mechanism for embedded systems
Ouyang et al. Modeling of PWR plant by multilevel flow model and its application in fault diagnosis
Qi et al. Stpa for learning-enabled systems: a survey and a new practice
Ferrell et al. Modeling and performance considerations for automated fault isolation in complex systems
Hachicha et al. Design and timed verification of self-adaptive systems
Lal et al. Intelligent Testing in Software Industry
Larsson Automatic Test Generation and Mutation Analysis using UPPAAL SMC
Mende et al. On the utility of a defect prediction model during hw/sw integration testing: A retrospective case study
Chen et al. Simulated or physical? An empirical study on input validation for context-aware systems in different environments

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
GR01 Patent grant
GR01 Patent grant