JBuilder 5 との統合/JBuilder 5 Integration

Last update : July 6 2002
Doc for : v1.3

Cactusについて
  • Cactus とは
  • ニュース
  • 変更履歴
  • 特徴/開発状況
  • 目標
  • ロードマップ/ToDo
  • 協力者
  • 協力者募集
  • Cactus ユーザ
  • テスト済環境 ...
  • ライセンス


  • ダウンロード
  • ダウンロード


  • ドキュメント
  • Cactus の仕組み
  • さぁ始めよう
  • モック対コンテナ
  • Javadocs
  • └Javadocs
  • よくある質問


  • Howto ガイド
  • クラスパス Howto
  • 設定 Howto
  • アップグレードHowto
  • テストケース Howto
  • セキュリティHowto
  • Ant Howto
  • HttpUnit Howto
  • サンプル Howto
  • EJB Howto
  • IDE Howto
  • JUnitEE Howto


  • サポート
  • Bug DB
  • メーリングリスト


  • その他
  • 名前の由来
  • ロゴコンテスト
  • 参考文献
  • アクセス状況
  • └WebAlizer


  • 開発者向け
  • CVS
  • コード規約
  • ビルドの結果


  • 序文および必要条件/Forewords and Requirements

    This document describes steps to setup Cactus to unit test Server side code (i.e. EJBs, Servlets, etc) deployed to Weblogic 6.1 within JBuilder5 IDE.

    本ドキュメントでは、JBuilder5 IDE 上で Weblogic 6.1 に配備されたサーバー側コード (即ち EJB やサーブレットなど) のCactus を使った単体テストができるようセットアップする手順を説明します。

    The steps described below apply to current release (Cactus 1.3 as of this writing) and assume that Cactus has been installed correctly (which means that you can run sample successfully).

    下に示す手順は、現在のバージョン(このチュートリアルでは Cactus 1.3)に適用され、Cactus は正しくインストールされていると仮定しています。 (これはサンプルをきちんと動かせることを意味します)


    ステップ 1 : cactus.properties ファイルの作成/Step 1 : Create cactus.properties file

    Create cactus.properties file : Add entry to identify the URL of the redirector (see the Configuration Howto for details).

    cactus.properties ファイルを作成します : リダイレクター URL を確認するための項目を加えます。 (詳しくは Configuration Howto をご覧ください)


    ステップ 2 : JBuilder5 と動作する Cactus の設定/Step 2 : Configure Cactus to work with JBuilder5

    Follow these steps :

    次の手順に従います :

    1. Click Menu item Tools/Configure Libraries to open Configure Libraries wizard
    2. Configure Libraries ウィザードを開くために、 Tools/Configure Libraries メニューを選びます。
    3. On the lefthand side of Configure Libraries wizard, click on New button to open New Library Wizard.
    4. Configure Libraries ウィザードの左側で、 New Library Wizard を開くために、New ボタンを押します。
    5. Enter value "cactus" in the Name field. Choose "user home" from the Location drop down menu.
    6. 名前フィールドに値 "cactus" を入力します。 Location ドロップメニューより "user home" を選択します。
    7. Click on Add button to open the dialog to choose files.
    8. ファイル選択ダイアログを開くために、Add ボタンをクリックします。
    9. Navigate to [cactus home]/lib/ directory, select cactus.jar and click OK button.
    10. [cactus home]/lib/ ディレクトリへ移動し、 cactus.jar を選び、OK ボタンを押します。
    11. Click on Add button again to open the dialog to choose files.
    12. ファイル選択ダイアログを開くために、再度 Add ボタンを押します。
    13. Navigate to the directory where the cactus.properties file is saved.
    14. cactus.properties ファイルが保存されているディレクトリへ移動します。
    15. Click OK button.
    16. OK ボタンを押します。
    17. Click "Add as Class Path" button if "No Paths Found" dialog box pops up
    18. "No Paths Found" ダイアログが出たら、 "Add as Class Path" ボタンを押します。
    19. Follow steps 2 - 6 to add junit.jar, httpclient.jar and aspectjrt.jar which are all in [cactus home]/lib directory
    20. [cactus home]/lib ディレクトリにある junit.jarhttpclient.jaraspectjrt.jar の全てを加えるためにために、 ステップ 2 - 6 に従います。
    21. Optionally, add log4j.jar in [cactus home]/lib directory to enable cactus logging
    22. オプションとして、 Cactus でログを取るために、 [cactus home]/lib ディレクトリにある log4j.jar を加えます。
    23. Click Menu item Project/Project Properties to open Project Properties dialog box
    24. Project Properties ダイアログボックスを開くために、 メニュー Project/Project Properties を選びます。
    25. Click Path tab and then Required Libraries tab
    26. Path のタブをクリックし、次に、 Required Libraries のタブをクリックします。
    27. Click Add button and add the libraries created above to your project.
    28. Add ボタンを押し、自分のプロジェクトに上で作成したライブラリを加えます。

    ステップ 3 : Weblogic 6.1 用の Cactus の設定/Step 3 : Configure Cactus for Weblogic6.1

    1. Open web.xml in WEB-INF directory of the web application deployed on Weblogic
    2. Weblogic で配備されたウェブアプリケーションの WEB-INFディレクトリの web.xmlを開きます。
    3. Add the mapping for the redirector under the <web-app> element.
    4. <web-app> 要素の下に、 リダイレクタのためのマッピングを加えます。
    5. Copy cactus.jar, junit.jar, aspectjrt.jar and log4j.jar(optional) to WEB-INF/lib directory of the web application
    6. ウェブアプリケーションのWEB-INF/libディレクトリへ、 cactus.jarjunit.jaraspectjrt.jar および log4j.jar(オプション)をコピーします。
    7. Copy your classes files to WEB-INF/classes directory of the web application
    8. ウェブアプリケーションの WEB-INF/classes ディレクトリに自分のクラスファイルをコピーします。

    ステップ 4 : テストの実行/Step 4 : Run the test

    1. In JBuilder, click Menu item Project/Project Properties
    2. JBuilder で Project/Project Properties メニューを選びます。
    3. Click Run tab and then Application tab
    4. Run タブをクリックし、Application タブをクリックします。
    5. Open "Select Main Class for Project" dialog box and choose the test case class which has a main method in it.
    6. "Select Main Class for Project" ダイアログを開き、 メインメソッドを定義したテストケースクラスを選びます。
    7. Run your project
    8. プロジェクトを実行します。



    [訳注:これは 漆島賢二 が翻訳しました。日本語訳に対するコメントがあれば こちらに送ってください]
    Copyright © 2000-2002 The Apache Software Foundation. All Rights Reserved.