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 ...