I am looking to see if ReSharper can help create a solution that will all an end user to use nunit much like MSTest works in creating a TestResults folder and creating a new clean folder for each execution of the tests.
Right now I have a solution that uses the pre-build to delete all files and directories in the output folder of the unit test project. This will force the output to always have clean environment and it will also have a "deployment" model to copy in files that are not published in the build. The problem I have is pre-build only runs if the assembly is out-of-date. This is a problem when you execute a unit test from visual studio with "run" say from ReSharper. The output is not clean and will run with previous output.
I know I could use the [setup] and [cleanup] but this is prone to mistakes and is quite tedious when a model that is employed by MSTest is used it can greatly reduce the work to ensure a test environment is reset to a known state on each execution.
What I am wondering is if there was a way using ReSharper to execute a batch file or "command" before ReSharper executes the unit test or group of unit tests? If so I will be able to have a working solution where the developers will use ReSharper to execute the unit tests and on the build server which forces rebuild the solution will still work there.