I think that is the ultimate solution, especially for out of wedlock births. In the meantime, any man who is told by a woman not married to him that she is pregnant with his child should demand a test at right before signing anything. A lot of women would be kept honest if the spector of automatic testing loomed.
What about going one step further - register the DNA of every male in the country, then every new male (by birth or immigration), and match up EVERY child at birth with its father? This would save HUGE amounts of welfare. It would make men act more responsibly. It would make adoptions a "sure thing" and eliminate baby mixups at hospitals. And it would help law enforcement efforts.
OK, for the law enforcement aspect we would have to register female DNA as well. Equal opportunity.
[No puns now about registering your gun!]