← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #276333]: How to modify and get an error output with (XMLTestRunner) using exists()

 

Question #276333 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/276333

    Status: Open => Answered

RaiMan proposed the following answer:
-- 1. continue after exception in test function ...
... is against the philosophy of unit testing: a failure or error situation should instantly terminate the test and be reported as failed.

-- 2. the XML-log is not really a log ...
... but a summary report of the test execution reporting success, failed or error.
To get additional information into the report one should use the assert() statement.

-- 3. add additional messages to the XML-log ...
... is not possible apart from -- 2.
If you want something like that, you have to integrate some parallel logging feature (e.g. SikuliX's user logging)

-- 4. catching FindFailed situations
If you do that (either with try ... except ... or with exists() (catches internally), you are responsible yourself for producing respective log output.

-- 5. How do I modify the format that the error is in?
either by some post processing of the XML-log or by modifying the formatting function _print_error() in XMLTestRunner::_TestInfo

You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.