January 2019
Intermediate to advanced
458 pages
10h 35m
English
An obvious question to ask when mocking away large sections of code and hardware peripherals is how realistic the resulting mock is. We obviously want to be able to cover as many real-life scenarios as possible with our integration test before we move to testing on the target system.
If we want to know which test cases we wish to cover in our mock, we have to look both at our project requirements (what it should be able to handle), and which situations and inputs can occur in a real-life scenario.
For this, we would analyze the underlying code to see what conditions can occur, and decide on which ones are relevant for us.
In the case of the WiringPi mocks we looked at earlier, a quick glance at the source code for the ...