GoLand 2023.3 Help

Testing

Testing ensures that behavior of your code is correct and expected. Good-written tests allow you to develop with confidence that your code will work and will not break your existing code.

GoLand includes several packages that you can use to run your tests. Also, you can apply a specific testing scope for the selected package.

Packages for testing

For testing purposes, GoLand includes the following packages:

gotest

Use for running standard unit tests. For more information about go test, refer to Package testing.

gocheck

Use to have extended functionality of go check and running more complex tests. For more information about go check, refer to go check.

gobench

Use for running performance tests. For more information about gobench, refer to Package testing: Benchmarks.

go test -fuzz

Use for running fuzzing tests. Fuzzing in Go is a technique used to automatically test software by providing it with a large amount of random or unexpected input to uncover vulnerabilities or bugs. For more information about go test -fuzz, refer to Go Fuzzing.

Packages for testing
Last modified: 09 January 2024