Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Intermittent Selenium error: DriverServiceNotFoundException
royboy23
#1 Posted : Sunday, April 19, 2020 1:49:09 PM(UTC)
Rank: Member

Groups: Registered
Joined: 3/3/2014(UTC)
Posts: 11
Location: Germany

Thanks: 2 times
Hi,

I'm now trying to run some Selenium Tests NCrunch. It works fine if I just run a single test at a time, but when I run several tests, I get an exception for about 50% of my tests:

OpenQA.Selenium.DriverServiceNotFoundException : The file C:\Projects\Zeiterfassung\Zeiterfassung.SeleniumTests\SeleniumDrivers\chromedriver.exe does not exist. The driver can be downloaded at http://chromedriver.stor...ogleapis.com/index.html

I have checked the path just to be sure. There chromedriver.exe is there, which is why the test works fine when running it alone.

The exception seems to occur randomly. The same test might work one time, then fail another. The problem does not occur when using a different test runner, for instance Resharper.

What could be the problem and how can work around it?

Thanks,

Adrian
Remco
#2 Posted : Monday, April 20, 2020 5:10:03 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,201

Thanks: 807 times
Was thanked: 1065 time(s) in 1012 post(s)
Hi Adrian,

This looks to me like it could be a concurrency issue. Probably, your tests (or the selenium infrastructure they're using) are copying or moving this .exe around while they work. This technically means that the tests can't be safely run at the same time on your machine. You might want to look into using some concurrency constraints to stabilise the engine in this scenario, or consider ways to change your tests so that they can run safely concurrently.

If this isn't being caused by concurrency, it's worth looking at the constraints around test atomicity ... there may be sequence dependent behaviour in place, for example, if some of the code is deleting the .exe in certain scenarios.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.186 seconds.