3 ms·
I'm not sure what would be so special or difficult about writing unit tests for Ms Paint.
by rco8786 10y ago
I'm not sure what would be so special or difficult about writing unit tests for Ms Paint.
- Retric 10y agoMS paint includes user selected faunts. That's an endless rabbit hole of complexity.
- ZenoArrow 10y agoValidation of new fonts is handled by Windows rather than Paint, I don't see why a new font that meets the criteria set out for Windows would cause any massive test burden for Paint.
- Retric 10y agoYou're suggestion is to not test a massive chunk of functionality. That may be reasonable choice, but it's a long way from total test coverage.
- ZenoArrow 10y agoYou target the functionality that resides the application, and its integration with other software. However, you don't need to test Windows functionality, that's for Windows developers to do. 'Total test coverage' is about testing the application under test, not every component of the OS it builds upon.
- ktRolster 10y agoUsers don't care if a bug is due to your code or the code in a library you depend on. It's up to you to make sure things work either way.
- ZenoArrow 10y agoIf you find bugs in 3rd party components whilst testing, of course you try and do something about it. The point is, at some point you have to trust that the components you're working with are relatively bug-free otherwise every application will end up testing all the features of the OS it sits upon. Do you really expect developers to run a full test suite for Windows every time they develop a painting application? Note that I'm talking about actively looking for bugs, not the bugs that are apparent from some happy path testing.
- beat 10y agoNo, it's not. It's quite simple. There are only a few types of fonts available - TrueType, PostScript, bitmap, maybe others? At any rate, you test a couple of examples of each type. Paint is a bitmap graphic generator, right? Apply letters in a test font to a bitmap, and compare the resulting bitmap to an expected value. We don't need to test every possible font there is. We only need to test enough fonts to cover the likely failure cases and known bugs. Speaking of bugs, suppose we find a bug with a specific font, or a specific size of font, or something like that. We write a test that exercises the bug, then fix the bug. Because it's a one-off test, it's not a tremendous burden to write. Moreover, that bug will never come back undetected again.