January 2020
Intermediate to advanced
640 pages
16h 56m
English
So far, we have discussed white- and black-box tests, integration, and end-to-end tests. By including tests from all these categories in our projects, we can rest assured that the code base will behave as expected in a multitude of different scenarios.
Now, imagine we are working on a particular feature and we only want to run the unit tests. Alternatively, we may only need to run the integration tests to ensure that our changes do not introduce regression to other packages. How can we do that?
The rather simplistic approach would be to maintain separate folders for each test category, but that would veer away from what is considered to be idiomatic Go. Another alternative would be to add the category ...