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.
is there any introduction on how to use nbb and palywright?
@cookieu someone just posted a script today in the #nbb channel: https://clojurians.slack.com/archives/C029PTWD3HR/p1717882591531669
Thank you, hearing this made my day
Could you tell us some more on how you did this? As I have struggled a lot of E2E tests in the past.
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
bb and nbb are great ways to use Clojure for personal scripts, even if your company doesn't officially endorse it :)
I get a lot of data related tasks which bb is perfect for. I’ve even generated some PHP with it 😄
I know... I had this problem often enough in the past. brittle tests are the worst IMHO.
Genuine qn: playwright has a java api as well. Is there any reason why you use the js api instead of the java one?
I always saw Playwright as a JS thing. I’m also very familiar with JS/Node so I find the interop easier than Java
gotcha. Thank you! I may look into Playwright myself, so am interested to know more.