© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
B. Feigenbaum, Ph.D.Go for Java Programmershttps://doi.org/10.1007/978-1-4842-7199-5_10

10. Go Unit Tests and Benchmarks

Barry Feigenbaum, Ph.D.1  
Austin, TX, USA

Doing frequent and comprehensive unit testing of your code is best practice. Having repeatable (and automated) tests to use for regression test after changes is also best practice. Often, these practices are combined. Similarly, running frequent benchmarks of the performance of your code is best practice. Often, one should create a test suite that achieves as close to 100% code coverage as practical.1 While not covered deeply in this text, the Go standard runtime supports code coverage tests. ...

Get Go for Java Programmers: Learn the Google Go Programming Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.