While I was working on the contract side of AMM I needed to run different tests in isolation. I had to reset the state of the contracts by deploying the whole stack of contracts over and over for each test. Meanwhile the core devs provided us an awesome feature for rolling back to a certain block height, so I’m able to discard the effects of some tests in order to use just the initial part which is common for multiple tests. I made a recording of such test running:
From minute 0 to 1:13 you will see the contract deployments. From 1:13 on I run the tests and after each test the state of the chain is rolled back in order to run independently from the previous tests and have a clean initial deployment to rely on in subsequent tests.