views:

465

answers:

1

When I run selenium tests (written as nunit tests) from VS2008 I am getting System.UnauthorizedAccessException : Access to the path /bin/Debug is denied. The test is trying to read a entry in App.Config( this file is copied to bin/Debug during compilation). I used unlocker to check file handles and it is VS2008 that has a handle to that file.

+1  A: 

You need to change your test configuration so that access to the directory is allowed. See Test/Edit Test Run Configurations/Deployment.

If you are trying to read or write a file in that directory, you will probably need to copy it to the directory where the test is run. Again, the Deployment tab of the test run config dialog will help you out.

Paul Lalonde