Apache OpenOffice (AOO) Bugzilla – Issue 53359
Testtool: Add integer type returncode to testtool
Last modified: 2017-05-20 11:33:33 UTC
Reason: When scripting the Testtool this might allow a first quick evaluation of the outcome of a testrun. Proposal: rc=0: Successful completion, Testcase finished with no errors/warnings rc=1: Warnings occurred rc=2: Errors occurred Further enhancements: Depending on the effort the Testtool could return a positive Integer value for the number of warnings occurred and a negative integer value for the number of errors occurred where errors take precedence over warnings
Is seems that returncodes can only be positive, so the further encancement will not be possible.
How about this: have a bitfield returned where the least significant bit tells wether there are errors or warnings and the other bits tell the amount nnnnnnnx x = 0 Warnings x = 1 Errors nnnnnnn = amount of ... so if the test runs without warnings and errors the returncode would be 0 (zero) warnings wuld be even returncodes and errors odd ones
Yep, that is a possible solution. Does this mean that if we have any errors we get the sum of all errors and warning (errors AFAIK always cause wrnings to pop up as well)? It would be nicer if we could distinguish the type of error we had in the test - that is: Error outside of testcase, Error inside a test, warnings and qaerrorlogs. I guess it is not really important to know exactly how many errors occurred, it is sufficient to know that there were any at all to find out that the test needs attention. So either we could do a OIWQ 4-bit bitfield (Outside errors, inside, warn, QAErrorLog) or a 16 bit thing with 4 bit for every errorcondition making it possible to get values up to 15. Example: 00000001 010101000 = 0 Err. Outside, 1 Err. Inside, 5 warnings and 8 QA Errorlogs. What do you think?
Ermh, yes, nice try. I just mixed two entirely different proposals into one gooey text. 1) Returnvalue does not tell about the amount of errors/warnings, just the types of errors that occurred. This would be good enough to tell the tester that he has to review the testcases 2) Returnvalue precisely delivers information about the number of any incident This would be nice if somebody wants to use the returncode to create statistics. All three (that includes your proposal) solutions would do while i'd prefer my number 2 - if this can be implemented with reasonable effort.
Reset assigne to the default "issues@openoffice.apache.org".