My truffle tests use several accounts and send tokens between them, so how would I run such a truffle test on testnet, e.g. Rinkeby?

  • Are account address hardwired or are you using in your tests the accounts array provided by truffle?
    – ivicaa
    Apr 4, 2018 at 5:58
  • @ivicaa The accounts array Apr 4, 2018 at 6:17

1 Answer 1


The procedure is the same like testing locally with a dev node or ganache/testrpc.

Basically, you will have to setup a local node synced with Rinkeby. Moreover, you'll have to create as many account as you need for your tests and load them with some ether, if they're going to create transactions.

In truffle.js you can also specify different networks. Using the --network <NETWORKNAME> parameter, you can switch between them. E.g. truffle test --network rinkeby.

  • How do I create accounts? Where do I specify them? Apr 4, 2018 at 6:24
  • If you're using geth you can call geth account new or via web3 console: personal.newAccount()
    – ivicaa
    Apr 4, 2018 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.