truffle test <test_file>
Run JavaScript and Solidity tests
Arguments
Name | Description |
---|
test_file | Name of the test file to be run. Can include path information if the file does not exist in the current directory |
Options
Name | Description |
---|
--compile-all | Compile all contracts instead of intelligently choosing which contracts need to be compiled |
--compile-all-debug | Like --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-rpc | Log communication between Truffle and the Ethereum client |
--show-events | Log all contract events |
--debug | Provides 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, -b | Bail after the first test failure. May be abbreviated -b |
--stacktrace, -t | Allows 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-extra | Shortcut for --stacktrace --compile-all-debug |