46 cromosomes, 23 pairs. (IIRC). For each pair, son gets 1 from dad, 1 from mom. A father passes on one of each pair randomly to offspring. (Sperm contains a 23 piece half-set.)
So genetic testing would find husband is related, but not the father.
Sex is determined by the one mismatched pair, a woman has XX and a man, XY
For example, let’s say it’s a girl. If husband was father, his little princess would have his X (which is ne of husband’s mother’s 2 X’s) and one of mother’s 2 X’s. A son would have his Y and one of mother’s 2 X’s. Offspring of son and mother would have:
Boy - Father/son’s Y chromosome, one of mother’s 2 X’s.
Girl - One of mother’s X’s and son’s X - but son’s X is one of mother’s. So Girl may have X1X1, or X1X2 of mother, if X1 is what the son got.
Statistically, a child would be 1/4 father’s chromosomes and 3/4 mother’s… so about 11 or 12 father, 34 or 35 mother. A DNA test looks for certain sites on various chromosomes to match. Likely, a basic paternity test would fail. (The odds of being that lucky to get the right set of chromosomes when you are talking “all of 23” are in the neighbourhood of 2^23, or one in millions) I don’t know which sites on which chromosomes are checked, IIRC them mention a 16-site match, so odds are probably about 1 in 65,000 to get it right if that’s 16 different chromosomes. It might reveal a close enough match that the husband would beat the crap of all eligible male relatives just to be safe.
A more advanced test, including the mother’s DNA, will make the identity of the culprit obvious. The cheap DNA tests do not do this, they only mention the paternity values - "this allele was 10 for the father, 10 for the child.This was 6 vs. 5; this was 3 vs 3; etc. If there is any mismatch, the paternity is not correct.
You can get relative tests (i.e. sibling, grandparent, etc.) from these too. They tell you whether enough of a match exists to support the suspected relationship. Read the FAQ from various testing lab sites.
Of course, proper medical/forensic DNA testing will probably get more detailed and specific.