Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Charrua's avatar

Browser automation tests for external websites using puppeteer or similar tool

Hello, I need to test some functioning on multiple clients websites. These are e-commerce websites so I need to create some basic tests. Eg. open store page, add to cart product, go to checkout and verify some data.

As I need to deploy this solution on 5-6 websites, I was thinking on a Laravel app to manage data, have a history and send me some notifications to slack and email.

My first approach was thinking of scheduling some artisan commands to run everyday as "automated tests" on every website.

I've discovered rialto-php/puphpeteer A Puppeteer bridge for PHP, supporting the entire API. And I was thinking of using it for targeting those websites as I need to test with a browser.

Do you think this would be a good approach? Any ideas or alternatives? Maybe there's another tool to make this more easier.

Thank you.

0 likes
2 replies
Charrua's avatar

I know Laravel Dusk but it seems to be unsafe to run it on a production server, see:

https://laracasts.com/discuss/channels/testing/run-dusk-in-production-mode

And from docs I see:

If you are manually registering Dusk's service provider, you should never register it in your production environment, as doing so could lead to arbitrary users being able to authenticate with your application.

I would be really happy to use it but I'm not so sure... Any ideas?

Please or to participate in this conversation.