If you’re a test engineer and you’re keen to get involved in Web3, it can be hard to know where to start. There are literally thousands of tutorials aimed at blockchain developers but few so far that are focused on testing.
A few people have asked me questions about this recently, so I thought it might be useful to write a post. Please add your thoughts/criticisms/ideas in the comments.
This is not a tutorial. Instead, it’s a starting point, with resources you can use to start exploring this new and expanding sector.
It helps if you’ve already got some interest in crypto or decentralized technologies and are comfortable using a wallet and interacting with token economies, but the great news is that with some curiosity and application, the right resources are only a few clicks away.
First of all, what will you actually be testing? This post specifically covers projects that are decentralized applications (dApps) built on Ethereum, or EVM (Ethereum Virtual Machine) compatible networks.
There are various jobs that involve testing/quality assurance at the protocol level, or testing applications built on other networks written in different languages, but they are outside the scope of this post.
If you have had no exposure to Ethereum at all, read
Then read
You’ll also need to be able to run a dApp locally so you can test it against a simulated mock blockchain. Frameworks such as
Want to play with the simulated blockchain on its own to start with? Read the documentation and watch a video tutorial for
The processes are going to be similar for any kind of consumer-facing dApp, whether it’s mobile or web. Remember that some wallets don’t work on mobile, and vice versa.
Put yourself in the user’s shoes and imagine seeing and using your application for the first time. Does the user interface and general user experience make sense or does it assume pre-existing knowledge of the Web3 ecosystem? This is a new area of technology and users will need more signposting and guidance than usual.
You will also need to have a wallet such as Metamask installed and practise switching between networks, adding accounts and importing tokens.
Do not neglect the basics, such as
The sort of things you need to think about are:
Once you have tested the application locally, You will probably need to use a testnet such as Ropsten or Rinkeby. This is like a scaled down version of the live Ethereum network, which has its own (valueless) tokens. To test transactions on one of these test nets you will need to get some test ETH (from a faucet like
Other tools you should know about are
Gas fees (the price you have to pay to make a transaction on Ethereum) are currently a pain point. When gas fees are high, you should think about your dApp’s requirements and whether it makes business sense for users to carry out certain transactions. EthGasStation provides a useful overview of current and predicted gas fees.
I cannot overstate the importance of a well written, comprehensive test suite. Developers should write their own contract tests, but you should be able to read the tests and suggest alternative test cases that they may not have thought of.
For example, here are the tests for the
Working with the rest of the development team to identify edge cases and improvements in coverage should be part of the test engineer’s job. Coverage tools such as
For end-to-end automated testing, it can be tricky because many popular testing frameworks make it difficult to access elements outside the DOM, such as wallets in browser extensions.
Dappeteer is a fork of Puppeteer that actually incorporates Metamask interactions. The original version of Dappeteer is no longer maintained, but there is a fork
Most decentralized projects tend to be open source, and bug bounties are a popular way to engage the entire community in improving the quality of a project. This is the one we run at
Bug bounties can never be a substitute for good testing practices, but they are an essential tool in modern quality processes for Web3 projects.
Read
Also Published Here