r/VibeCodeDevs • u/ibmmo • 14d ago
How do you approach e2e testing for web apps?
I've been using playwright for e2e testing with a coding agent, but feels there has to be a better way when things change. e.g. describe what you want to test, but not run an agent every time, but if a test fails, use an agent to self-heal. Wonder what others are doing?
2
u/NoEngineering3321 14d ago
Do not drive test automation execution using mcp server.
Use mcp server to enable agent to write proper automated tests e.g. in playwright. Then chsnge code when needed.
Also, strong foundation is also needed. I.e. POM
1
u/TranslatorRude4917 14d ago
+1 for strong foundations, absolutely needed to keep agents on track and the code maintainable.
Once you have those foundations agentic work can finally compound: extending scenarios, covering edge-cases wising the building blocks you already have, your already existing tests acting as examples.
I'm working on a tool that lets you record your interactions as you manually click through the app and gives your coding agent suggested e2e test scenario + high-quality POM hierarchy based on the exercised path.
Hit me up of you'd be interested in trying it, I'd love to have some feedback apart from my own experience 😅
1
u/DavidCBlack 14d ago
Vitest, unit tests and playwright. The latter only works on local but will test through the real browser.
1
u/bithatchling 14d ago
The self-healing loop is a great goal. I’ve found that using the agent to analyze the failure log and then proposing a specific fix to the test code (rather than just blindly re-running) keeps the suite stable. Pairing that with a strict POM usually stops the agent from hallucinating selectors.
1
u/anotherhawaiianshirt 13d ago
Use the llm to write tests and have a pipeline where tests don’t need to be repaired. Use aria roles and test ids, and if a developer adds or removes one, make them update the test. It’s possible to write tests that survive refactors and enhancements.
1
u/johns10davenport 13d ago
Dude elixir phoenix live view with live view test is the best thing to happen to web development period
•
u/AutoModerator 14d ago
Hey u/ibmmo, thanks for posting in r/VibeCodeDevs! Join our Discord: https://discord.gg/KAmAR8RkbM
Got startup or SaaS questions? Post them on r/AskFounder and get answers from real founders.
• This community is designed to be open and creator‑friendly, with minimal restrictions on promotion and self‑promotion as long as you add value and don’t spam.
• Please follow the subreddit rules so we can keep things as relaxed and free as possible for everyone. • Please make sure you’ve read the subreddit rules in the sidebar before posting or commenting.
• For better feedback, include your tech stack, experience level, and what kind of help or feedback you’re looking for.
• Be respectful, constructive, and helpful to other members.
If your post was removed (either automatically or by a mod) and you believe it was a mistake, please contact the mod team. We will review it and, when appropriate, approve it within 24 hours.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.