4 ms·
One use case already pointed out is to check for gaps that your tests have not covered. Other use case is figuring out what tests to re-execute when you change
by lantastic 11y ago
One use case already pointed out is to check for gaps that your tests have not covered.
Other use case is figuring out what tests to re-execute when you change something - you can skip tests that never touch any code you are changing. Can be a time-saver if you have a big test suite or lack finer-grained tests (component/unit).
- viraptor 11y agoThis sounds a bit dangerous. Code coverage works on code, not on data, so if you're testing something like: // globals rules_t rules[] = {{1, OK}, {2, FAIL}, {3, THERMONUCLEAR_WAR}}; It sounds like you could change rules 1 and 2 to THERMONUCLEAR_WAR as well and none of the tests would rerun. Is that right?
- stouset 11y agoYou might do something like this for local development, keeping things fast with some confidence you're not grossly breaking things. But you run the full suite through CI.