(unit-testing)= # Unit testing ```{toctree} :titlesonly: :glob: * ``` > See also: [How to write a unit test](/doc/dev/how-to/write-a-unit-test.md) Unit testing `juju` currently involves the [`gocheck` package]( https://labix.org/gocheck) and the `go test` CLI command. A typical unit testing package is placed alongside the code package that you want to test (in the same directory) and consists of: - A file `package_test.go`, which is the entrypoint to your unit testing. - (OPTIONAL) A file `export_test.go`, which is used to access or modify some internal aspect of the package under test for the tests. Even though the file ends with `_test.go`, the package definition is the same as the normal source files. In this way, for the tests and only the tests, additional variables and functions can be defined for the package and used in the tests. - Test files of the form `_test.go`, which are collections of unit test suites. > See more: > - [Unit test suite](unit-test-suite.md) > - [Util suite](util-suite) > - [Checker](checker.md)