How to create a testing environment in Sanity without affecting the live application.
7 replies
Last updated: Jun 29, 2023
J
Hi, everyone!
My team is new to Sanity, and are taking over the project from our previous developers. We are building new features to our app, and are copying our current dataset in order to create a testing environment for new functionality. Since they are new to Sanity, they are worried that a new dataset for testing, will ruin or disturb the current live application, that is supposed to go on as is while we build and test all new functions.
So the question is, how do we make sure that the current live app is not affected by testing and developing in the cloned dataset?
My team is new to Sanity, and are taking over the project from our previous developers. We are building new features to our app, and are copying our current dataset in order to create a testing environment for new functionality. Since they are new to Sanity, they are worried that a new dataset for testing, will ruin or disturb the current live application, that is supposed to go on as is while we build and test all new functions.
So the question is, how do we make sure that the current live app is not affected by testing and developing in the cloned dataset?
Jun 29, 2023, 9:17 AM
S
export your data from your dataset, and import it to a new dataset, nothing in the live app should change
Jun 29, 2023, 9:31 AM
J
Thank you for the reply! That is what my understanding was as well, but their concern apparently is this: "maybe you are not aware of Sanity(Desk), single piece of wrong code can crash the sanity desk. That is the main reason I don't want to touch the live project" And they want to set up a whole new, cloned, project. Is this necessary? Is this an actual possibility, that it will crash the whole project?
Jun 29, 2023, 9:36 AM
S
Well as long as you dont deploy the changes it shouldn’t matter to the editors
Jun 29, 2023, 9:55 AM
J
Okay, so what they are trying to do is basically making a test environment to build and test new functionality, and this functionality is to be used in a fully redeveloped (new) app, that is currently under testing. There will be new functionality added to the Sanity studio, that will not apply to the current live application, only to the new one. Are there any issues to be aware of here, or will it not matter to the current app, as long as nothing is actively deployed to that app?In short: Can we keep one dataset going for the live application, while having the other dataset with added functionalities to an app which is under testing?
I suppose we would need to actively change which dataset the studio is working from, every time we need to do editing in the current app?
I suppose we would need to actively change which dataset the studio is working from, every time we need to do editing in the current app?
Jun 29, 2023, 10:11 AM
S
yup the schema is completely separate from the dataset
Jun 29, 2023, 10:53 AM
S
basically your dataset is only stored json documents
Jun 29, 2023, 10:53 AM
J
Okay, superb! Thanks for helping out🙌
Jun 29, 2023, 11:02 AM
Sanity– build remarkable experiences at scale
Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.