A testnet allows developers to upload and interact with smart contracts, without paying the cost of gas.
During the development of your smart contracts it always makes sense to test it on a testnetwork. This gives you the agility and mobility to try out things with your smart contracts without deploying them on the main network.
With that said, it is important to understand what you get and don’t get when deploying your contracts on a testnet. Failing that, you might very well end up putting brittle solutions on the main net.
- A testnet node needs to sync and store much less data (depending on the network)
- Testnets are faster with transactions, and are almost instantaneous
- Deploying contracts or making transactions requires test ether, which has no value and can be acquired for free from several “faucets”. Faucets are like banks for test ether which is of no real value
- Testnets are public blockchains with many other users and contracts, running “live.” In other words, they do to a large extent simulate the main network
- You can’t test security against real life scenarios, as there is nothing at stake. The ether on the test network is free
- There are some aspects of a public blockchain that you cannot test realistically on a testnet. These are things such as:
- Transaction fees. The transaction fees are not considered on testnet, since gas is free. Albeit transactions are charged a fee
- Network congestion is nothing like what the mainnet experiences. Hence transaction speeds can’t really be estimated
Testnets are an important tooling to the success of the blockchain ecosystem. There are three testnets that are common in the Ethereum space: Ropsten, Rinkeby and Kovan. Ropsten most accurately simulates the Ethereum blockchain as it uses the PoW consensus mechanism, where the others use PoA.
It remains difficult to be able to test transaction fees and speed because of the difference in size of the blockchains in test and main network. Furthermore, the fact that the ether on a testnet is of no value, transaction fees are subsequently not considered.
Andreas M. Antonopoulos, G. W. (2018). Mastering Ethereum. Github.
by Mthokozisi Myeza