Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Boosting code coverage via white-box tests

One major difference compared to the tests we wrote in the previous section is that the new set of tests will live in the same package as the package we are testing. To differentiate from the black-box tests that we authored previously and hint to other engineers perusing the test code that these are internal tests, we will place the new tests in a file named retail_internal_test.go.

Now, it's time to pull the curtain back and examine the implementation details of the retail package! The public API of the package is always a good place to begin our exploratory work. An effective strategy would be to identify each exported function and then (mentally) follow its call-graph to locate other candidate ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content