Paternity testing should be done first to ensure that the person paying child support is actually the parent of the child in question. Even if a person has a child within a marriage, a paternity test should be done. Establishing paternity alleviates questions and doubts that often arise from relationships that are not bound by marriage.
When you raise a child you should take care of it because it is yours, or because you want to. This should be the same for child support. If a parent has any doubt that a child is not theirs, they should be able to prove it in a scientifically proven manner such as paternity testing.
You would figure the courts would already do that. I imagine money is the reason why they haven't. They could order the potential parents of the children to either show proof or go get proof. That way it does not come out of the taxpayers pocket. It would be kind of messed up for the kids to be awarded to someone who is not their biological parent.
In order for a court to justly award child support, the father must be determined. There must be evidence to support any ruling a court makes. This issue is no different. A court would not award a woman alimony if she was not legally recognized as a spouse through marriage or common law union. Each claim to the court must be substantiated with evidence, including child support claims.
I think that courts should order paternity testing before child support is awarded. I think it is important that a child is first legitimized as the kid of the person who might have to pay the child support. It would be a great injustice if somebody ended up paying for a kid that wasn't theirs.