0
votes

I have tests that have to be run on CI server. The thing is that when I am running the tests in nunit console, they are all passing, but on teamcity server I keep receiving a bunch of errors, connected with sqllocaldb instance. I guess this is due to the fact that running teamcity from 'local system' privileges gives such an output, but I don't know how to bypass this thing, even using 'Run as' plugin.

Maybe you can suggest an option/configuration/workaround to me to get the right results?

1
You need to set up a build agent that has write access to wherever you need to place the local database file. In general you should avoid writing integration tests that rely on the local file system. I'm assuming you're not actually testing that sqllocaldb works but rather that code surrounding it works, in which case you're probably better off mocking away the actual code that directly access the database in the production code.Lasse V. Karlsen
The thing is that both, Server and Agent services running from 'system' account, as well as sqldb instance configured, but somehow it is ignored during tests.I guess I will have to think of using a command prompt runnerDmytro Bukanov

1 Answers

0
votes

Created new windows profile, called "TeamCity", configured everything and made service to be run under this profile, now everything works fine.