c# - File generation path .net application varies while debugging vs running a test -
i generating excel file in application. trying test if application generating file , saving @ right place.
from testing side, setting serverrootpath testcontext. deploymentdirectory
now problem seeing is, if debug test, file seems generated in testresults folder , can see excel file if run test, don't see folder being created run , there's no file well.
can point, what's happening here , how testcontext different if debug vs run tests.
try log/trace values of testrundirectory (https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testcontext.testrundirectory.aspx) and/or other properties of context see if can figure out. still on local machine , not in tfs or other build system, right? not sure else suggest.
edit: using normal visual studio test runner or have resharper/devexpress/other test runner? it's unlikely might interfere directories.
Comments
Post a Comment