Go 1.17 :: shuffle test

Home   »   Go 1.17 :: shuffle test

$go version
go version devel go1.17-79bda65041 Sat May 29 01:59:17 2021 +0000 darwin/amd64

# Run test แบบปกติ

$go test ./...  -v
=== RUN   TestCase01
--- PASS: TestCase01 (0.00s)
=== RUN   TestCase02
--- PASS: TestCase02 (0.00s)
=== RUN   TestCase03
--- PASS: TestCase03 (0.00s)
=== RUN   TestCase04
--- PASS: TestCase04 (0.00s)
=== RUN   TestCase05
--- PASS: TestCase05 (0.00s)
PASS

# Run test แบบไม่เรียงลำดับ test case

$go test ./...  -shuffle=on -v
-test.shuffle 1622276347055892000
=== RUN   TestCase03
--- PASS: TestCase03 (0.00s)
=== RUN   TestCase02
--- PASS: TestCase02 (0.00s)
=== RUN   TestCase05
--- PASS: TestCase05 (0.00s)
=== RUN   TestCase01
--- PASS: TestCase01 (0.00s)
=== RUN   TestCase04
--- PASS: TestCase04 (0.00s)
PASS

Leave a Reply

Your email address will not be published. Required fields are marked *