System.IO.IOException when running tests in parallel

Answered

I am currently trying Rider out to see if I can move across from VS. I have so far been very impressed that it simply works out of the box; literally load up my solution and it works without any config! I am running test cases using Selebium WebDriver. In VS I can run these in parallel using NUnit's [Parallelizable] attribute without issue, however in Rider I get the following exception:

 

System.IO.IOException : The process cannot access the file 'C:\Users\James\AppData\Local\Temp\gwf43mct.3bs\d5ijhazd.vjw\Chrome\77.0.3865.40\X32\chromedriver.exe' because it is being used by another process.

 

Any ideas?

 

 

3 comments
Comment actions Permalink

Hello,

I would suggest trying some tool for detecting what is using the file, like Process Hacker. Once we know what is locking that file and prevent Rider from using it, we can decide on further steps. Please keep me posted on the result.

0
Comment actions Permalink

Fixed! Basically, when I am writing tests I always comment out Driver.Close and Driver.Quit, so that when the test case fails it keeps the browser up and I can debug. Seems that in Rider this results in a singular instance of chromedriver.exe not being closed down. If I manually close it in Task Explorer then I can run my tests in parallel! :)

0
Comment actions Permalink

Thank you for sharing the details, I am glad to hear the issue is resolved.

0

Please sign in to leave a comment.