Write and run unit tests
-The TiDB project runs unit tests using testify.
-You may find tests using pingcap/check which is a fork of go-check/check, but since that framework is poorly maintained, we are migrating to testify.
-You can check the background and progress on the migration tracking issue.
+The Golang testing framework provides several functionalities and conventions that help structure and execute tests efficiently. To enhance its assertion and mocking capabilities, we use the testify
library.
+You may find tests using pingcap/check which is a fork of go-check/check in release branches before
+release-6.1
, but since that framework is poorly maintained, we are migrated to testify fromrelease-6.1
. +You can check the background and progress on the migration tracking issue.
How to write unit tests
We use testify to write unit tests. Basically, it is out-of-the-box testing with testify assertions.