私は自分のアプリケーションでセレンのサンプルテストケースを作成しました。次に、ファイルを右クリックして、[テストファイル]を選択します。結果
Testsuite: com.MyApp.SampleSeleniumTest
Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.265 sec
Testcase: warning(junit.framework.TestSuite$1): FAILED
No tests found in com.MyApp.SampleSeleniumTest
junit.framework.AssertionFailedError: No tests found in com.MyApp.SampleSeleniumTest
Test com.MyApp.SampleSeleniumTest FAILED
私のコードは
package com.MyApp;
import com.thoughtworks.selenium.*;
import org.junit.Test;
public class SampleSeleniumTest extends SeleneseTestCase {
@Override
public void setUp() throws Exception {
setUp("http://www.google.com", "*firefox");
}
@Test
public void whatever() throws Exception {
selenium.open("/");
assertTrue(selenium.isTextPresent("Explore"));
}
}