End-to-end testing is a critical component of development reliable applications. It would seem to be in Shopify’s best interest to encourage app developers to add automated tests as to avoid regression/flaky behavior upon iteration.
There are some obvious reasons why this is difficult to do on the Shopify platform:
Logging into Shopify admin carries problems regarding captcha
Storefront testing could result in 429s
Probably more I’m not thinking about. The new customer account portal?
I’m not aware of any official documentation regarding best practices for automating e2e tests on Shopify, across Admin and storefront. My current approach has been to save a Chrome profile that already has auth cookies and that has been working pretty well, but I don’t know how long it will last before I have to replace that profile?
Is there a strategy that Shopify would prefer the community to adopt? This all feels vague and ambiguous, and I’m sure the community in general would appreciate some “official” guidance
That looks great for testing on the online store. Thanks for providing that info That seems plug-and-play with Playwright’s extraHTTPHeaders option.
Another big thing is that I want to be able to test my embedded app in Shopify Admin. I’m sure that’s a whole can of worms that probably doesn’t have an official solution. Does Shopify have any opinions on that?
Mock bridge does look very promising! I actually contributed to that project.
However I’m worried that there will be things that Mock Bridge won’t be able to do (i.e. Admin intents requiring considerable effort, who knows what else.) It’s my opinion that every feature should be able to have automated e2e tests, we’re feeling quite the QA stress in our team to ensure that we’re iterating safely.
Hey folks - Mock bridge is the best option for testing right now, but our internal teams are aware of the need from the community for better E2E testing for apps!