Eventually, someone is going to come up with an inexpensive genetic test, and our whole society is going to fall apart at the seams.
You might be right!
I read in a Sci-fi story once of a 'at home DNA tester' that everyone had, just like a thermometer.
And it was for situations just like this...bring baby home, test DNA, proceed from there.
On the contrary, it will enforce moral codes if a love-child cannot be hidden. The stakes of adultery are raised.
How cheap do you want? A couple hundred dollars is what they cost, but you can't use the results in court. Although I did hear of one man taking the cheap test results to the child support agency and getting his child support obligation cut.
They don't even need blood to work, just scrape some cells from inside the cheeks (mouth cheeks) onto a little swab and send them to be tested.
You can even use hair you pulled from a comb or brush, but I think those are more expensive.
But if you do it, and the test comes out negative, and your wife ever finds out about it, you're mud.
Only becasue it already has.
The father is the mother's husband. That has been the law for centuries and still is and should be.
That society has fallen apart (all sorts of unwed mothers) and refusal to take responsibility on the part of men (impregnating women who are not their wives or whom they do not marry) would cause the problem.
If you are married to a woman, her children are yours no matter if the biological progenitor is another man.
But we no longer believe in marriage or responsibilty for male heads of houselds.