Pre-build events on the test project - do they work?
Hi. have A pre-build event for my test project as the same events exist for the real projects. This event supposed to copy some config files to the bin folder. Here is the event script:
copy $(ProjectDir)ConfigStorage\*.config $(TargetDir)
When I compile the test project, everything works fine and files are being copied to the bin\Debug folder, but when I run tests - it doesn happen. This stupid test run creates folder with a time stam and a two folders underneath - In and Out. All ddls are placed in the Out folder but not the config files!
Do those events run at all?
How can I set manage so all those foldersare not being created automatically? So instead of new timestamped folder for every test run it always copied dlls to the predictable location?
Hello,
All of the things you want to do are things that can be achieved through the localtestrun.testrunconfig file in your test projects.
Whenever you start a run, the time-stamped folder will get created with the In/Out directories. You can change the name of the time-stamped folder by going to the General tab in the testrunconfig and selecting "User-defined scheme".
If you want to run a script before or after a test run, go to "Setup and Cleanup Scripts" tab. You can do it from there.
Finally, if you want to deploy items to the Out directory of the run, you can do it on a run level by going to the Deployment tab in the testrunconfig, or on a test-level by using the [DeployItem] attribute on your tests.
Hope this helps
Thanks,
David Gorena Elizondo
[MSFT] VSTS
I still think that all thi Team System is overcomplicated. Look at the NAnt - it has only targets, which will let me do any job I want from setting variables to the deployment. Team System has dozens constructions.
Another thing - why should TFS have separate scripts for testing and for normal build? It leads to code duplication at very least and oercomplicates stuff again....