Open aik099 opened 10 years ago
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)
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)
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.
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
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.
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.