|
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 :
次の手順に従います :
-
Click Menu item Tools/Configure Libraries to open Configure Libraries
wizard
-
Configure Libraries ウィザードを開くために、
Tools/Configure Libraries メニューを選びます。
-
On the lefthand side of Configure Libraries wizard, click on New
button to open New Library Wizard.
-
Configure Libraries ウィザードの左側で、
New Library Wizard を開くために、New ボタンを押します。
-
Enter value
"cactus" in the Name field. Choose
"user home" from the Location drop down menu.
-
名前フィールドに値
"cactus" を入力します。
Location ドロップメニューより "user home" を選択します。
-
Click on Add button to open the dialog to choose files.
-
ファイル選択ダイアログを開くために、Add ボタンをクリックします。
-
Navigate to
[cactus home]/lib/ directory, select
cactus.jar and click OK button.
-
[cactus home]/lib/ ディレクトリへ移動し、
cactus.jar を選び、OK ボタンを押します。
-
Click on Add button again to open the dialog to choose files.
-
ファイル選択ダイアログを開くために、再度 Add ボタンを押します。
-
Navigate to the directory where the
cactus.properties
file is saved.
-
cactus.properties ファイルが保存されているディレクトリへ移動します。
-
Click OK button.
-
OK ボタンを押します。
-
Click "Add as Class Path" button if "No Paths Found" dialog box pops
up
-
"No Paths Found" ダイアログが出たら、
"Add as Class Path" ボタンを押します。
-
Follow steps 2 - 6 to add
junit.jar,
httpclient.jar and aspectjrt.jar which are
all in [cactus home]/lib directory
-
[cactus home]/lib ディレクトリにある
junit.jar、httpclient.jar 、
aspectjrt.jar の全てを加えるためにために、
ステップ 2 - 6 に従います。
-
Optionally, add
log4j.jar in
[cactus home]/lib directory to enable cactus logging
-
オプションとして、
Cactus でログを取るために、
[cactus home]/lib ディレクトリにある
log4j.jar を加えます。
-
Click Menu item Project/Project Properties to open Project
Properties dialog box
-
Project Properties ダイアログボックスを開くために、
メニュー Project/Project Properties を選びます。
-
Click Path tab and then Required Libraries tab
-
Path のタブをクリックし、次に、
Required Libraries のタブをクリックします。
-
Click Add button and add the libraries created above to your project.
-
Add ボタンを押し、自分のプロジェクトに上で作成したライブラリを加えます。
|
| ステップ 3 : Weblogic 6.1 用の Cactus の設定/Step 3 : Configure Cactus for Weblogic6.1 |
-
Open
web.xml in WEB-INF directory of the
web application deployed on Weblogic
-
Weblogic で配備されたウェブアプリケーションの
WEB-INFディレクトリの web.xmlを開きます。
-
Add the mapping for the redirector under the
<web-app> element.
-
<web-app> 要素の下に、
リダイレクタのためのマッピングを加えます。
-
Copy
cactus.jar, junit.jar,
aspectjrt.jar and
log4j.jar(optional) to WEB-INF/lib
directory of the web application
-
ウェブアプリケーションの
WEB-INF/libディレクトリへ、
cactus.jar、junit.jar、
aspectjrt.jar および
log4j.jar(オプション)をコピーします。
-
Copy your classes files to
WEB-INF/classes directory of
the web application
-
ウェブアプリケーションの
WEB-INF/classes ディレクトリに自分のクラスファイルをコピーします。
|
| ステップ 4 : テストの実行/Step 4 : Run the test |
-
In JBuilder, click Menu item Project/Project Properties
-
JBuilder で Project/Project Properties メニューを選びます。
-
Click Run tab and then Application tab
-
Run タブをクリックし、Application タブをクリックします。
-
Open "Select Main Class for Project" dialog box and choose the test
case class which has a main method in it.
-
"Select Main Class for Project" ダイアログを開き、
メインメソッドを定義したテストケースクラスを選びます。
-
Run your project
-
プロジェクトを実行します。
|
|
|