The best approach for publishing InfoPath forms across multiple environments (e.g. DEV/TEST/PROD) is to publish you connections to the Central Managed Connection Library (CMCL) in Central Admin (under General Application Settings>InfoPath Form Services>Manage data connection files).
This will also require that you publish your template ...