-
Notifications
You must be signed in to change notification settings - Fork 394
8.8.x issues with Behat tests and selenium/chromedriver #1405
Comments
@dpagini There isn't enough information here for me to really guess at the issue. What errors did you encounter? What's the log output? Does it only occur on Travis? Are you using Selenium or Phantom? In general, Selenium and Chrome are not playing well together right now. This is an issue outside of BLT. The interim solution is to fallback to using PhantomJS, which isn't ideal because it tends to behave inconsistently on Travis. We're planning to move to native headless Chrome once Behat is interoperable with it. |
Sorry, I should have figured as much. I didn't think this would be a simple fix so I just wanted to post about the problem and offer to help, but this is probably a better first step. I'm using Selenium. The issue was plaguing me both on Travis and local on my Drupal VM. I sort of knew that the issue is bigger than BLT based on reading the ticket I linked to in my original post, BUT... my project on BLT 8.7.2 runs these same behat tests fine, so something about the upgrade to 8.8.2 is causing these errors for me. I was trying to figure out what else changed, and the piece I was left with was maybe something to do with Phing vs. Robo calls to behat? It seems like the relevant behat composer projects are the same versions, and my travis configuration didn't get upgraded at all... Here is the behat errors from Travis:
|
...and on Drupal-VM, similar errors. These are the same tests as above, I am just cutting out some of the behat commands. Note that the error occurs earlier in the behat test on DrupalVM vs Travis, but it seems like it's a similar error.
|
Also, my |
I think that the I would suggest debugging this by running the commands directly, without BLT. You'll need two tabs: one to run selenium server and one to run behat.
That should let you cut to the heart of it. |
Yep, sorry, I opened #1408 for the |
Can you explain this more @grasmash? Sorry, I guess I'm just a little more unfamiliar with selenium than I should be. Are you referring to command line "tabs"? How do I run the selenium server, and what does it do to run that separate? With DrupalVM, I'm running all these commands while I'm SSH'd into my VM, right? Hmm... ok, anyways, I learned that my behat tests are failing on my VM with any version of BLT. I guess that's to your point earlier about selenium/chrome. I still know for a fact though that behat is passing in Travis with 8.7.2 but failing with 8.8.2, which is still leaving me scratching my head. |
Basically, BLT does two things when it executes a Behat test.
If that doesn't work, then there's an issue outside of BLT. It could be:
At present, the latest version of Chrome and Chromedriver do not appear to be working well with Behat. See #1134 and #1126. Unfortunately this is outside of the scope of BLT and there is no known solution. The available workaround is to use PhantomJS rather than Selenium. Behat is a bit difficult because it requires so many things working in concert. This should be much simpler once we have a headless chrome browser and we can remove PhantomJS/Selenium from the mix. |
Should this be marked a duplicate of #1126? |
I'm OK with that. I don't want to spend too much time figuring this out if we know there are selenium/chromedriver/etc issues. I'm mostly befuddled by the switch from Phing to Robo seemingly causing my selenium tests to start failing. I took your and @grasmash's advice though and moved over to PhantomJS. I actually had to re-write a few tests though to do that, oddly enough. I think I'm in an OK enough place for now, and hopefully one day I can switch back to selenium, but I would rather stay up to date in BLT. |
My system information:
I tried upgrading my project to the latest BLT 8.8.x branch (8.8.2) and was having major problems with my behat tests passing Travis CI. I know this new minor version starts moving away from Phing to Robo, particularly for tests, but that's the main thing that I can see that's different.
I am having a very similar issue to geerlingguy/drupal-vm#1152. The test suite stuff is a little over my head here, but I'm generally following that issue to say there's not a good solution right now. What I'm confused about is how/why this only happening in the 8.7 -> 8.8 upgrades, but my behat tests are running correctly now.
Anyways, I'm willing to help look into this issue more, and was just wondering if anyone else was having similar issues if they tried to upgrade...? If I can help provide any info, or try anything, please LMK.
Is there a reason BLT uses
se/selenium-server-standalone
2.53 when there are newer versions available?The text was updated successfully, but these errors were encountered: