Regards Scott
HotWax Media http://www.hotwaxmedia.com On 11/12/2009, at 8:59 PM, Jacques Le Roux wrote:
A huge task ahead... Jacques From: "Adam Heath" <[email protected]>Scott Gray wrote:Additionally, just because a line has been noted in cobertura, doesn'tOkay I see what you mean now, it's a bad thing that coverage is reported without explicit thorough testing. Even though the indirect coverage ismean all variations have been tested. Consider the case that some condition is doing some kind of pattern match, or looking atCollection.contains or Map.containsKey. It's much simpler to verifythat everything is tested when it is done explicitly.still better than no coverage whatsoever.As a better example, let's say that there is only 10% coverage on the entire ofbiz code base. But base has 100% coverage. That other 90% of untested code may test parts of base that may not work, and would break the higher-level code. It's easier to write tests that are close to the code being tested. Trying to tweak a high-level test to make certain all low-level code is wrong is very very difficult.Plus, if a typo gets introduced in one of those map keys, it might not be detected until much much later in time, when explicit tests are notused.In my opinion, as each new component is activated in the ofbiz system,it should have it's own set of tests that move it close to 100% coverage. So, I can test just base, and get 100%, then base+sql, and get 100% on base+sql, then base+sql+entity, and get 100% on base+sql+entity, and so on. You want to make certain that earliercomponents are correct before utilizing later ones, or the entire testrun may fail spectactulary.
smime.p7s
Description: S/MIME cryptographic signature
