Looking though the documentation and the forum, I can't find how to get .runsettings loaded in my TestContext.
Can anyone tell me how this is done?
Remco NCrunch Developer
#17811
19 Dec 2024 22:58 UTC
Hi, thanks for posting.
NCrunch's MSTest support is emulated rather than integrated, and the emulator does not support loading settings from .runsettings. Is there something you need from there?
NCrunch's MSTest support is emulated rather than integrated, and the emulator does not support loading settings from .runsettings. Is there something you need from there?
As a contractor, at my current assignment, thay have integration tests setup next to unit tests. The environment settings are loaded as testcontext properties to switch between environments. I cannot change this process. Therefore I hope there is a way to inject and switch between those .runsettins files
Remco NCrunch Developer
#17813
20 Dec 2024 10:59 UTC
hvkooten wrote:As a contractor, at my current assignment, thay have integration tests setup next to unit tests. The environment settings are loaded as testcontext properties to switch between environments. I cannot change this process. Therefore I hope there is a way to inject and switch between those .runsettins files
Sorry, we don't support MSTest runsettings files.
Would it perhaps be possible to use environment variables instead? It's possible to override these using NCrunch settings (including engine modes). You could adjust the code so that when it reads environment settings from testcontext, it refers to System.Environment.GetEnvironmentVariable instead if the textcontext does not contain the expected setting.
I'm the only one using NCrunch in the team (I don't know why), so I cannot change the code for this to work.
Remco NCrunch Developer
#17815
20 Dec 2024 12:31 UTC
hvkooten wrote:I'm the only one using NCrunch in the team (I don't know why), so I cannot change the code for this to work.
Sorry, we don't support runsettings. I can't suggest any workaround that does not involve changing the test code in some way.
Post a reply
Log in to reply.