This repository has been archived by the owner on Apr 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Testing
Platonx99 edited this page Jun 4, 2018
·
2 revisions
All commands (unless stated otherwise) are assumed to be run from $GOPATH/src/github.com/webchain-network/webchaind/
. You should have the latest Go installed (>= 1.8).
Test the full codebase locally by changing to the repository directory and running
go test ./...
Integration tests for Go are included in the tests
directory and can be run with standard go testing (i.e. go test
). To run all the integration tests simply run:
go test ./tests/
Run a specific module with:
go test ./core/...
Or a specific test file:
go test ./core/config_test.go
Webchain uses [sstephenson/bats: Bash Automated Testing System](sstephenson/bats: Bash Automated Testing System) to test command line integration.
Run the bats tests with:
cd $GOPATH/src/github.com/webchain-network/webchaind/
bats cmd/webchaind
go test ./tests/vm_test.go
go test ./tests/state_test.go
go test ./tests/transaction_test.go
go test ./tests/block_test.go