noice. Btw recently I've learnt about random testing and I'm pretty proud of this
Wrote tests for the "applesauce-relay" package and only found one bug, now I'm 100% sure it works and the code does what it says it does :)
https://github.com/hzrd149/applesauce/tree/master/packages/relay
Discussion
what is it, does it spam the relay with random requests to see if something breaks?
nostr:nprofile1qqswwud0pvzu362lehm0av6sq4zd97cue5uy0z8f7jgtk0hz368dvmcprdmhxue69uhhw6r9v96zu6rpwpc8jarpwejhym3wvdhj7qgawaehxw309ak82mnrdp3x77pwwdskuerhd93kstnxv9ex6tcfwvfpm has his thing that does something conceptually similar
The tests I have aren't random because then its difficult to meaningfully communicate the outcome. Instead it each NIP had a test suite, and then each test in the suite attempts to obtain samples from relays and then uses the uses those samples to construct filters than satisfy the respective test.
I picked the word “conceptually” very carefully 😉
They are conceptually much different 😂
Both useful on different ways. Randomness is great in fuzz testing and finding edge cases that are difficult to find without randomness, the auditor I wrote is better for unit testing known vectors to validate expected behaviors.
And to be clear, they are complimentary and so is relevant. Just wanted to clarify the functionality.
yes. random requests, random events, random filters, random disconnects...
I've found so many weird bugs, like the unregistration queue filling up causing all threads to be blocked
We were using them about 10 years ago. We called them test monkeys, because they just randomly bang on the keyboard.
They never find anything that an intelligent IDE wouldn't find, tho, and they produce a lot of garbage, so we don't use them.