A sandbox is a copy of your application in which you can make changes without making these changes directly in your live application.
After reading this article you will know:
-
What a sandbox is
-
Why you should use them while developing
-
How to copy data between environments
We've also created a video that explains sandboxes:
Sandbox?
A sandbox is a copy of your application in which you can make changes without making these changes directly in your live application. This way you can build new features and test them before merging them into your live application. Keep in mind, however, that creating a sandbox will render the existing application uneditable until there aren't any sandboxes left.
Why use them?
If your application is already in use by clients or is undergoing major changes you don't want to break something in the existing application. You can add a sandbox, build in this sandbox, test the new feature, and if you like the results merge it to the existing application. If anything goes wrong you can just delete the sandbox and start over while still having the existing application intact. This way your existing application won't risk any harm.
Copy data to a sandbox
When creating a sandbox only data from settings models is copied to the new sandbox. You can check this option on a model. Beware! A settings model works both ways, when you change data in the sandbox it will also change in the live environment after merging. You can view how to do this here. Another option is using the export and import function to move data around between environments. You can view information about this here.
Configurations
Configurations in your application are mostly used to set authentication for webservices. Configurations are environment-dependent. This means that their value is different in each application in your DTAP-street. When you create the configuration in your sandbox and merge this, the configuration will be merged empty. You will have to assign its values again in the original application. Because configurations are environment-dependent it is possible to have the real authentication and test authentication setup at the same time between environments.
Note
-
Watch out for mail actions, you can still send out emails in your sandbox. You don’t want to send your customer an invoice with test data!
-
Create test data for different cases in your application to quickly test if new features don’t interfere with the old ones.
-
Configurations will be included in a merge, but the value of the configuration is not included. You have to add the value or content of the configuration for each environment separately.
Ready to create your sandbox? Read the Using a sandbox article here.
Read how to use sandboxes for your DTAP-street here.