I can manually test a worker that returns HTML using e.g
wrangler preview --watch --env local --url https://mydomain.local
… and mess with it in the Testing tab, trying out valid/invalid paths.
But I’d like to automate the testing using something like webdriver.io. Yes, it’s technically for Node but it can be used for any browser testing.
What base URL do I use to run those tests? I see the default domain it uses https://example.com and that can be overridden using the --url flag, as above, however in the browser it’s not simply that domain. It’s the huge one starting https://cloudflareworkers.com/?.… and then with a long series of characters with a wrangler session ID. And so the CI process can’t find https://mydomain.local
. As it’s not running on that domain.
How do other people do this?
Thanks!