how to set up an integrated test environment for Desk and CRM

how to set up an integrated test environment for Desk and CRM

Zoho CRM has the sandbox feature, while Zoho Desk has not. The best alternative to a sandbox for Zoho Desk seems to be to create a dummy department (and name it sandbox or something) on your paid account or to use a Desk trial account. 

However, it is not clear to me what steps one needs to take to build a fully working test environment where the "test-crm" integrates with the "test-desk" and where the set-up of the test environment doesn't affect the live-CRM or the live-Desk. That should also be true for widgets in CRM that talk to Desk and vice versa: they should work both in the live and in the test-environment, without the need to maintain two code-sets. At the worst, it should be possible for the widget code to detect whether it is invoked in the live or in the test system, but again, I don't know what the API is for that.

Anyone who has some good advice on setting up an integrated test environment for the combination of Desk and CRM?

Tnx