Selenium IDEの場合:
1つのテストスイートを作成しました:TS1.htmlそしてそれには2つのテストケースがあります:
Test1.htmlと
Test2.html
では、Selenium RC(Eclipse)でこのTS1.htmlテストスイートを実行する手順は何ですか?
Selenium IDEの場合:
1つのテストスイートを作成しました:TS1.htmlそしてそれには2つのテストケースがあります:
Test1.htmlと
Test2.html
では、Selenium RC(Eclipse)でこのTS1.htmlテストスイートを実行する手順は何ですか?
魔法をかける必要があります:)
他の言語 (Java、C#、Ruby、Python、Perl、PHP など) に変換せずに Selenium サーバーを使用して .html ファイルを実行するには:
java -jar selenium-server.jar -port 4546 -htmlSuite *firefox " http://www.google.com " "C:\SeleniumTest\TS1.html" "C:\result.html"
テストは Firefox で実行され、テスト結果は C ドライブに result.html として生成されます。
Pavel が言ったように、まずSelenium IDE のオプションに移動し、記録されたコードをJUnit 4モデルに変換します。次に、コードをコピーして Eclipse IDE に貼り付けます。
2 つのテストケースを持つ JUnit クラスのサンプル:
public class JUnitSample{
@BeforeClass
public static void setup(){
1)start the server
2)Launch the browser
}
@Test
public void testTestcaseName01(){
paste your first test case
}
@Test
public void testTestcaseName02(){
paste your second test case
}
@AfterClass
public static void setup(){
1)close the browser.
2)Stop the server..
}
}
もう 1 つ、IDE によって変換されたコードは、Eclipse IDE から実行するには不十分です。そのため、Eclipse から実行するようにコードを変更する必要があります。