github.com/klaytn/klaytn@v1.12.1/tests/README.md (about) 1 # How to use Klaytn tests 2 3 [Klaytn tests](https://github.com/klaytn/klaytn-tests) is not currently included 4 here due to its relatively large size. It will be added as a git submodule 5 later. 6 7 In order to use Klaytn tests, you would need to clone it as `testdata`; or 8 clone it somewhere and make a symbolic link to it. This document assumes 9 Klaytn tests is cloned outside the klaytn source tree, and the following 10 instructions describe how to use Klaytn tests with `go test`. 11 12 13 ## 1. Clone Klaytn tests 14 15 Clone Klaytn tests in the location where you'd like to have it. Let's say we 16 clone it in `$HOME/workspace`. 17 18 ``` 19 $ cd $HOME/workspace 20 $ git clone git@github.com:klaytn/klaytn-tests.git 21 ``` 22 23 24 ## 2. Create a symbolic link 25 26 We assume Klaytn source tree is located in 27 `$HOME/workspace/go/src/github.com/klaytn/klaytn`. 28 29 ``` 30 $ cd $HOME/workspace/go/src/github.com/klaytn/klaytn/tests 31 $ ln -s $HOME/workspace/klaytn-tests testdata 32 ``` 33 34 35 ## 3-1. Run all test cases 36 37 Inside `tests` directory, you can run all test cases simply using `go test`. 38 39 ``` 40 $ go test 41 ``` 42 43 44 ## 3-2. Run a specific test 45 46 There are five test sets available in Klaytn tests, which can be put after 47 `-run` flag. 48 - Blockchain 49 - NOTE: all test cases in BlockchainTests are skipped at this moment because 50 of the change in block header. 51 - State 52 - Transition 53 - VM 54 - RLP 55 56 ``` 57 $ go test -run VM 58 ``` 59 60 61 ## 3-3. Run in verbose mode 62 63 `-v` flag can be used to run tests in verbose mode. 64 65 ``` 66 $ go test -run VM -v 67 ```