Let us not rush and do a legal paternity test!! First and foremost, are you sure you actually need a legal test? Will you definitely be going to court to fight over child custody, child support and such related issues? Are you even sure the child is not yours?
The first question to answer is in fact: Am I sure this child is not mine? Do I just have a doubt?
The issue with a legal test for paternity is that it is far more expensive than an at home paternity test. Also, the procedure for a legal DNA test is more tedious and requires documentation, identification of all people taking part in the test and DNA samples taken by a neutral third party like a doctor or nurse or lawyer. So you might do a legal test which will give you a court admissible result but perhaps the result will not require court action! You might have suspected the child might not have been yours, but the DNA test result shows clearly that this is your child. In such cases you might have paid the added cost of a legal test for nothing. Legal paternity testing and court ordered paternity testing are not quite the same thing. A legal test gives you court admissible results but it is not necessarily ordered by a judge.
Luckily you can do an at home test for paternity- this is much cheaper but offers the same degree of accuracy and reliability as a legal test. Once you have the results of your at home test you can decide whether to do a legal paternity test or not.