On 1/25/06, Mikhail Loenko <[EMAIL PROTECTED]> wrote: > One more reason when logs are necessary: > > If testing is possible in some configurations only > (like set of providers contains something or default encoding is ...), then > 1) build failing in all different configs would be annoying > 2) One has to be able to scan logs for warnings to verify that > functionality is tested > when the config is as expected > > A different exit status for the tests that can test in the given > configuration would > help. > > Thanks, > Mikhail >
Well, I didn't say that using of logging in some particular case in a test is absolutely terrible. What I'm talking about is that in general (i.e. in the 99,9% cases) we should use standard JUnit features, try to keep each test small and clear. Using only JUnit asserts is a common approach and I beleive the major part of community does so... I agree that if you have to 'try' several classes/providers/what_ever in the test (since you absolutely CANNOT build the required environment from the test case and have to find an approprite test scenario instead) it is good chance to log which env. settings you met and which scenario was tested. However I hope that the majority of the tests can build the required environment for the tested scenario. -- Anton Avtamonov, Intel Middleware Products Division
