Mink icon indicating copy to clipboard operation
Mink copied to clipboard

Change event tests are slow on Selenium

Open aik099 opened this issue 11 years ago • 5 comments

The recently added change event tests are really slow on MinkSelenium2Driver.

The .invalid selector tests become a bit faster, but slow anyways. Maybe we should introduce some kind of element cache on driver side to make that faster.

aik099 avatar May 24 '14 18:05 aik099

well, for not found elements, a cache would not help anyway, especially when they are searched only once per page load (we cannot cache accross page changes)

stof avatar May 25 '14 15:05 stof

and introducing a cache makes it very hard to invalidate it when changing page (and even worse for JS drivers as the DOM can change even without page change)

stof avatar May 25 '14 15:05 stof

All recent tests really made test suite slow, maybe as slow as Sahi test suite one. I kind of don't like it, but I don't see any options to make it better either.

Maybe we can combine missing element search on one page. This way we open page once and try to search for missing elements. Maybe this way Selenium will cache them somehow, but then one failing test will prevent others from even running.

aik099 avatar May 25 '14 15:05 aik099

given that a passing test involves an exception, it would make the tests ugly as well, and harder to write, by forbidding to use the PHPUnit way to assert exceptions

stof avatar May 25 '14 20:05 stof

What we can do however is to parallelize test run using https://github.com/brianium/paratest and still get single merged coverage file to give to Scrutinizer CI. I did this way in my library and, at least on Travis, it runs super fast.

aik099 avatar May 25 '14 21:05 aik099