You dont need to run On-Target tests to get rid of HAL libraries or external dependencies. Just use a Mock framework, such as Google Mock or hippomock, and mock the behaviour of your external hardware or the HAL libraries your code depend on.
@MeetingCPPАй бұрын
True, but sometimes you do want to be able to run your tests on the actual hardware and not a mock.
@edsonmanoel5263Ай бұрын
@@MeetingCPP Yes. I think that is the whole point of DevOps. Unit testing is just a part of the whole loop. Then, to run tests on the actual hardware you have HIL or open loop systems (that I prefer to call regression tests). With unit testing you save time and money by identifying bugs as early as possible in the development phase. That is actually the point of TDD. And as I said, having internal or external dependencies is not a problem in unit testing if you use a rich Mocking syntax framework, while the lecturer is trying to sell the idea, for obvious reasons, that you need to go for the open loop approach because of the dependencies