Building WeTrust Spring
WeTrust Spring allows non-profits to accept crypto-currency easily. In our first month, we’ve raised over $40,000 for our non-profit partners.
The WeTrust team is proud of the success of our Spring Donation platform. We are incredibly impressed with our engineering team for how they managed to efficiently roll out and design such a robust platform.
We rolled out Spring on a tight timeline and wanted to ensure that our platform was free of bugs and could support an influx of donors on our site. One of the biggest challenges for our engineering team was conducting stress testing on a blockchain based product when specialized test software simply is not available on the market. In order to verify the product as thoroughly as possible to insure a useful and reliable platform, we needed a way to automate our tests to run independently and simulate how the blockchain would react under various conditions. This meant creating a test suite that would simulate the entire process of: opening a browser window, logging in, donating Ether on the Spring platform, and claiming the corresponding Shiba. Our process was very repetitive and involved many parameters to ensure all edge cases were covered. Some of the steps included:
- A full test suite was created that used MetaMask to automate the testing with a browser plug-in.
- A Puppeteer Node library was used to control a Chrome browser and to create traces for diagnosing issues.
- Dappeteer was used to allow our tests to use Metamask to create and fund accounts, generate transactions, and link up to different networks.
Using these tools, we were able to create a full suite of tests that ran many times a day with small changes between each test run. In this way, we were able to test a variety of donation thresholds and donation frequencies, as well as special situations such as first time donations. That being said, there were some difficulties when we tried testing very large donations or a series of consecutive donations. The problem was that we needed an unlimited amount of Ether to be able to run tests that would result in certain special Shiba Inu NFTs being given to the user. Unfortunately, neither the Ropsten nor Rinkeby testnets allowed users to play with an effectively infinite amount of Ether for testing. To solve this issue, we created our own private network that would allow us to access as much “test” Ether as we wanted.
Currently, there are not many dedicated tools to help dApp developers test what they’ve built. In the process of building Spring, we created many internal tools that help us. Tools such as a private testing network, or a node hosting service were necessary for conducting proper QA procedures. We plan to share these tools in the coming weeks to the WeTrust community and the greater Blockchain community. Stay tuned to learn more!
Follow us for updates, and visit spring.wetrust.io to see how we applied some of this learnings.