News for hackers. Stuff that matters.
Re:The Ingredients of a Productive Monorepo by anon7000 on Wednesday May 28, 2025 @05:21AM (#44114166)
There are also so many types of slow tests in web systems. Any kind of e2e test like Cypress or Playwright can easily take a minute. Integrations tests that render components and potentially even access a DB take many times longer than a basic unit test. It doesn’t take very many of the slow group to reaaaly start slowing your system down. At that point, what matters is how much money you’re willing to pay to scale your build agents either vertical or (more likely) horizontally
Re:The Ingredients of a Productive Monorepo by CamouflagedKiwi on Wednesday May 28, 2025 @08:53AM (#44115499)
Well no, it's just not build agent size; if you have 10 tests that take 3-4 minutes each, you're not gonna go any faster than the slowest of them (plus the time to build them, which is also typically bad for those kinds of tests, although a bigger build agent may be faster there). Having a system that can avoid running the test for many PRs because it can prove it's not affected means in those cases you don't have to wait for that thing to run at all.

Although, time is money, so often scaling build agents may be cheaper than paying for the engineering time to redo your build system...

Re:The Ingredients of a Productive Monorepo by bluGill on Wednesday May 28, 2025 @09:09AM (#44115634)
I have hundreds of tests that take 15-30 mintues each. These tests tend to be whole system tests so there is no way useful way to say it won't touch your change (75% will). Despite an extensive unit test suite (that runs first) these tests catch a large number of real production bugs, and most of them are things that a quicker running test couldn't catch.

Which is to say that trying to avoid running tests isn't the right answer. Make them as fast as you can, but be prepared to pay the price - either a lot of parrell build systems, or lower quality.

Re:The Ingredients of a Productive Monorepo by sampullman on Wednesday May 28, 2025 @08:57AM (#44115541)
It's a bit of a tangent and I agree with your point, but wanted to note that for one project our e2e tests went from ~40 min to less than 10, just by moving from Cypress to Playwright. You can go pretty far with Playwright and a couple of cheap runners.
Re:The Ingredients of a Productive Monorepo by CamouflagedKiwi on Wednesday May 28, 2025 @10:42AM (#44116546)
I appreciate the point, but I've heard this kind of thing several times before - last time around was hype about how Cypress would have exactly this effect (spoiler: it did not live up to the hype). I don't believe the new framework du jour will save you from this kind of thing, it's about how you write & maintain the tests.
Re:The Ingredients of a Productive Monorepo by sampullman on Wednesday May 28, 2025 @09:14PM (#44122143)
I wish I had hard evidence to show because my normal instinct would be similar to yours, but in this case I'm a total Playwright convert.

Part of it might be that Playwright makes it much easier to write and organize complex tests. But for that specific project, it was as close to a 1 to 1 conversion as you get, the speedup came without significant architectural changes.

The original reason for switching was flaky tests in CI that were taking way too much effort to fix over time, likely due to oddities in Cypress' command queue. After the switch, and in new projects using Playwright, I haven't had to deal with any intermittent flakiness.

Re:The Ingredients of a Productive Monorepo by aoeusnth1 on Wednesday May 28, 2025 @10:47AM (#44116590)
Or spend on time building test selection systems…