📄 049-050.html
字号:
<HTML>
<HEAD>
<META name=vsisbn content="0849398010">
<META name=vstitle content="Industrial Applications of Genetic Algorithms">
<META name=vsauthor content="Charles Karr; L. Michael Freeman">
<META name=vsimprint content="CRC Press">
<META name=vspublisher content="CRC Press LLC">
<META name=vspubdate content="12/01/98">
<META name=vscategory content="Web and Software Development: Artificial Intelligence: Other">
<TITLE>Industrial Applications of Genetic Algorithms:Software Test Data Generation from a Genetic Algorithm</TITLE>
<!-- HEADER -->
<STYLE type="text/css">
<!--
A:hover {
color : Red;
}
-->
</STYLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<!--ISBN=0849398010//-->
<!--TITLE=Industrial Applications of Genetic Algorithms//-->
<!--AUTHOR=Charles Karr//-->
<!--AUTHOR=L. Michael Freeman//-->
<!--PUBLISHER=CRC Press LLC//-->
<!--IMPRINT=CRC Press//-->
<!--CHAPTER=4//-->
<!--PAGES=049-050//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch03/044-048.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="050-052.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 4<BR>Software Test Data Generation from a Genetic Algorithm
</FONT></H2>
<P><I>Ken Borgelt</I></P>
<P>Corporate Software Center, US<BR>Motorola Inc.<BR>1301 E. Algonquin Road<BR>Schaumburg, IL 60196<BR>e-mail: ckb009@email.mot.com</P>
<P><FONT SIZE="+1"><B>ABSTRACT</B></FONT></P>
<P>The work presented in this chapter investigates how a genetic algorithm may be used to produce software unit test data for use in structural testing. A unit test attempts to execute each line of source code in a software module at least once. It is typically performed using a source level debugger after a software module is written or modified. The particular path taken through the module (and there may be many) is determined by the value of any input data as well as data returned from function calls or other sources. Prior art focuses on configuring a genetic algorithm to identify test data executing a specific path, block of code, or control statement. The approach considered here differs in that its goal is to optimize a population of test data which as a whole provides the desired module coverage. This chapter documents how varying population sizes and a new fitness function influence the formation of a suitable set of test data for a simple software program. The fitness function described here provides improvement over the prior art. The performance gains observed result from making the genetic algorithm aware of the structure of the software module being tested. This work is the first step toward the creation of a software development utility to automatically produce unit test data.
</P>
<P><FONT SIZE="+1"><B>INTRODUCTION</B></FONT></P>
<P>Computer software will continue to increase in size and capability as long as customers press for new features and manufacturers keep designing larger storage devices. This is colloquially known as Parkinson’s Law of Data. Software is also being used more often in mission critical applications and embedded products where error free operation is paramount. At the same time, companies like Motorola are pressing developers to take significant steps to reduce a product’s time-to-market.
</P>
<P>Motorola’s Land Mobile Products Sector produces two-way radio based communications systems for municipalities, governments, and utilities. Some land mobile systems, such as those providing state wide coverage for Michigan and Florida, are quite large and complex. Systems are comprised of numerous specialized pieces of equipment. Each of these is an embedded system with at least one microprocessor running software designed to perform some specialized task in the system, such as system control, resource assignment, audio routing, or radio transmit and receive processing. The Repeater Software group produces software for one of these system boxes, an embedded multiprocessor base station. The software used in this product has been developed incrementally over the past seven years by a large number of engineers.</P>
<P>Software that has been maintained over time is commonly called“legacy”code. Adding new features to legacy code is usually the most cost effective way to add new functionality to an older product. This practice is not always painless because it is impossible to anticipate design decisions for features scheduled for development in the distant future. Poor choices early in the development cycle can be difficult to rectify because tight development schedules and overlapping development phases can limit redesign efforts. The result is a poorly designed feature marked by overly complex and error prone software modules. Unit test plans for such modules tend not to be maintained because of their high complexity. Also, developers sometimes do not execute test plans for such modules even when they are available. Instead, developers will test only the functionality they have changed, increasing the risk of not catching a serious problem in the software.</P>
<P>The worst scenario is when a developer modifies a module that is complex enough to impair understanding. The addition of some feature to such a module must be performed so that the existing features continue to work. If the developer breaks one of the older legacy features and does not perform a full unit test, he or she may not find the flaw until system test or later. The worst situation is a bug in software released to customers.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch03/044-048.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="050-052.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<hr width="90%" size="1" noshade>
<div align="center">
<font face="Verdana,sans-serif" size="1">Copyright © <a href="/reference/crc00001.html">CRC Press LLC</a></font>
</div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->
</BODY>
</HTML>
<!-- END FOOTER -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -