Reputation: 21
First let me say the I tried in the StoryQ forum but there is no much activity there and I feel I wont get any answer there.
This is the issue, after introduction of Nunit 3.0 the StoryQ report generation is broken
After introduction on Nunit 3.0 the way to find where your application is running has changed, it used to be that:
Directory.GetCurrentDirectory()
was good enough, but now you are forced to use:
NUnit.Framework.TestContext.CurrentContext.TestDirectory
The thing about using GetCurrentDirectory is that now with Nunit 3.0 gives you something like C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW.
I suspect that StoryQ is using GetCurrentDirectory and is getting a UnauthorizedAccessException becuase is trying to create a folder in the windows folder mentioned above.
Is there a way I could force StoryQ to use the correct directory without me going into the code of StoryQ and change it?
Upvotes: 1
Views: 55
Reputation: 21
I tried this and it seems to work:
Directory.SetCurrentDirectory(NUnit.Framework.TestContext.CurrentContext.TestDirectory);
Now StoryQ goes to the right directory to create his report.
Upvotes: 1