Frustrated by verbose #ComsWasm smart contract tests?
Today I would like to introduce to the @cosmos community the Robot Pattern for stable, readable, and maintainable tests.
If you are a developer, you don't want to miss this one, I promise 😎
Let's dive in! 🧵
1/
From testing 101:
The QA team checks app functionality via the UI. The tester doesn’t care how the application is written as he just interfaces with the UI.
In case of smart contracts, the tester checks at the frontend to interact with the contracts. #smartcontract#testing
2/
So for the tester to check say an asset swap on a #DeFi protocol, it performs the following actions:
• Visit the frontend
• Go to swap page
• Connect wallet
• Select Asset X from the dropdown
• Enter amount of Asset X to swap
• Click Swap
• Verify swap was successful
3/