CN110084369A - Mutation testing variant reduction method based on multiple-objection optimization - Google Patents

Mutation testing variant reduction method based on multiple-objection optimization Download PDF

Info

Publication number
CN110084369A
CN110084369A CN201910277472.4A CN201910277472A CN110084369A CN 110084369 A CN110084369 A CN 110084369A CN 201910277472 A CN201910277472 A CN 201910277472A CN 110084369 A CN110084369 A CN 110084369A
Authority
CN
China
Prior art keywords
variant
reduction
time
disaggregation
source program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910277472.4A
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.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
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 Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN201910277472.4A priority Critical patent/CN110084369A/en
Publication of CN110084369A publication Critical patent/CN110084369A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Genetics & Genomics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Physiology (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of mutation testing variant reduction method based on multiple-objection optimization, the technical issues of for solving existing variation body reduction method low efficiency.Technical solution is first to a large amount of variants of existing Program Generating, then the multi-objective optimization algorithm target that reduction is carried out to variant is formulated, including the time that variant is detected difference between rate, variant and source program, mutation testing is spent, about degeneracy is carried out to variant by different multi-objective optimization algorithms to record result one by one and compare, final choice shows optimal multi-objective optimization algorithm, it realizes the variant reduction based on multiple-objection optimization, improves the efficiency of variant reduction.

Description

Mutation testing variant reduction method based on multiple-objection optimization
Technical field
The present invention relates to a kind of variant reduction method, in particular to a kind of mutation testing variation based on multiple-objection optimization Body reduction method.
Background technique
" Zeng Fanping, Huang Yuhan, Zhang Meichao wait to answer based on variant reduction [J] computer that genetic algorithm clusters to document A kind of variant reduction method based on genetic algorithm cluster is disclosed with 2011,31 (5): 1314-1317. ".This method mentions The variant reduction method based on genetic algorithm cluster is gone out, the variant with similar features has been placed in same cluster, then benefit Genetic algorithm is used to randomly choose one from each cluster as representing, to realize the reduction to genetic algorithm variant.This article It offers and only uses the reduction that same genetic algorithm carries out variant, there is no genetic algorithm is compared, do not prove to be made The rationality that is involutory of genetic algorithm.
Summary of the invention
In order to overcome the shortcomings of existing variation body reduction method low efficiency, the present invention provides a kind of based on multiple-objection optimization Mutation testing variant reduction method.This method to a large amount of variants of existing Program Generating, is then formulated to variant first The multi-objective optimization algorithm target for carrying out reduction is detected difference between rate, variant and source program, variation including variant The time spent is tested, about degeneracy is carried out to variant by different multi-objective optimization algorithms and records result one by one and carries out pair Than final choice shows optimal multi-objective optimization algorithm, realizes the variant reduction based on multiple-objection optimization, improves variation The efficiency of body reduction.
A kind of the technical solution adopted by the present invention to solve the technical problems: mutation testing variation based on multiple-objection optimization Body reduction method, its main feature is that the following steps are included:
Step 1: being done for the procedure set of four open sources from software workpiece infrastructure library using what is generated at random Method generates a large amount of variants.
First determine whether this variant had been generated when random generation variant, being generated then terminates Process;Otherwise by insertion absolute value, replacement arithmetic operator, replacement logical operator, fallback relationship operator and insertion The operation of n ary operation symbol, carries out the generation of variant, then removes variant of equal value, finally exports remaining variant and fortune The time of calculation.
Step 2: being screened using existing six kinds of multi-objective optimization algorithms to variant.
6 kinds of widely used multi-objective optimization algorithms are selected as the object compared, be respectively NSGA-II, IBEA, MOEA/D-WS, MOEA/D-TCH, MOEA/D-PBI and SPEA2+SDE.Three kinds of optimised mesh as evaluation index are formulated simultaneously Mark is the difference of time, variant and source program needed for the tested extracting rate of variant, test respectively.Better variant collection Conjunction should be smaller with source program difference, spends the time less, while being not easy to be detected by existing test use cases relatively, therefore Wish all to minimize these three targets, calculation formula is as follows:
Wherein, D is the difference being mutated between program and source program, LmIt is the line number for being mutated program change, L is in source program Line number.
Wherein, CostpIt is by standardized time-consuming, t is the time for running the disaggregation, tminIt is all disaggregation of operation Minimum time, tmaxIt is the maximum time for running all disaggregation, since other two targets are indicated with percentage, Standardization to spending the time to carry out percentage.
Wherein, RdThe tested extracting rate of variant, Pd' it is the variant number being detected, P ' is the variant sum generated.
Step 3: evaluating the variant set obtained after reduction, selects and be appropriate for the more of variant reduction Objective optimization algorithm.
It is gone forward side by side by given index with this six kinds of algorithms to be screened to the variant of generation and obtain final result Row evaluation, evaluation index carry out in terms of two, including integrally carrying out evaluation to disaggregation and concentrating to the solution of all generations best One evaluated.The method for evaluating whole disaggregation is HV value, i.e., solution concentrates individual and reference point to be enclosed in object space At obtaining the volume of hypercube.Evaluation to best disaggregation is being ensured by tested extracting rate, variant and the source of variant The difference control of program is selected in the smallest situation, tests required time the smallest optimum mutation body set, and is divided Analysis is compared.Finally select the multi-objective optimization algorithm for being appropriate for variant reduction.
The beneficial effects of the present invention are: then this method is formulated first to a large amount of variants of existing Program Generating to change Allosome carries out the multi-objective optimization algorithm target of reduction, including variant be detected difference between rate, variant and source program, The time that mutation testing is spent carries out about degeneracy to variant by different multi-objective optimization algorithms and records result one by one to go forward side by side Row comparison, final choice show optimal multi-objective optimization algorithm, realize the variant reduction based on multiple-objection optimization, improve The efficiency of variant reduction.
The present invention is based on experimental datas, and existing genetic algorithm is compared, and have selected most suitable under prescribed conditions The genetic algorithm for carrying out variant reduction is closed, and demonstrates the feasibility that the genetic algorithm carries out reduction.In an experiment, raw first It the use of six kinds of different multi-objective optimization algorithms by this 500 variant reduction is 200 at 500 different variants, Different variants has been obtained to combine.Compared in total six kinds of multi-objective optimization algorithms (NSGA-II, IBEA, MOEA/D-WS, MOEA/D-TCH, MOEA/D-PBI, SPEA2+SDE), the variant set that algorithm is generated from several different angles respectively into Go comparison:
1) for all variant set after algorithm reduction, disaggregation is judged using HV: multiple-objection optimization field In, using HV to carry out judgement as index is a very common mode, it is used to indicate that solution concentrates individual and reference point to exist It surrounds to obtain the volume of hypercube in object space.The value of HV is higher, then it is assumed that this disaggregation have better convergence, Scalability and consistency, that is, be better disaggregation.Comparison result is referring to table 1.It referring to table 2 is come to each procedure set Say optimal and suboptimum algorithm.
The standardization HV value of table 1
The optimal algorithm of 2 distinct program of table is evaluated
2) it selects the solution concentration generated from each to select one group of best variant set to compare, when variant quilt When the difference (%) of verification and measurement ratio (%) and variant and source program is all controlled to minimum, cost is compared, is found best Variant collection.It is the result of experiment referring to table 3- table 6.
3 tcas programmed test result of table
4 schedule programmed test result of table
5 tot-info programmed test result of table
6 gzip programmed test result of table
It is final to assert, under given optimal conditions, selects and be appropriate for the multi-objective optimization algorithm of variant reduction and be MOEA/D-WS。
It elaborates with reference to the accompanying drawings and detailed description to the present invention.
Detailed description of the invention
Fig. 1 is the flow chart of the mutation testing variant reduction method the present invention is based on multiple-objection optimization.
Fig. 2 is the flow chart that variant is generated in Fig. 1.
Specific embodiment
Referring to Fig.1-2.The present invention is based on the mutation testing variant reduction method of multiple-objection optimization, specific step is as follows:
Step 1: being done for the procedure set of four open sources from software workpiece infrastructure library using what is generated at random Method generates a large amount of variants.
First determine whether this variant had been generated when random generation variant, being generated then terminates Process;Otherwise pass through operation (insertion absolute value, replacement arithmetic operator, the replacement logical operator, replacement to five kinds of operators Relational operator, insertion n ary operation symbol) Lai Jinhang variant generation, then remove variant of equal value, finally output is remaining Variant and operation time.
Step 2: being screened using existing six kinds of multi-objective optimization algorithms to variant.
6 kinds of widely used multi-objective optimization algorithms are selected as the object compared, be respectively NSGA-II, IBEA, MOEA/D-WS, MOEA/D-TCH, MOEA/D-PBI and SPEA2+SDE.We have formulated three kinds of quilts as evaluation index simultaneously Optimization aim is the difference of time, variant and source program needed for the tested extracting rate of variant, test respectively.After study Think, better variant set should be smaller with source program difference, spends the time less, while being not easy relatively by existing survey Examination set of uses case detects that, therefore, it is desirable to all minimize to these three targets, calculation formula is as follows:
Wherein D is the difference being mutated between program and source program, LmIt is the line number for being mutated program change, L is in source program Line number.
Wherein CostpIt is by standardized time-consuming, t is the time for running the disaggregation, tminIt is to run all disaggregation most Small time, tmaxIt is the maximum time for running all disaggregation, it is right since other two targets are indicated with percentage The time is spent to carry out the standardization of percentage.
Wherein RdThe tested extracting rate of variant, P 'dIt is the variant number being detected, P ' is the variant sum generated.
Step 3: evaluating the variant set obtained after reduction, selects and be appropriate for the more of variant reduction Objective optimization algorithm.
It is gone forward side by side by given index with this six kinds of algorithms to be screened to the variant of generation and obtain final result Row evaluation, evaluation index carry out in terms of two, including integrally carrying out evaluation to disaggregation and concentrating to the solution of all generations best One evaluated.The method for evaluating whole disaggregation is HV value, i.e., solution concentrates individual and reference point to be enclosed in object space At obtaining the volume of hypercube.Evaluation to best disaggregation is being ensured by tested extracting rate, variant and the source of variant The difference control of program is selected in the smallest situation, tests required time the smallest optimum mutation body set, and is divided Analysis is compared.Finally select the multi-objective optimization algorithm for being appropriate for variant reduction.

Claims (1)

1. a kind of mutation testing variant reduction method based on multiple-objection optimization, it is characterised in that the following steps are included:
Step 1: for the procedure set of four open sources from software workpiece infrastructure library, it is raw using the method generated at random At a large amount of variants;
First determine whether this variant had been generated when random generation variant, being generated then terminates to flow Journey;Otherwise by insertion absolute value, replacement arithmetic operator, replacement logical operator, fallback relationship operator and insertion member The operation of operator, carries out the generation of variant, then removes variant of equal value, finally exports remaining variant and operation Time;
Step 2: being screened using existing six kinds of multi-objective optimization algorithms to variant;
It selects 6 kinds of widely used multi-objective optimization algorithms as the object compared, is NSGA-II, IBEA, MOEA/D- respectively WS, MOEA/D-TCH, MOEA/D-PBI and SPEA2+SDE;Three kinds of optimised targets as evaluation index are formulated simultaneously, respectively It is the difference of time, variant and source program needed for the tested extracting rate of variant, test;Better variant set should be with Source program difference is smaller, spends the time less, while being not easy to detect that therefore, it is desirable to this by existing test use cases relatively Three targets are all minimized, and calculation formula is as follows:
Wherein, D is the difference being mutated between program and source program, LmIt is the line number for being mutated program change, L is the row in source program Number;
Wherein, CostpIt is by standardized time-consuming, t is the time for running the disaggregation, tminIt is when running the minimum of all disaggregation Between, tmaxIt is the maximum time for running all disaggregation, since other two targets are indicated with percentage, to cost The standardization of time progress percentage;
Wherein, RdThe tested extracting rate of variant, P 'dIt is the variant number being detected, P ' is the variant sum generated;
Step 3: evaluating the variant set obtained after reduction, the multiple target for being appropriate for variant reduction is selected Optimization algorithm;
Final result is screened and obtained to the variant of generation with this six kinds of algorithms by given index and is commented Valence, evaluation index carry out in terms of two, including integrally carrying out evaluation to disaggregation and concentrating best one to the solution of all generations It is a to be evaluated;The method for evaluating whole disaggregation is HV value, i.e., solution concentrates individual and reference point to surround in object space To the volume of hypercube;Evaluation to best disaggregation is being ensured by tested extracting rate, variant and the source program of variant Difference control select, test in the smallest situation needed for time the smallest optimum mutation body set, and carry out analysis ratio Compared with;Finally select the multi-objective optimization algorithm for being appropriate for variant reduction.
CN201910277472.4A 2019-04-08 2019-04-08 Mutation testing variant reduction method based on multiple-objection optimization Pending CN110084369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910277472.4A CN110084369A (en) 2019-04-08 2019-04-08 Mutation testing variant reduction method based on multiple-objection optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910277472.4A CN110084369A (en) 2019-04-08 2019-04-08 Mutation testing variant reduction method based on multiple-objection optimization

Publications (1)

Publication Number Publication Date
CN110084369A true CN110084369A (en) 2019-08-02

Family

ID=67414458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910277472.4A Pending CN110084369A (en) 2019-04-08 2019-04-08 Mutation testing variant reduction method based on multiple-objection optimization

Country Status (1)

Country Link
CN (1) CN110084369A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816982A (en) * 2022-03-02 2022-07-29 南京航空航天大学 SPEA 2-based RESTful API test suite minimization method in unmanned aerial vehicle PX4

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281522A (en) * 2014-10-14 2015-01-14 中国矿业大学 Statement coverage and defect detection based multi-objective test data reduction method
CN104750610A (en) * 2015-03-24 2015-07-01 中国矿业大学 Dominating degree based aberrance reduction method for message passing parallel program
CN104765683A (en) * 2015-03-30 2015-07-08 西北工业大学 MOEA/D algorithm based multi-target optimizing method for regression test case
CN105868116A (en) * 2016-04-15 2016-08-17 西北工业大学 Semantic mutation operator based test case generation and optimization method
CN106991051A (en) * 2017-04-05 2017-07-28 西安邮电大学 A kind of test case reduction method based on mutation testing and correlation rule
CN108090566A (en) * 2017-12-13 2018-05-29 电子科技大学 Multiple target test preferred method based on connection in series-parallel genetic algorithm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281522A (en) * 2014-10-14 2015-01-14 中国矿业大学 Statement coverage and defect detection based multi-objective test data reduction method
CN104750610A (en) * 2015-03-24 2015-07-01 中国矿业大学 Dominating degree based aberrance reduction method for message passing parallel program
CN104765683A (en) * 2015-03-30 2015-07-08 西北工业大学 MOEA/D algorithm based multi-target optimizing method for regression test case
CN105868116A (en) * 2016-04-15 2016-08-17 西北工业大学 Semantic mutation operator based test case generation and optimization method
CN106991051A (en) * 2017-04-05 2017-07-28 西安邮电大学 A kind of test case reduction method based on mutation testing and correlation rule
CN108090566A (en) * 2017-12-13 2018-05-29 电子科技大学 Multiple target test preferred method based on connection in series-parallel genetic algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑炜等: "《基于变异分析和覆盖准则的回归测试用例集缩减》", 《西北工业大学学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816982A (en) * 2022-03-02 2022-07-29 南京航空航天大学 SPEA 2-based RESTful API test suite minimization method in unmanned aerial vehicle PX4

Similar Documents

Publication Publication Date Title
Liang et al. Hybrid of memory and prediction strategies for dynamic multiobjective optimization
Thengade et al. Genetic algorithm–survey paper
Neri et al. Memetic algorithms and memetic computing optimization: A literature review
Feng et al. A multivariation multifactorial evolutionary algorithm for large-scale multiobjective optimization
Chen et al. Rademacher complexity for enhancing the generalization of genetic programming for symbolic regression
Ma et al. Handling multiple objectives with biogeography-based optimization
Duczmal et al. Delineation of irregularly shaped disease clusters through multiobjective optimization
Kaytoue et al. Two fca-based methods for mining gene expression data
KR20220154155A (en) Molecular techniques for predicting phenotypic traits of bacteria from their genomes
CN106940718A (en) A kind of method, device and server for obtaining migratory bird moving path description
Tansey et al. Black box FDR
CN110084369A (en) Mutation testing variant reduction method based on multiple-objection optimization
Bagwell Breaking the dimensionality barrier
Turley et al. Definition and calculation of uncertainty in ecological process models
Al‐Anni et al. Prediction of NSCLC recurrence from microarray data with GEP
CN113192556B (en) Genotype and phenotype association analysis method in multigroup chemical data based on small sample
Camilleri et al. Parameter optimization in decision tree learning by using simple genetic algorithms
Rahmadi Finding stable causal structures from clinical data
Sjöbergh et al. Visualizing clinical trial data using pluggable components
Zhang et al. Mechanical product ecological design knowledge reduction based on rough set
Zaglauer et al. Evolutionary algorithms for the automatic calibration of simulation models for the virtual engine application
Walker Visualisation with treemaps and sunbursts in many-objective optimisation
Chakuma et al. Visualizing the optimization process for multi-objective optimization problems
Olusoji et al. cyanoFilter: An r package to identify phytoplankton populations from flow cytometry data using cell pigmentation and granularity
US11113853B2 (en) Systems and methods for blending and aggregating multiple related datasets and rapidly generating a user-directed series of interactive 3D visualizations

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

Application publication date: 20190802

WD01 Invention patent application deemed withdrawn after publication