truffle test <test_file>

Run JavaScript and Solidity tests


test_fileName of the test file to be run. Can include path information if the file does not exist in the current directory


--compile-allCompile all contracts instead of intelligently choosing which contracts need to be compiled
--compile-all-debugLike --compile-all, but compiles contracts in debug mode for extra information. Has no effect on Solidity <0.6.3
--network <name>Specify the network to use, using artifacts specific to that network
--verbose-rpcLog communication between Truffle and the Ethereum client
--show-eventsLog all contract events
--debugProvides global debug() function for in-test debugging. Usable with Javascript tests only; implies --compile-all
--debug-global <identifier>Allows one to rename the debug() function to something else
--bail, -bBail after the first test failure. May be abbreviated -b
--stacktrace, -tAllows for mixed Javascript-and-Solidity stacktraces when a Truffle Contract transaction or deployment reverts. Does not apply to calls or gas estimates. Implies --compile-all. May be abbreviated -t. Warning: This option is still somewhat experimental
--stacktrace-extraShortcut for --stacktrace --compile-all-debug