If you use UDC data connections with relative URLs, you could just deploy those to your test environment - that may be simplest.
Otherwise, I often save forms as source files and modify the data connections in the manifest.xsf when I'm moving things around. Of course, you need to save a backup of your template first if you decide to try that. And if your data connections are to lists / libraries, you'll need to get the correct GUIDs for those. Otherwise, you can simply walk through the data connection wizard again for each data connection and repoint it.