私のプロジェクトはセレンテストに失敗しています。grailでselenium-rcを使ったテスト
seleniumconfig.groovy次のコードを持っている:
selenium {
slow = true
singleWindow = true
browser = "*iexploreproxy"
url = null
defaultTimeout = 60000
windowMaximize = false
screenshot {
dir = "./target/test-reports/screenshots"
onFail = false
}
server {
host = "localhost"
port = 4444
}
}
NewTests.groovyファイルには、次のコードが含まれます。
package gtunes
import grails.plugins.selenium.*
import org.junit.*
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*
@Mixin(SeleniumAware)
class NewTests {
class HomepageTests extends GroovyTestCase {
void testHomepageLoads() {
selenium.openAndWait "http://www.facebook.com/login.php"
assertTrue selenium.isTextPresent("facebook")
}
}
出力STSがに表示されていますコマンド "test-app is:
を実行しています30000ms com.thoughtworks.selenium.SeleniumException後にタイムアウトしました:com.thoughtworks.selenium.HttpCommandProcessor.doCommandでcom.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrErrorで30000ms 後にタイムアウトしました(HttpCommandProcessor.java:97) ( HttpCommandProcessor.java:91)grails.plugins.selenium.SeleniumWrapper.open(SeleniumWrapper.groovyで :grails.plugins.selenium.meta.AndWaitDynamicMethod.invokeで53) (AndWaitDynamicMethod.groovy:32)grails.pluginsで 。 SeleniumWrapper.methodMissing(SeleniumWrapper.groovy:125) at automation.HomeTests.testHomepageLoads(HomeTests.groovy:14)
私のプロジェクトはテストに失敗しています。これを整流する方法は?
コマンド履歴がです:あるgetTitle() setContext(a87ff87c1ae249be99c6363519627de8) windowMaximize() setContext(HomeTests:テストホームページロード) オープン(http://www.facebook.com/login.php 、true)
私はIDEからセレンテストを開始できませんでした。コマンドラインから試してみましたか? 'grails test-app -functional' –
私は春のソーススイートだけを使ってやる必要があります。 – Shalini