←back to thread

460 points flykespice | 1 comments | | HN request time: 0.249s | source
Show context
laerus ◴[] No.44324825[source]
What's missing from Hurl is snapshot testing. After using `insta` for testing APIs, I cannot go back.
replies(3): >>44324885 #>>44325117 #>>44325279 #
whilenot-dev ◴[] No.44325117[source]
What's your value proposition for snapshots and why can't that already be fulfilled with full body checks? https://github.com/Orange-OpenSource/hurl?tab=readme-ov-file...
replies(2): >>44325237 #>>44327029 #
1. adelineJoOs ◴[] No.44327029[source]
tbh, that seems pretty close to what I would call snapshot testing already. What people usually do with it is using it for more broadly compared to API testing (for example, I currently use it to test snapshots of a TUI application I am developing) - i.e. you can use it whenever your test is of the form "I have something that I can print in some way and that should look the same until I explicitely want it to look differently in the future". There are a bit more bells and wizzles - For example, it is nice that one does not have to write the initial snapshots oneself. You write the test, execute, it creates the resulting file, then you review and commit that - handy little workflow!