Running Selenium Tests through Teamcity, can it be done?

瀏覽次數:4,264 次
跳到第一則未讀訊息

DeadJoshWalking

未讀,
2008年7月9日 上午10:55:332008/7/9
收件者:selenium-users...@googlegroups.com
I've had Selenium RC running in my personal Maven builds for a while, and that works fine, I'm now trying to implement the same process on our Teamcity server, but I'm encountering problems.

Im using Chrome, (have tried standard Firefox as well), but when my test phase starts, no firefox window opens (though If I go to Task Manager, I can see a process has started) and the tests eventually time out

Here's the log:

{code}
Running msp.csi.CSITest
[15:18:53]: 15:18:53.812 INFO - Java: Sun Microsystems Inc. 1.6.0_01-b06
[15:18:53]: 15:18:53.813 INFO - OS: Windows Vista 6.0 x86
[15:18:53]: 15:18:53.813 INFO - v1.0-beta-1 [2201], with Core v1.0-beta-1 [1994]
[15:18:53]: 15:18:53.892 INFO - Version Jetty/5.1.x
[15:18:53]: 15:18:53.893 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
[15:18:53]: 15:18:53.894 INFO - Started HttpContext[/selenium-server,/selenium-server]
[15:18:53]: 15:18:53.895 INFO - Started HttpContext[/,/]
[15:18:53]: 15:18:53.921 INFO - Started SocketListener on 0.0.0.0:1111
[15:18:53]: 15:18:53.921 INFO - Started org.mortbay.jetty.Server@ca8327
[15:18:54]: 15:18:54.004 INFO - Checking Resource aliases
[15:18:54]: 15:18:54.010 INFO - Command request: getNewBrowserSession[*chrome, https://mydomain.com/] on session null
[15:18:54]: 15:18:54.010 INFO - creating new remote session
[15:18:54]: 15:18:54.094 INFO - Allocated session e0c6d8b534b64f3486198e935f65e3a4 for https://mydomain.com/, launching...
[15:18:54]: 15:18:54.124 INFO - Preparing Firefox profile...
[15:18:56]: 15:18:56.735 INFO - Launching Firefox...
[15:18:58]: 15:18:58.825 INFO - Got result: OK,e0c6d8b534b64f3486198e935f65e3a4 on session e0c6d8b534b64f3486198e935f65e3a4
[15:18:58]: 15:18:58.831 INFO - Command request: open[https:/mydomain.com/, ] on session e0c6d8b534b64f3486198e935f65e3a4
[15:19:28]: 15:19:28.878 INFO - Got result: Timed out after 30000ms on session e0c6d8b534b64f3486198e935f65e3a4
[15:19:28]: 15:19:28.881 INFO - Command request: testComplete[, ] on session e0c6d8b534b64f3486198e935f65e3a4
[15:19:28]: 15:19:28.881 INFO - Killing Firefox...
[15:19:28]: 15:19:28.958 INFO - Got result: OK on session e0c6d8b534b64f3486198e935f65e3a4
[15:19:28]: 15:19:28.970 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=1111]
[15:19:29]: 15:19:29.071 INFO - Stopped SocketListener on 0.0.0.0:1111
[15:19:29]: 15:19:29.095 INFO - Stopped HttpContext[/selenium-server/driver,/selenium-server/driver]
[15:19:29]: 15:19:29.118 INFO - Stopped HttpContext[/selenium-server,/selenium-server]
[15:19:29]: 15:19:29.139 INFO - Stopped HttpContext[/,/]
[15:19:29]: 15:19:29.139 INFO - Stopped org.mortbay.jetty.Server@ca8327
[15:19:29]: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 35.375 sec <<< FAILURE!
[15:19:29]:
[15:19:29]: Results :
[15:19:29]:
[15:19:29]: Tests in error:
[15:19:29]: testSysAdminUserLink(msp.csi.sysadmin.SysAdminUserLinkSection)
[15:19:29]:
[15:19:29]: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[15:19:29]:
[15:19:29]: [INFO] ------------------------------------------------------------------------
[15:19:29]: [ERROR] BUILD FAILURE
[15:19:29]: [INFO] ------------------------------------------------------------------------
[15:19:29]: [INFO] There are test failures.
[15:19:29]:
[15:19:29]: Please refer to C:\Home\MSPDev\trunk\tricsi\it\target\surefire-reports for the individual test results.
[15:19:29]: [INFO] ------------------------------------------------------------------------
[15:19:29]: [INFO] For more information, run Maven with the -e switch
[15:19:29]: [INFO] ------------------------------------------------------------------------
[15:19:29]: [INFO] Total time: 1 minute 45 seconds
[15:19:29]: [INFO] Finished at: Wed Jul 09 15:19:29 BST 2008
[15:19:29]: [INFO] Final Memory: 20M/46M
[15:19:29]: [INFO] ------------------------------------------------------------------------
[15:19:29]: Process exit code: 1
[15:19:29]: Number of processed tests: 1
[15:19:29]: Build finished
{code}


Has anyone had Selenium Working inside of TeamCity?

DeadJoshWalking

未讀,
2008年7月11日 上午10:09:182008/7/11
收件者:selenium-users...@googlegroups.com
OK Solved this, with the help of the TeamCity devs, apparently it's down to the limitations running your Build Agent as a Windows Service, if you uninstall the service and start the build agent manually, Selenium Tests work as expected.

David Canning

未讀,
2016年4月12日 下午1:34:472016/4/12
收件者:Selenium Users、selenium-users...@googlegroups.com、clear...@openqa.org、Josh...@gmail.com
I'm trying to do this as well, and need to keep the agent running as a service, did the TeamCity devs say what the issue was, or does anyone know if the issue has been addressed, as this is 8 years old.
回覆所有人
回覆作者
轉寄
0 則新訊息