Trying to use Moles with NUnit. Getting "Moles requires tests to be an instrumented process" -
Trying to use Moles with NUnit. Getting "Moles requires tests to be an instrumented process" -
i trying utilize moles nunit , getting next error "moles requires tests instrumented process". using visual nunit within visual studio 2008 working. help welcome.
this did in order create moles work nunit:
grab archive @ c:\program files (x86)\microsoft moles\documentation\moles.samples.zip
, extract moles
solution folder.
build nunit
project in visual studio (2008) release.
copy output files microsoft.moles.nunit.dll
, microsoft.moles.nunit.xml
...\moles\nunit\bin\release\
c:\program files (x86)\nunit 2.5.9\bin\net-2.0\addins\
. suspect step of re-compiling nunit addin instead of using 1 coming download & install actual solving point.
in vs test project, create sure add together reference c:\program files (x86)\nunit 2.5.9\bin\net-2.0\addins\microsoft.moles.nunit.dll
copied.
in vs test class, mark test method [moled]
attribute (this require using microsoft.moles.framework.nunit
). alternative, wrap implementation within using (molescontext.create()) { ... }
block (this require using microsoft.moles.framework
).
from command line, invoke nunit test runner through moles runner following: "c:\program files (x86)\microsoft moles\bin\moles.runner.exe" "path\to\your\test\assembly.dll" /r:"c:\program files (x86)\nunit 2.5.9\bin\net-2.0\nunit-console.exe" /x86 /args:"/domain=none"
i found [moled] attribute does not work [testcase(...)] , brings uninstrumented error scenario. instead using (molescontext.create())
block works in case too.
once find works, might consider running moles runner external tool within visual studio. follows instructions in running moles using nunit console visual studio, updating arguments in step 6.
please note on windows 7 64bit machine, nunit 2.5.9, microsoft pex , moles (x86) 0.94.51006.1. consider actual folders different paths, versions, etc.
nunit moles
Comments
Post a Comment