⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lib0117.html

📁 j2ee架构师手册
💻 HTML
字号:
<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Chapter 18: Functional Testing Guidelines</title>
<link rel="STYLESHEET" type="text/css" href="images/xpolecat.css">
<link rel="STYLESHEET" type="text/css" href="images/ie.content.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/teamlib.gif" width="62" height="15" border="0" align="absmiddle"  alt="Team LiB"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href="LiB0116.html"><img src="images/previous.gif" width="62" height="15" border="0" align="absmiddle" alt="Previous Section"></a>
<a href="LiB0118.html"><img src="images/next.gif" width="41" height="15" border="0" align="absmiddle" alt="Next Section"></a>
</div></td></tr></table>
<br>
<div class="chapter">
<a name="ch18"></a>
<h1 class="chapter-title"><span class="chapter-titlelabel">Chapter 18: </span>Functional Testing Guidelines</h1><div class="section">
<h2 class="sect2-title">
<a name="580"></a>Overview</h2>
<a name="581"></a><a name="IDX-243"></a>
<div class="highlights">
<p class="first-para">Throughout the book, I've recommended that you create test cases for all data access objects and business logic objects because these layers contain most of the application's complexity. I've also mentioned that these tests are used for unit testing as well as part of a regression test suite. In this chapter, I show you how to use open source testing components, based on JUnit, to accomplish this.</p>
<p class="para">JUnit is an open source framework that facilitates the writing and running of test cases and grouping them into test suites. You can download JUnit from the project home page at <a target="_top" class="url" href="http://www.junit.org/index.htm">http://www.junit.org/index.htm</a>.</p>
<p class="para">I use open source testing components because they're popular and easy for anyone to access. Those of you using commercial testing packages can look at the examples in this chapter as conceptual. All commercial testing tools I'm aware of will support the testing concepts illustrated in this chapter. Performance and load testing concepts are covered in <a href="LiB0122.html#596" target="_parent" class="chapterjump">chapter 19</a>.</p>
<p class="para">Ideally, I'd recommend highly automated ways to test the presentation layer. Currently, the most popular product to do this appears to be Apache's Cactus. However, this product has limited testing capabilities. For instance, although it can test if session attributes are set properly, it can't tell if the aesthetics of the resulting page are working. Consequently, you have to do manual testing before release anyway, which significantly reduces the benefits of setting up a regression test for the presentation layer.</p>
<p class="last-para">
<a name="582"></a><a name="IDX-244"></a>Additionally, the setup work for Cactus is verbose and tedious. Between the two drawbacks I've mentioned, the cost of setting a regression test up with Cactus usually outweighs the benefits. I'm sure that this will change given time. You can download Cactus from the project home page at <a target="_top" class="url" href="http://jakarta.apache.org/cactus/">http://jakarta.apache.org/cactus/</a>.</p>
</div>
</div>
</div><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/teamlib.gif" width="62" height="15" border="0" align="absmiddle"  alt="Team LiB"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href="LiB0116.html"><img src="images/previous.gif" width="62" height="15" border="0" align="absmiddle" alt="Previous Section"></a>
<a href="LiB0118.html"><img src="images/next.gif" width="41" height="15" border="0" align="absmiddle" alt="Next Section"></a>
</div></td></tr></table>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -