It's probably something more like the wheat and barley was waste and they peed in the same area they dumped their waste.
One family noticed their barley was sprouting, while another's didn't. Shortly after, the family with the sprouts had a baby. It could have taken generations for this to be actually used as a pregnancy test.