Live data from Hacker News

Bombadil: Property-based testing for web UIs

github.com

31–40 of 112 posts

Re: Bombadil: Property-based testing for web UIs

#32

Earlier quoted context omitted.

Let's start naming things after Iain Banks ships.

I am in support. In general he was really good with names I thought, they always had an otherwordly flair while being clear to pronounce. Skaffen-Amtiskaw, Anaplian, Elethiomel...

Yes!

"Just Another Victim Of The Ambient Morality" is one of my favorites.

Re: Bombadil: Property-based testing for web UIs

#33
post #23

Earlier quoted context omitted.

Interesting. What kind of properties are you checking?

I use quicktheories (Java) and generate a determistic random test scenario, then I generate input values and run the tests. This way I can create tests that should fail or succeed, but differ in the steps executed and in the order with "random input".

OK. What kind of problems do you hit from third-party libraries with that?

Re: Bombadil: Property-based testing for web UIs

#34
post #12
post #4

I'm a huge fan of property based testing, I've built some runners before, and I think it can be great for UI things too so very happy to see this coming around more. Something I couldn't see was how those examples actually work, there are no actions specified. Do they watch a user, default to randomly hitting the keyboard, neither and you need to specify some actions to take? What about rerunning things? Is there shr…

How effective is property based testing in practice? I would assume it has no trouble uncovering things like missing null checks or an inverted condition because you can cover edge cases like null, -1, 0, 1, 2^n - 1 with relatively few test cases and exhaustively test booleans. But beyond that, if I have a handful of integers, dates, or strings, then the state space is just enormous and it seems all but impossible to…

An important step with property based testing and similar techniques is writing your own generators for your domain objects. I have used to it to incredible effect for many years in projects.

I work at Antithesis now so you can take that with a grain of salt, but for me, everything changed for me over a decade ago when I started applying PBT techniques broadly and widely. I have found so many bugs that I wouldn't have otherwise found until production.

Re: Bombadil: Property-based testing for web UIs

#36
post #27

For most static UI surfaces, I probably wouldn't use it, but I can see a use case in this for testing generative UI workloads.

Sure, server-side or client-side generated UIs tend to have a lot more interesting complexity to test. But I do want to bring up that with the specification language being TypeScript, you can validate some basic properties even for statically generated sites. I wrote a spell checker for Bombadil that uses https://github.com/wooorm/nspell and a custom dictionary and found a bunch of old typos on my own blog.

Re: Bombadil: Property-based testing for web UIs

#39

This looks genuinely awesome! I've been thinking about how to do good property based testing on UIs, and this elegantly solves that problem — I love the language they've designed here. It really feels like model checking or something.

Thanks, glad you like it! Do you mean the temporal logic aspect of it?
Post reply on HN