lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Make unattended tests more robust


From: Vadim Zeitlin
Subject: [lmi] Make unattended tests more robust
Date: Sat, 20 Dec 2014 15:54:48 +0100

 Hello,

 While debugging the tests and running into miscellaneous problems due to
bugs in my own test code, I realized that the test was not really as
unattended as it was intended to be, i.e. we could get an unexpected
message box pop up during the test and in this case the operator
intervention would be needed to let the test continue.

 As I think the goal is to make sure the test does run to the end
completely unattended no matter what, the first patch (almost) ensures that
this does happen by considering any unexpected dialog an automatic failure.

 The "almost" part comes from the fact that the dialogs shown using
wxSafeShowMessage() are not caught by the modal dialogs hooks and one such
dialog is used in wx_test_new.hpp where I tried to detect the case where
the test code forgot to call close() or close_discard_changes().
Unfortunately the detection is not quite correct as it doesn't consider the
case when the call to one of these functions is there in the code but is
not executed because an exception is thrown before it is reached. So the
second patch corrects this and avoids showing this dialog in such case. It
would still be shown if the call is genuinely missing, but this would
hopefully be fixed, by adding the missing close() call, as soon as this
dialog is seen, so the dialogs shouldn't survive in the version really used
for testing.

 As always, please let me know if you have any questions about these
patches and thanks in advance for applying them,
VZ

Attachment: 0001-Guard-against-unexpected-modal-dialogs-in-the-unatte.patch
Description: Text document

Attachment: 0002-Don-t-complain-about-not-closing-test-documents-in-c.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]