News for hackers. Stuff that matters.
Re:Ask HN: Would you be interested in POM generator for Sele... by clarle on Saturday June 11, 2022 @02:09PM (#31706657)
Aren't all E2E test frameworks flaky by default? When you're testing the end user experience that goes through multiple layers of services, I think that should be expected.

Would love to learn from your experiences on any better frameworks you might have used, though!

Re:Ask HN: Would you be interested in POM generator for Sele... by dude01 on Saturday June 11, 2022 @03:26PM (#31707437)
Yeah, Selenium is pretty flakey. I've been pretty happy with https://playwright.dev . Kind of the successor of puppeteer. At least, some of the same devs went from Google to MS. Here's an example where MS has better cross-browswer support than Google.
Re:Ask HN: Would you be interested in POM generator for Sele... by mesadb on Monday June 13, 2022 @12:33AM (#31721158)
I second this. I think playwright and cypress are the main ones you should use. We already implemented something for Cypress and looking to do the same thing for Playwright. It'll be pretty similar to this: cypress.preflight.com

Would love to get your feedback so we can add it :)

Re:Ask HN: Would you be interested in POM generator for Sele... by azemetre on Saturday June 11, 2022 @05:48PM (#31708781)
No not all e2e frameworks are flakey. Cypress allows you to intercept network calls with ease. The same can be done in Playwright as well.
Re:Ask HN: Would you be interested in POM generator for Sele... by jicea on Saturday June 11, 2022 @02:31PM (#31706872)
We’re using Hurl [1] at work for integration tests with very good success. We’ve eliminated false positive or flacky tests: it’s a simple tool that runs HTTP requests and you can add asserts on responses.

It’s as if you would test your app with curl, very fast and reliable. On the other hand, contrary to Selenium, there is no Javascript engine so you can only test the “raw” DOM or json response sent by the network (and not a DOM managed and rendered by a Javascript front end framework).

(Disclaimer: I’m one of Hurl maintainer)

[1]: https://hurl.dev

Re:Ask HN: Would you be interested in POM generator for Sele... by brimstedt on Saturday June 11, 2022 @04:02PM (#31707762)
Seems hurl is quite a different thing than browser automation though?

API/request level testing is great when appropriate, but testing what happens in browser won't be possible without using something like selenium, nightwatch or playwright

Re:Ask HN: Would you be interested in POM generator for Sele... by jicea on Saturday June 11, 2022 @04:15PM (#31707915)
Yes totally.

On the other hand, you can also easily test use cases where the browser is “helping” you (for instance, you want to test that your backend didn’t accept an invalid email, but your HTML form has HTML5 validation that prevents a user to enter an invalid email). Or you want to test HttpsOnly cookie attributes. But it can’t do UI integration tests.