My question is relevant to this question, but I've somehow moved a step further and implemented a test framework using nunit.
When I run the test framework addin inside Revit, the testing framework somehow locks the test assemblies making it impossible to recompile the test assemblies. To get around it, I tried making a shadow copy so the nunit test runner runs on the copied assemblies. But once I run the tests for the first time, the subsequent test runs does not work on updated copies. It is like the test runner caches the dlls and always tries to run tests on cached copy.
So each time the test assembly is updated, I need to close-reopen Revit to run the tests which is a real pain. The main reason I implemented the testing framework for Revit was to be able to do BDD/TDD using Revit API.
This is a code snippet of how I run the tests:
TestPackage theTestPackage = new TestPackage(testDll);
RemoteTestRunner testRunner = new RemoteTestRunner();
testRunner.Load(theTestPackage);
TestResult testResult = testRunner.Run(new NullListener());
Does anyone have any idea how to solve this?