Graph-based seed object synthesis for search-based unit testing

Search-based software testing (SBST) generates tests using search algorithms guided by measurements gauging how far a test case is away from exercising a coverage goal. The effectiveness of SBST largely depends on the continuity and monotonicity of the fitness landscape decided by these measurements...

Full description

Saved in:
Bibliographic Details
Main Authors: LIN, Yun, ONG, You Seng, SUN, Jun, FRASER, Gordon, DONG, Jin Song
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2021
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/6212
https://ink.library.smu.edu.sg/context/sis_research/article/7215/viewcontent/fse21.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-7215
record_format dspace
spelling sg-smu-ink.sis_research-72152021-10-14T06:03:06Z Graph-based seed object synthesis for search-based unit testing LIN, Yun ONG, You Seng SUN, Jun FRASER, Gordon DONG, Jin Song Search-based software testing (SBST) generates tests using search algorithms guided by measurements gauging how far a test case is away from exercising a coverage goal. The effectiveness of SBST largely depends on the continuity and monotonicity of the fitness landscape decided by these measurements and the search operators. Unfortunately, the fitness landscape is challenging when the function under test takes object inputs, as classical measurements hardly provide guidance for constructing legitimate object inputs. To overcome this problem, we propose test seeds, i.e., test code skeletons of legitimate objects which enable the use of classical measurements. Given a target branch in a function under test, we first statically analyze the function to build an object construction graph that captures the relation between the operands of the target method and the states of their relevant object inputs. Based on the graph, we synthesize test template code where each “slot” is a mutation point for the search algorithm. This approach can be seamlessly integrated with existing SBST algorithms, and we implemented EvoObj on top of the well-known EvoSuite unit test generation tool. Our experiments show that EvoObj outperforms EvoSuite with statistical significance on 2,750 methods taken from 103 open source Java projects using state-of-the-art SBST algorithms. 2021-08-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/6212 info:doi/10.1145/3468264.3468619 https://ink.library.smu.edu.sg/context/sis_research/article/7215/viewcontent/fse21.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University object oriented software testing search-based code synthesis Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic object oriented
software testing
search-based
code synthesis
Software Engineering
spellingShingle object oriented
software testing
search-based
code synthesis
Software Engineering
LIN, Yun
ONG, You Seng
SUN, Jun
FRASER, Gordon
DONG, Jin Song
Graph-based seed object synthesis for search-based unit testing
description Search-based software testing (SBST) generates tests using search algorithms guided by measurements gauging how far a test case is away from exercising a coverage goal. The effectiveness of SBST largely depends on the continuity and monotonicity of the fitness landscape decided by these measurements and the search operators. Unfortunately, the fitness landscape is challenging when the function under test takes object inputs, as classical measurements hardly provide guidance for constructing legitimate object inputs. To overcome this problem, we propose test seeds, i.e., test code skeletons of legitimate objects which enable the use of classical measurements. Given a target branch in a function under test, we first statically analyze the function to build an object construction graph that captures the relation between the operands of the target method and the states of their relevant object inputs. Based on the graph, we synthesize test template code where each “slot” is a mutation point for the search algorithm. This approach can be seamlessly integrated with existing SBST algorithms, and we implemented EvoObj on top of the well-known EvoSuite unit test generation tool. Our experiments show that EvoObj outperforms EvoSuite with statistical significance on 2,750 methods taken from 103 open source Java projects using state-of-the-art SBST algorithms.
format text
author LIN, Yun
ONG, You Seng
SUN, Jun
FRASER, Gordon
DONG, Jin Song
author_facet LIN, Yun
ONG, You Seng
SUN, Jun
FRASER, Gordon
DONG, Jin Song
author_sort LIN, Yun
title Graph-based seed object synthesis for search-based unit testing
title_short Graph-based seed object synthesis for search-based unit testing
title_full Graph-based seed object synthesis for search-based unit testing
title_fullStr Graph-based seed object synthesis for search-based unit testing
title_full_unstemmed Graph-based seed object synthesis for search-based unit testing
title_sort graph-based seed object synthesis for search-based unit testing
publisher Institutional Knowledge at Singapore Management University
publishDate 2021
url https://ink.library.smu.edu.sg/sis_research/6212
https://ink.library.smu.edu.sg/context/sis_research/article/7215/viewcontent/fse21.pdf
_version_ 1770575892349714432