blob: f1f8c6bd2265592520e1fe26c01dc9959c3434e7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../skin/tigris.css" type="text/css">
<link rel="stylesheet" href="../skin/mysite.css" type="text/css">
<link rel="stylesheet" href="../skin/site.css" type="text/css">
<link media="print" rel="stylesheet" href="../skin/print.css" type="text/css">
<title>Axis Test Rearchitecture</title>
</head>
<body bgcolor="white" class="composite">
<div id="banner">
<table width="100%" cellpadding="8" cellspacing="0" summary="banner" border="0">
<tbody>
<tr>
<td align="left">
<div class="groupLogo">
<a href="http://ws.apache.org/"><img border="0" class="logoImage" alt="The Apache WebServices Project" src="../images/project-logo.jpg"></a>
</div>
</td><td align="right">
<div class="projectLogo">
<a href="http://ws.apache.org/axis/"><img border="0" class="logoImage" alt="The Apache Axis Project" src="../images/axis.jpg"></a>
</div>
</td><td valign="top" rowspan="2" align="right" class="search">
<form target="_blank" action="http://www.google.co.jp/search" method="get">
<table summary="search" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#a5b6c6" colspan="3"><img height="10" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td colspan="3"><img height="8" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="ws.apache.org" name="sitesearch" type="hidden"><input value="ja" name="hl" type="hidden"><input value="UTF-8" name="ie" type="hidden"><input size="10" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="検索" type="submit">
<br>WS を検索
</td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td colspan="3"><img height="7" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td class="bottom-left-thick"></td><td bgcolor="#a5b6c6"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td class="bottom-right-thick"></td>
</tr>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" summary="nav" id="breadcrumbs">
<tbody>
<tr class="status">
<td><a href="http://www.apache.org/">Apache</a> | <a href="http://ws.apache.org/">WS</a><a href=""></a></td><td id="tabs">
<div class="tab">
<span class="selectedTab"><a class="base-selected" href="../index.html">WebServices-Axis</a></span>
</div>
</td>
</tr>
</tbody>
</table>
<table id="main" width="100%" cellpadding="8" cellspacing="0" summary="" border="0">
<tbody>
<tr valign="top">
<td id="leftcol">
<div id="navcolumn">
<div class="menuBar">
<div class="menu">
<span class="menuLabel">Axis</span>
<div class="menuItem">
<a href="../index.html">はじめに</a>
</div>
<div class="menuItem">
<a href="../news.html">お知らせ</a>
</div>
<div class="menuItem">
<a href="http://wiki.apache.org/ws/ja/axis">FAQ/Wiki</a>
</div>
<div class="menu">
<span class="menuLabel">活動に参加</span>
<div class="menuItem">
<a href="../overview.html">概要</a>
</div>
<div class="menuItem">
<a href="../cvs.html">CVS リポジトリ</a>
</div>
<div class="menuItem">
<a href="../mail.html">メーリングリスト</a>
</div>
<div class="menuItem">
<a href="../ref.html">リファレンスライブラリ</a>
</div>
<div class="menuItem">
<a href="../bugs.html">バグ</a>
</div>
<div class="menuItem">
<a href="../howtobuild.html">サイト構築方法</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Axis (Java)</span>
<div class="menuItem">
<a href="../java/index.html">ドキュメント</a>
</div>
<div class="menuItem">
<a href="../java/install.html">インストール</a>
</div>
<div class="menuItem">
<a href="../java/user-guide.html">ユーザガイド</a>
</div>
<div class="menuItem">
<a href="../java/developers-guide.html">開発者ガイド</a>
</div>
<div class="menuItem">
<a href="../java/integration-guide.html">統合ガイド</a>
</div>
<div class="menuItem">
<a href="../java/architecture-guide.html">アーキテクチャガイド</a>
</div>
<div class="menuItem">
<a href="../java/reference.html">リファレンスガイド</a>
</div>
<div class="menuItem">
<a href="../java/reading.html">読書ガイド</a>
</div>
<div class="menuItem">
<a href="../java/requirements.html">要件</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Axis (C++)</span>
<div class="menuItem">
<a href="../cpp/index.html">Axis C++ 最新版</a>
</div>
<div class="menuItem">
<a href="../cpp/documentation.html">ドキュメント</a>
</div>
<div class="menuItem">
<a href="../cpp/download.html">ダウンロード</a>
</div>
<div class="menuItem">
<a href="http://wiki.apache.org/ws/FrontPage/AxisCPP">Wiki ページ [英語]</a>
</div>
<div class="menuItem">
<a href="../cpp/who.html">メンバ紹介</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">ダウンロード</span>
<div class="menuItem">
<a href="../releases.html">リリース</a>
</div>
<div class="menuItem">
<a href="../interim.html">暫定版</a>
</div>
<div class="menuItem">
<a href="http://cvs.apache.org/viewcvs/ws-axis/">ソースコード [英語]</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">翻訳</span>
<div class="menuItem">
<a href="http://ws.apache.org/axis/jp/">日本語</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">関連プロジェクト</span>
<div class="menuItem">
<a href="http://ws.apache.org/wsif/">WSIF [英語]</a>
</div>
<div class="menuItem">
<a href="http://cvs.apache.org/viewcvs/*checkout*/ws-wsil/java/README.htm">WSIL [英語]</a>
</div>
<div class="menuItem">
<a href="http://www-124.ibm.com/developerworks/projects/wsdl4j/">WSDL4J [英語]</a>
</div>
<div class="menuItem">
<a href="http://www.uddi4j.org/">UDDI4J [英語]</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">その他</span>
<div class="menuItem">
<a href="../who.html">メンバ紹介</a>
</div>
<div class="menuItem">
<a href="../contact.html">連絡先</a>
</div>
<div class="menuItem">
<a href="../legal.html">法関連</a>
</div>
<div class="menuItem">
<a href="../docs.html">メモ/ドキュメント</a>
</div>
</div>
</div>
</div>
</div>
</td><td>
<div id="bodycol">
<div class="app">
<div align="center">
<h1>Axis Test Rearchitecture</h1>
</div>
<div class="h3">
<div class="h3">
<h3></h3>
</div>
<p>
<h1>Axis Test Rearchitecture</h1>
</p>
<p>
<a name="top"></a> <a href="#quickstart">Quick Start</a>
<br>
<a href="#common">Common Design Principles</a>
<br>
<a href="#general">General Changes</a>
<br>
<a href="#samples">Samples Changes</a>
<br>
<a href="#tests">Test Changes</a>
</p>
<hr>
<h2>
<a name="quickstart"></a>Quick Start</h2>
<p>To run the full build system, as the old was run, do the following:</p>
<pre>ant clean functional-tests
</pre>
<p>To see how the componentized build structure is affected, as well as cross-dependancies, do the following:</p>
<pre>ant clean compile
cd test/encoding
ant clean compile run
</pre>
<p>(The encoding test has a dependancy on the echo sample)<br>
<br>
<a href="#top">Back to the Top</a>
</p>
<hr>
<h2>
<a name="common"></a>Common Design Principles</h2>
<p>There were 6 design goals that were laid out for me before undertaking this project:</p>
<ol>
<li>Determine the needs and dependancies of each test and sample</li>
<li>Reduce the complexity of the xml that compiles, deploys, execs, and undeploys samples and tests</li>
<li>Enable a new test or sample to be "plugged in" to the suites, without disturbing currently working things</li>
<li>Enable the ability to instantiate any single sample or any single test</li>
<li>Identify tests and samples that need "network" or "internet" resources</li>
<li>Enable the ability to group tests and samples together in "bundles"</li>
</ol>
<br>
<p>To this end, the general theory was applied to everything:</p>
<ul>
<li>Remove the neccessary steps that are in build.xml into build<em>thing</em>.xml (where <em>thing</em> is either "Samples" or "Test")</li>
<li>Create a build.xml file in each samples/** and test/** directory</li>
<li>Stub each build.xml with the following: <pre>&lt;?xml version="1.0" ?&gt;
&lt;!-- =========================================================================================== --&gt;
&lt;!-- Every project should begin with this next block --&gt;
&lt;!-- =========================================================================================== --&gt;
&lt;!DOCTYPE project [
&lt;!ENTITY properties SYSTEM "file:../../xmls/properties.xml"&gt;
&lt;!ENTITY paths SYSTEM "file:../../xmls/path_refs.xml"&gt;
&lt;!ENTITY taskdefs SYSTEM "file:../../xmls/taskdefs.xml"&gt;
&lt;!ENTITY taskdefs_post_compile SYSTEM "file:../../xmls/taskdefs_post_compile.xml"&gt;
&lt;!ENTITY targets SYSTEM "file:../../../xmls/targets.xml"&gt;
]&gt;
&lt; project default="compile" &gt;
&lt;!-- =========================================================================================== --&gt;
&lt;!-- This tells how "deep" you are (how many levels down from xml-axis/java --&gt;
&lt;!-- =========================================================================================== --&gt;
&amp;ltproperty name="axis.home" location="../../.." /&gt;
&lt;!-- =========================================================================================== --&gt;
&lt;!-- This is the path description of where you are right now, relative to xmls-axis/java --&gt;
&lt;!-- =========================================================================================== --&gt;
&amp;ltproperty name="componentName" value="test/wsdl/marrays" /&gt;
&amp;properties;
&amp;paths;
&amp;taskdefs;
&amp;taskdefs_post_compile;
&amp;targets;
&lt;!-- =========================================================================================== --&gt;
&lt;!-- This target should remove anything created by this component --&gt;
&lt;!-- =========================================================================================== --&gt;
&lt; target name="clean"/&gt;
&lt;!-- =========================================================================================== --&gt;
&lt;!-- This target should copy in anything that this component needs, or copy out to staging --&gt;
&lt;!-- This target should also do any neccessary "setup" tasks (manage pre-reqs, etc) --&gt;
&lt;!-- =========================================================================================== --&gt;
&lt; target name="copy"/&gt;
&lt;!-- =========================================================================================== --&gt;
&lt;!-- This target actually "makes" things --&gt;
&lt;!-- =========================================================================================== --&gt;
&lt; target name="compile"/&gt;
&lt;!-- =========================================================================================== --&gt;
&lt;!-- This target "runs" things in/for this component, if neccessary --&gt;
&lt;!-- =========================================================================================== --&gt;
&amp;lttarget name="run" &gt;
&amp;ltantcall target="execute-Component" /&gt;
&lt;/target&gt;
&lt;/project&gt;
</pre>
</li>
<li>If you want to instantiate this component directly, then add the following type stub into buildSamples.xml or buildTest.xml as appropriate: <pre>&lt; target name="echo"&gt;
&lt; ant inheritAll="true" antfile="samples/echo/build.xml"/&gt;
&lt;/target&gt;
</pre>This should be done if this sample/test is to be a dependancy of another sample or test.</li>
<li>If you don't want to instantiate it directly, the "compile" target looping in the buildSamples.xml or buildTest.xml file will pick up any build.xml files in the appropriate path.</li>
<li>In order to reference a dependancy in a component build.xml file, do the following (taken from test/soap/build.xml): <pre>&lt; target name="copy"&gt;
&lt; ant inheritAll="true" antfile="build.xml" target="utils"/&gt;
&lt; ant inheritAll="true" antfile="build.xml" target="RFCDispatch"/&gt;
&lt;/target&gt;
</pre>
</li>
</ul>
<p>
<br>
<br>
<a href="#top">Back to the Top</a>
</p>
<hr>
<h2>
<a name="general"></a>Generic Changes</h2>
<p>A new top-level path was created, named "xmls". This path houses the common xml configuration file fragments. Roughly, in order of their inclusion, they are:<br>
<br>
<strong>properties.xml</strong> contains common properties, eliminating the large property setting blocks at the top of each build*.xml file.<br>
<strong>path_refs.xml</strong> contains the common CLASSPATH setup, to eliminate needing to track, or multiply define this large structure in all files separately.<br>
<strong>taskdefs.xml</strong> contains common ant tasks that are set up, the are inherent in the configuration.<br>
<strong>taskdefs_post_compile.xml</strong> contains the definitions of tasks that are built during the compilation of tasks, such as forEach, java2wsdl, and wsdl2java.<br>
<strong>targets.xml</strong> contains common configuration level targets that required hundreds of lines of repeated code in the build*.xml files.</p>
<p>
<a href="#top">Back to the Top</a>
</p>
<hr>
<h2>
<a name="samples"></a>Samples</h2>
<p>The old $(TOP)/build.xml had a target called "samples" which did a very simple full-compile on everything referenced by samples/**/*.java. Although this was very simple, it was not very "strong" in that everything in the samples tree needed to be able to be compiled by this rule. Whenever anything needed to be altered in the samples, this main file needed to be modified. It was very possible for someone to add a sample that needed a change, and by changing the master file, could break an large number of things.</p>
<p>In order to alleviate this risk, and to better define the actual samples compilation and use, the samples building has been moved to a new xml file <strong>buildSamples.xml</strong> but the original target is still stubbed into build.xml for backwards compatibility and use does not change.</p>
<p>Then, I extracted the actual compilation logic for each sample, and componentized it into a build.xml file, located in the actual sample sub-directory. For example, for the echo sample is now run by the file samples/echo/build.xml. It can be singularly instantiated by invoking:</p>
<p>
<pre>ant -buildfile buildSamples.xml echo
</pre>
</p>
<p>or as part of the batch (as the old function) by invoking:</p>
<p>
<pre>ant samples
</pre>
</p>
<p>which is what build.xml does in the "samples" target.<br>
<br>
<a href="#top">Back to the Top</a>
</p>
<hr>
<h2>
<a name="tests"></a>Tests</h2>
<p>The old $(TOP)/build.xml had a target called "buildTest" which did a very simple full-compile on every thing referenced by test/**/*.java. Although this was very simple, it was not very "strong" in that everything in the test tree needed to be able to be compiled by this rule. Whenever anything needed to be altered in the test, this main file needed to be modified. It was very possible for someone to add a test that needed a change, and by changing the master file, could break an large number of things.</p>
<p>In order to alleviate this risk, and to better define the actual test compilation and use, the test building has been moved to a new xml file <strong>buildTest.xml</strong> but the original target is still stubbed into build.xml for backwards compatibility and use does not change.</p>
<p>Then, I extracted the actual compilation logic for each test, and componentized it into a build.xml file, located in the actual test sub-directory. For example, for the session test is now compiled by the file test/session/build.xml. It can be singularly instantiated by invoking:</p>
<p>
<pre>ant -buildfile buildTest.xml session
</pre>
</p>
<p>or as part of the batch (as the old function) by invoking:</p>
<p>
<pre>ant functional-tests
</pre>
</p>
<p>which is what build.xml does in the "buildTest" target.</p>
<br>
<div id="pdf" align="right">
<a href="AxisTestRedesign.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br>
PDF</a>
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div id="footer">
<table summary="footer" cellspacing="0" cellpadding="4" width="100%" border="0">
<tbody>
<tr>
<td colspan="2">
<div align="center">
<div class="copyright">
Copyright &copy; 2000-2005&nbsp;The Apache Software Foundation. All rights reserved.
</div>
</div>
</td>
</tr>
<tr>
<td align="left"></td><td align="right">
<div align="right">
<div class="credit"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>