In a suite of tests, using NUnit, I open Excel using Excel.Interop.
I then take a copy of an excel xml document, and then attempt to open and manipulate this in the tests.
This all works fine locally. It works on my CI machine too when run via the team city msbuild task or via visual studio (using Resharper)
But when run using the Agent running as a service the tests no longer work.
If I run the agent.bat start, the tests pass.
So I created a Scheduled task to run when the CI machine boots up to call agent.bat start, and once again, the tests fail.
I think it might be to do with how excel needs to be called and can't be called in the background, but I don't know how to get around this.
Does anyone know what would be wrong or how to make the windows service be able to run this kind of test?