Well the only way I'm aware of being able to do this is to make a backup of your production database and restore it onto the SQL server that will house the database for your test environment. Once that is done install SD & WF pointing it to the existing database and tell it to upgrade. You will then need to modify all the existing URLs in the database to point to the test server.
You may still have issue if as at certain points in the process message files are written to the file system, before being processed into the database.