Testing

Last modified: 08 March 2021

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.

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

Templates for Go tests work the same way as templates for Go applications (Go Build). But instead of selecting Go Build, you should select Go Test.