The future of test mode is here, and we’re excited to announce a private beta of Sandboxes! Sandboxes are isolated testing environments for Stripe integrations. With Sandboxes, you can more confidently test and deploy Stripe integrations by testing in separate sandboxes with granular access controls. Sandboxes can easily be organized for teams or development environments. Your existing test mode data is still available to you while getting started with Sandboxes.
How will Sandboxes make your testing process better?
We already have the opportunity to copy live configurations at the Sandbox creation, but is it planned to be able to copy objects between Sandboxes? Maybe I’d like to work in different environments, but re-creating objects such as payment methods or customers among Sandboxes might be a hassle. It’s just a quality-of-life improvement that could help.
One way I’ve found Sandboxes beneficial is the ability to test out new functionality we want to play around with without impacting our Test Mode system. Also found having to go through the set up process quite useful as I’ve never had to do this before as everything was already set up and ready to go before hand. So avoids losing knowledge.
We just set up a sandbox for E2E testing (with the goal of a 1:1 relationship between test runner and registered webhook listener), and it looks like it is working as expected - all our existing tests that previously ran against a “non-sandboxed test account” remain green. But I have a question about how to maintain a test environment that is as close as possible to a production environment. With the “non-sandboxed” account, it is my understanding that the test-mode account and non-testmode accountID are the same, and besides the “test mode” flag, the accounts are equivalently configured because they are the same account. But is it possible to ensure a sandboxed acct “S” closely mirrors an existing production account “P”, or for changes in P to cascade into S, or to get a diff between P and S, or something along those lines?
I think that the set of delivered webhooks can differ between a sandbox account and a production account, and I imagine it’s possible that there are other twiddlable knobs that might get out of sync and cause tests to produce false positives and/or false negatives.
I see a few issues raised about the ability to copy data from account A to account B, and this is a similar concern, but the “data” here is configuration rather than objects/entities.
Ultimately what we would like to avoid is someone changing production configuration, and the test environment(s) not reflecting those changes. We’d appreciate any thoughts Stripe has on this.