What is the most agile way to fully integration test smart contract code? I've seen people use shell, etc. Is there a golden standard somewhere?
Here are two approaches which are the most versatile and which can help you cover all your test scenarios.
Make a testing dApp
Deploy your contract locally or to a network and then interrogate it using a variety of commands. You write these commands with Web3. Here is one example that interrogates events and contract calls.
Do live testing
With this approach you can deploy stubs to mainnet with all your test fixtures. And you can orchestrate the entire integration between deployed contracts that you need for integration testing. I will demonstrate how you can do this without spending any gas.
- Write all of your testing code, including stub deployment and assertions.
- Wrap this in a constructor function of a contract
- Compile this contract to byte code
- Run ESTIMATEGAS on that byte code
This live testing technique is documented thoroughly at https://0xcert.org/news/live-testing-smart-contracts-with-estimategas-william-entriken-tadej-vengust