Hey everyone! I’m big on test-driven development and I’ve been working with Go for HTMX projects. I noticed a lot of people were using browser automation for testing, but that always felt slow and clunky to me. So I made my own headless browser called Gost-DOM.
It’s pretty cool because it skips the TCP stack, which makes it super fast. It can run JavaScript with a built-in V8 engine and lets you do isolated or parallel tests. You can mock dependencies just like you would with regular Go testing.
Right now it’s still early days, but it can already:
- Load HTMX websites
- Handle clicks and other interactions
- Work with boosted links
- Deal with HTMX-managed forms
I’d love to hear what you think or if you have any questions about it. Has anyone else tried making custom testing tools for HTMX apps?
Interesting project! I’ve been working with HTMX quite a bit lately and testing has definitely been a pain point. Your Gost-DOM approach sounds promising, especially the performance gains from skipping the TCP stack. I’m curious how it handles more complex HTMX interactions like out-of-band swaps or history restoration. Have you stress-tested it with large applications yet?
One challenge I’ve run into is accurately simulating server-side events in tests. Does Gost-DOM have any features to help with that? It would be great if it could mock SSE connections.
I’d be really interested in seeing some benchmarks comparing Gost-DOM to Selenium or Puppeteer. If the speed difference is significant, I could see this becoming a go-to tool for HTMX testing. Keep up the good work!
yo that sounds dope! i’ve been strugglin with htmx testing too. gost-dom could be a game changer if it works as good as u say. how’s it handle stuff like websockets and sse? those always trip me up in tests. might have to give it a try on my next project!
Wow, Gost-DOM sounds like a game-changer for HTMX testing! I’ve been wrestling with similar issues in my projects. The speed boost from skipping TCP is impressive. Have you considered adding support for WebSockets? That’s been a major pain point for me.
One thing I’m curious about - how does Gost-DOM handle complex DOM manipulations? I’ve had trouble with other tools accurately reflecting the state after multiple HTMX swaps.
Also, any plans to open-source it? I’d love to contribute or at least peek under the hood. Testing HTMX apps has been such a headache, so a tool like this could really streamline my workflow.
Keep us posted on the progress. This could become a go-to solution for many developers working with HTMX!