gratitude

lemuel 2024-05-30T09:05:54.767529Z

Thanks to @borkdude for nbb I realised today that I’ve been using nbb + playwright for a series of critical tests for over a year now without many issues. All previous attempts at e2e testing were painful and eventually abandoned. Without nbb and the repl I would never have had to motivation to start or continue with it.

🧠 2
13
❤️ 11
7
2024-06-09T15:16:52.885849Z

is there any introduction on how to use nbb and palywright?

borkdude 2024-06-09T15:19:30.043669Z

@cookieu someone just posted a script today in the #nbb channel: https://clojurians.slack.com/archives/C029PTWD3HR/p1717882591531669

🙏 1
borkdude 2024-05-30T09:24:05.848879Z

Thank you, hearing this made my day

👍 1
thomas 2024-05-30T09:52:03.016399Z

Could you tell us some more on how you did this? As I have struggled a lot of E2E tests in the past.

lemuel 2024-05-30T10:22:12.914209Z

We used Selenium with Java and then PHP running e2e tests through CI but there were so many failures the amount of time spent on maintaining the tests wasn’t worth it. It also fell to me to maintain tests because nobody wanted to touch them. It was always painful writing the tests and trying to fix issues. Management decided to ditch e2e altogether and we’ve ended up with a lot of unit tests and feature tests which are SLOW and don’t test critical parts of the app properly in my opinion (too many mocks). I started to build critical e2e tests in a bottom up, repl-driven approach while working on features and over time I’ve ended up with a nice test suite. I run tests in the repl as part of my test process before shipping features and it has caught a number of issues. I also use it during code reviews. I did want to get it hooked up to CI but Clojure/Script are not approved languages anymore. It’s PHP or the highway! I don’t think PHP is too bad these days but it doesn’t come close to Clojure/Script for interactivity. I would never have bothered trying to do e2e in PHP again

👍 1
👍🏼 1
💯 3
borkdude 2024-05-30T10:36:26.383859Z

bb and nbb are great ways to use Clojure for personal scripts, even if your company doesn't officially endorse it :)

➕ 1
lemuel 2024-05-30T10:42:44.663279Z

I get a lot of data related tasks which bb is perfect for. I’ve even generated some PHP with it 😄

😆 6
thomas 2024-05-30T11:33:00.768439Z

I know... I had this problem often enough in the past. brittle tests are the worst IMHO.

jf 2024-06-06T01:28:53.820019Z

Genuine qn: playwright has a java api as well. Is there any reason why you use the js api instead of the java one?

lemuel 2024-06-06T04:49:30.669809Z

I always saw Playwright as a JS thing. I’m also very familiar with JS/Node so I find the interop easier than Java

jf 2024-06-06T04:51:35.150239Z

gotcha. Thank you! I may look into Playwright myself, so am interested to know more.