<?xml version="1.0" encoding="EUC-JP"?>

<!DOCTYPE document SYSTEM "./dtd/document-v10.dtd">

<document>
  <header>
    <title>Jakarta Cactus</title>
    <subtitle>Server-Side Unit Testing Framework</subtitle>
    <authors>
      <person name="Vincent Massol" email="vmassol@apache.org"/>
    </authors>
    <translator>服部 隆二</translator>
  </header>

  <body>

    <!-- s1 title="Project description" -->
    <s1 title="このプロジェクトについて/Project description">
      <p>
        Cactus is a simple test framework for unit testing server-side java
        code (Servlets, EJBs, Tag Libs, Filters, ...).
      </p>
      <p>
	Cactus は サーバー側の java のコードの単体テストを行うための簡潔なテスト用フレームワークです。
	（Servlet、EJB、JSP のタグライブラリ、フィルター、...）
      </p>
      <p>
        The intent of Cactus is to lower the cost of writing tests for
        server-side code. It
        uses <link href="http://junit.org">JUnit</link> and extends it.
      </p>
      <p>
	Cactus の目的とするところはサーバー側で実行されるコードに対して、
	テストを書く為の手間や掛かる時間を下げる事です。
	Cactus は <link href="http://junit.org">JUnit</link> をベースに、
	それを拡張したものです。 
      </p>
      <p>
        Cactus has been developed with the idea of automatic testing in mind
        and it provides a packaged and simple
        mechanism based on <link href="http://jakarta.apache.org/ant">Ant</link>
        to automate server-side testing.
      </p>
      <p>
	Cactus は自動テストのアイディアの実現を念頭に開発されてきています、
	そしてサーバー上でのテストを自動的に行う為に <link href="http://jakarta.apache.org/ant">
	Ant</link> と連動して動作する、
	簡単でパッケージ化された機能を提供します。
      </p>
      <p>
        Cactus implements an in-container strategy (click on the diagram below
        to understand how it works). An alternative but complementary approach
        not covered by Cactus is to use Mock Objects (see the
        <link href="mockobjects.html">Mock vs Container</link> page to
        understand the differences and why Cactus believes in the
        usefulness of an in-container approach).
      </p>
      <p>
      Cactus は コンテナー内戦略を採用しました。
      （それがどのように働くかを理解する為に下のダイアグラムをクリックしてください。）
      Cactus ではカバーされていませんが、これを補うようなアプローチとして、
      モック・オブジェクトを利用するものがあります。
      （Cactus との違いや Cactus がなぜコンテナー内戦略の有用性を信じているのかを理解するために
       <link href="mockobjects.html">モック対コンテナー</link>のページを参照してください。）
      </p>
      <p>
        <link href="how_it_works.html">
        <figure src="images/archiani.gif" alt="Cactus の仕組み ..."/></link>
      </p>
    </s1>

    <anchor id="unittest_types"/>
    <!-- s1 title="Different kinds of unit tests" -->
    <s1 title="単体テストの分類について/Different kinds of unit tests">
      <p>
        There are several kinds of unit testing frameworks. We categorize them
        in 3 types :
      </p>
      <p>
       単体テストのフレームワークの種類は幾つかありますが、私達はそれを3つのタイプに分類します。
      </p>
      <ol>
        <li>
          <strong>Type 1 : code logic unit testing</strong>. Probably the
          best strategy for these tests is to use a
          <link href="http://www.mockobjects.com">Mock Objects</link> type
          framework.
        </li>
	<li>
	 <strong>タイプ 1 : コートロジック単体テスト</strong>. 多分にこうしたテストのための最適な戦略は
	 <link href="http://www.mockobjects.com"> Mock Objects</link>型のフレームワークを用いる事でしょう。
	</li>
        <li>
          <strong>Type 2 : integration unit testing</strong>. Cactus is
          typically in this category (I'll let you judge if it is the best or
          not :)). These tests will exercise the interactions with the
          container.
        </li>
	<li>	
	  <strong>タイプ 2 : 統合型単体テスト</strong>. Cactus は典型的にこのカテゴリーに入ります。
	  (それがベストかどうかはあなたの判断に任せますが。:))
	   これらのテストはコンテナーとの相互に連携して動作します。
	</li>
        <li>
          <strong>Type 3 : functional unit testing</strong>. These unit tests
          will let you test the returned values from your server code. This is
          for example
          <link href="http://sourceforge.net/projects/httpunit">HttpUnit
          </link> (Note that HttpUnit also performs standard functional testing
          - as opposed to functional unit testing -, which let you test full
          use cases - a login use case for example, which is comprised of
          several requests/responses).
        </li>
        <li>
          <strong>タイプ 3 : 機能的単体テスト</strong>. これらの単体テストによって、
	  あなたはサーバー側のコードからの返り値をテストすることになるでしょう。
	  これらの例としては
	  <link href="http://sourceforge.net/projects/httpunit">HttpUnit
          </link> かあります。
	  (HttpUnit  はまた標準的な機能テストとしても働くことに注意してください。
	  機能的単体テストとは対照的に、そこでは全てのユースケースをテストするこ
	  とになります。例えばとあるログイン処理のユースケースがそうです。
	  それらは何回かのリクエスト／レスポンスを含みます。）
        </li>
      </ol>
      <p>
        Ideally you would use 3 different frameworks just to unit test your
        code ! Then you have to think about acceptance testing, system
        integration testing, ...
      </p>
      <p>
        理想的には3つの異なるフレームワークをあなたのコードの単体テストに用いるべきかも知れません。
	それからあなたはさらに考えていかなければいけません。
	受け入れテストやシステム統合テスト等々・・・
      </p>
      <p>
        Cactus was developed to fit Type 2 but also to be a very good
        compromise for Type 1 and 3, with the idea that it is much easier to
        have to write tests for a single framework than for several ! Moreover,
        you can never fully test your code. We believe Cactus provides a middle
        ground that provides a high confidence that your code will run when
        deployed. However, it is your choice and you can use Cactus only for
        Type 2 if you wish.
      </p>
      <p>
        Cactus はタイプ２に合うように開発されましたが、タイプ１や３に対しても非常
	によい代替案にもなるように開発されています、それは単一のフレームワークで
	テストを書いていく事は、複数のフレームワークを使ってやる事より、ずっと容易
	であるという考えに基いています。
	それ以上に、あなたのコードを完全にもれなくテストする事は決してできません。
	私達は Cactus は 運用時にあなたのコードが正常に動作する事を、高く保証する
	中間案を提供していると信じています。しかしながらそれはあなたの選択すべき
	事であり、もし望むならタイプ２のテストのためだけに Cactus を用いる事も出
	来ます。
      </p>
    </s1>

    <!--s1 title="Getting Started" -->
    <s1 title="さあ始めよう/Getting Started">
      <p>
        To get started, read the
        <link href="getting_started.html">Getting Started</link> guide.
      </p>
      <p>
        まず始める為に <link href="getting_started.html">さあ始めよう</link> のガイドを読みましょう。
      </p>
    </s1>

  </body>
</document>

