A few questions on the implementation (comparison with Lullabot/ddev-playwright) #26
Replies: 8 comments 2 replies
-
Hi @deviantintegral, I'm not sure if I can help you much, but I'll try to tell you how I use ddev with playwright. Maybe it will give you some clues. First, to answer your questions, here is what I can say:
Then, if you are curious, and I have time, here is how I use playwright : I only need javascript tools like I ended up with the following set up :
If you want to see all the command for a GitHub action, you can take a look here. Hope it could help. Thanks |
Beta Was this translation helpful? Give feedback.
-
I was curious why you needed playwright-firefox. I think that's because you're using jest for tests instead of playwright/test. Makes sense, and matches the note at https://www.npmjs.com/package/playwright-firefox. I'm really surprised you didn't run into Firefox hangs - but perhaps it's now been fixed upstream. I'm going to post a repo with the setup we have, and then come back and do a comparison. |
Beta Was this translation helpful? Give feedback.
-
Here's the repo: https://github.com/deviantintegral/drupal-playwright |
Beta Was this translation helpful? Give feedback.
-
Hi @deviantintegral, thanks for the repo. Very complete ! For information, I just tested a full test suite with Firefox and some WordPress plugin I maintain. Despite errors on some tests (which could be corrected, I guess, by adding some of the usual workarounds), some tests passed at 100% like this one : https://github.com/julienloizelet/cs-wordpress-bouncer/actions/runs/4508204588/jobs/7936683789 As you said, maybe the bug is fixed upstream. |
Beta Was this translation helpful? Give feedback.
-
To follow up, I've been working on converting the example repo to a ddev addon, which I've done here: https://github.com/deviantintegral/ddev-playwright. We've been happy with the "all in one container" approach for a few months now, so I think we'll be sticking with it. Thanks for your feedback! |
Beta Was this translation helpful? Give feedback.
-
Really cool conversation. The projects seem to both have come a long way since. Any chance for a round 2 discussion on the different approaches? For instance, Lullabot's Similar Tools notes the following:
However, it seems like julienloizelet/ddev-playwright now also includes KasmVNC and supports headed mode. What other differences now exist? What might be the current pros/cons of each? |
Beta Was this translation helpful? Give feedback.
-
Hi @jcandan , I won't be able to answer because I'm only using the https://github.com/julienloizelet/ddev-playwright one :) But I can at least invite you to read this closed issue where it appears that it's obviously simpler to interact between the web container and playwright when playwright is inside the web container. Basically, I suppose the pros/cons are similar to the pros/cons of the monolithic approach versus the micro-services approach:
DDEV itself does not choose between the two approaches:
Playwright may be designed to test code running on the web server, so it makes sense to have it in the web container. I suppose the choice is yours and you can test both to see which one best suits your needs. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Wow. Thank you for that unbiased answer. That’s cool. I’ll give them both a shot. I’d imagine that, being a DDEV addon, most of the complexities you mention are handled for simple cases. Any insight or example solutions into complex integrations you warn of? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, great to see this!
I've also been working on this on and off over the past month. So far it's all custom code in a single site. Here's a few notes and challenges I ran into, and I'm curious if you've hit them yet. I don't think you have because I don't see workarounds in the code.
At a high level, what we've ended up with is:
test/playwright
.ddev playwright
command that copies it in. As well, a pre-start host hook that updates it if it already exists. Unfortunately, symlinks and hardlinks aren't working.Beta Was this translation helpful? Give feedback.
All reactions