Monthly Archives: June 2017

My Karma tests are failing in IE on my Jenkins and I don’t know why

We had a small problem I would like to share today. We have Windows 2012 R2 with Jenkis as one of means to build our stuff (I know, W2012 man… others in our company use different CI systems and there was also some other reason for W2012 R2, but if I had the choice I would definitely pick some newer OS).

Some days ago, our IE tests started to fail. The reason from Jenkis : Timeout. Wait, what? We didn’t changed anything in the build and test process!!! Indeed there were code changes but no one touched the build pipeline.

After short investigation, the reason to this was quite simple (as always) :
It seems like there was some update that changed IE or touched it’s settings and it wanted me to confirm security setting when I ran tests from my account.

Something like this :
ie 11 security settings

OK, let’s suppose that IE timeouted for the same reason on Jenkins job. But Jenkins runs as service, as special privileged Local System Account. How can I run IE like this account?

This link helped : https://marckean.com/2010/12/17/run-internet-explorer-as-the-local-system-account/

You need to :

  1. download PsExec from this URL : https://technet.microsoft.com/en-us/sysinternals/bb897553
  2. execute this command : psexec -s -i “%programfiles%\Internet Explorer\iexplore.exe”
  3. IE will open
  4. make IE happy
  5. close it
  6. never touch it again

The tests should be good again 🙂
Thanks to the author of aforementioned blog for this time saver.