What books on software testing / TDD / writing better automated tests would your recommend? #asknostr
Discussion
The tech may be outdated, but the concepts aren't Cem Kaner is an amazing man.
Clean Craftsmanship
From: Egge<-DerekRoss at 05/23 01:27
> What books on software testing / TDD / writing better automated tests would your recommend? #asknostr
nostr:npub1mhcr4j594hsrnen594d7700n2t03n8gdx83zhxzculk6sh9nhwlq7uc226 nostr:npub19mun7qwdyjf7qs3456u8kyxncjn5u2n7klpu4utgy68k4aenzj6synjnft
Egge, Uncle Bob,
Can yall recommend an expert, pain enjoying dev for the job of nostrCI?
https://github.com/nostrability/nostrability/issues/11
github.com/nostrCI
This sounds pretty interesting to me. I want to be able to put a nostr client into "test mode" which opens up a socket that the client listens on. The CI acts as a relay and tells the client to use only that relay. The CI sends commands to the client that spur it to perform certain actions; and the client uses the CI as a relay to perform those actions.
Interesting.
From: elsat<-DerekRoss at 05/24 13:35
> nostr:npub1mhcr4j594hsrnen594d7700n2t03n8gdx83zhxzculk6sh9nhwlq7uc226 nostr:npub19mun7qwdyjf7qs3456u8kyxncjn5u2n7klpu4utgy68k4aenzj6synjnft
>
> Egge, Uncle Bob,
>
> Can yall recommend an expert, pain enjoying dev for the job of nostrCI?
>
> https://github.com/nostrability/nostrability/issues/11
>
> github.com/nostrCI
CC: #[4]
CC: #[5]
Exactamento!!
What do you think of nip-10 CI test mode as your first #nostrCI test run Uncle Bob nostr:npub19mun7qwdyjf7qs3456u8kyxncjn5u2n7klpu4utgy68k4aenzj6synjnft
https://github.com/nostrability/nostrability/issues/38
👀
Great plug haha. Bought and almost 50% through. Loving it so far.
However I am wondering about statements like “The goal of TDD is to create a test suite that you would trust with your life.”
Is that really possible? I can only think about so many edge cases. Never all of them. If I refactor a module and see all green I might be confident in that system, but what happens if my refactoring causes an edge case to error, that used to just slip through? Won’t it re-introduce the fear of touching the old code?
fuzz tests fill most of the gaps and find you problems
good real world data sets can stress test your code too, nostr:npub12262qa4uhw7u8gdwlgmntqtv7aye8vdcmvszkqwgs0zchel6mz7s6cgrkj provided me with a gigadump of 180Gb of event data and it uncovered several bugs in my json parsing code (and revealed that maybe over 1% of all events are malformed so far)
From: Egge<-DerekRoss at 05/26 10:57
> Great plug haha. Bought and almost 50% through. Loving it so far.
>
> However I am wondering about statements like “The goal of TDD is to create a test suite that you would trust with your life.”
>
> Is that really possible?
No. It's an asymptotic goal. You'll never get all the way there; but you can get to the point where you trust the test suite enough to deploy the system without fear.
>...what happens if my refactoring causes an edge case to error, that used to just slip through? Won’t it re-introduce the fear of touching the old code?
A refactoring is a small change to the code that improves structure without changing behavior. So, theoretically, a refactoring will not create such an "edge case". Realistically, however, such things _do_ occur. You have to be careful.
Still, it is possible to create a test suite that robustly resists most such "edge cases" and that you trust well enough to deploy without fear.
CC: #[4]