EthereumJS

At times, it is not possible to test on the testnet and mainnet is obviously not a place to test the contracts. Private net can be time-consuming to set up at times. EthereumJS' TestRPC comes in handy when quick testing is required and no proper testnet is available. It uses EthereumJS to simulate the Ethereum geth client behavior and allows for faster development testing. TestRPC is available via npm as a Node package.

Before installing TestRPC, Node should already have been installed and the npm package manager should also be available.

TestRPC can be installed using this command:

$ npm install -g ethereumjs-testrpc 

In order to start testrpc, simply issue this command and keep it running in the background and open another Terminal ...

Get Mastering Blockchain - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.