Running Watin on TeamCity

前端 未结 5 1402
孤城傲影
孤城傲影 2020-12-14 19:10

I\'m trying to run a simple Watin test through TeamCity but the Internet Explorer window is never shown as is usually is via CruiseControl.

I get an error that it ca

相关标签:
5条回答
  • 2020-12-14 19:29

    If you installed as a service, make sure to stop it and disable it. Then, create a .bat file with the following

    C:
    cd teamcity\buildagent\bin\
    agent.bat start
    

    Now just create a shortcut in your start up folder to this batch file!

    0 讨论(0)
  • 2020-12-14 19:34

    Under Account tab on the Teamcity Agent's Service property window (services.msc), check "Allow service to interact with desktop", that will allow local service account to spawn internet explorer. But you will most certainly get stuck with other stuff, like cookie blocking, password saving etc. so login as local service and fix those stuff.

    Easiest way to do that is with psexec (http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx), call psexec -i -s cmd.exe so spawn a cmd running as local account, then start internet explorer at setup everything up (the privacy settings in IE for local account is extremely high).

    0 讨论(0)
  • 2020-12-14 19:35
    1. Stop agent service. execute command: net stop TCBuildAgent from console.
    2. Run from console c:\teamcity\buildagent\bin\agent.bat start (depending on your teamcity installation path)
    0 讨论(0)
  • 2020-12-14 19:37

    Found this on another forum

    All credits go to Matt Baker

    For future reference to anyone who attempts to run WatiN tests automatically using TeamCity. You must start your build agent using \bin\agent.bat start and NOT as a service. WatiN requires a full UI to execute properly and it doesn't get this environment as a service. I hope this makes it easier for other people!

    0 讨论(0)
  • 2020-12-14 19:40

    Please try this simple solution: Go to services, edit the properties of your service, select the LogOn Tab, and check the box with the label: "Allow service to interact with desktop".

    Worked for me in bamboo.

    Cheers, Pedro O Moleiro

    0 讨论(0)
提交回复
热议问题