There are several ways you can go and it will likely be a combination of several ones.
1 Use the backup/restore site utility installed with ArcGIS Server 10.2. This will create a backup of your services and all the server configuration. You can then restore the site on your test environment. There might be some issues with replacing the site machine as you are restoring it on another machine. This implies that you have all your services pointing to a shared location available from both machines. Never was able to make it work smoothly myself. Lots of people reported issues when going this way.
2 Use Python and arcpy to go into each directory in C:\arcgisserver\directories\arcgissystem\arcgisinput and go into the v101 folder within each service directory where you find the map document for which you will need to adjust the data path (if your services on the test machine will point to another location). You can parse either manifest.xml or manifest.json to find out what is the data source used for the map service. By knowing this, you edit each map document data source path and then publish them as services. Quite doable, but lots of work yet easy to do.
3 You take your service .mxd docs and publish them with arcpy as services (if needed, with modified data source path). Thereafter, you change services' properties by reading corresponding services on the dev machine (#instances, pooling, capabilities, permissions etc.). This is done by using the ArcGIS Server Administrator API scripting. There are many samples that will help list the service properties and then apply them to the corresponding services.
From my experience, the 3rd alternative is the best.