Karma fails to launch IE on Team City build

前端 未结 2 1889
庸人自扰
庸人自扰 2021-01-25 03:37

Karma is failing to launch IE when running under Team City. I can log onto the sever and run the tests from the command line, but IE always fails from Team City:



        
2条回答
  •  后悔当初
    2021-01-25 04:33

    @Kevin Kuszyk, your solution worked for me as well.

    The problem is that Internet Explorer 11 shows a dialog window the first time it's started for each user that starts it.

    Solution: Manually start IE as the TeamCity user.

    In order to start Internet Explorer as the service user that you configured to run TeamCity, shift + right click on IE and select run as different user in the menu. A login bar window will show - Login and proceed. When you have logged in, the the browser will start and prompt you with a dialog. Choose the option you want and proceed (Hint, disable the security). The next time you start Internet Explorer as that user the dialog will not be shown and therefore Karma will be able to run its test suite.

    If you run TeamCity as local system, it's a little bit trickier, as you have to download psexec from Microsoft and then execute the following command in powershell to start Internet Explorer:

    psexec -sid "C:\Program Files\Internet Explorer\iexplore.exe"

提交回复
热议问题