It came to my attention this morning that there is a rather serious
problem with the Ubiquity processor when used in conjunction with the
automated test suite. The problem stems from the fact that Ubiquity
evaluates constraints and bindings on page load. This has the
unfortunate consequence of triggering messages which are never
dismissed by the test suite drivers, which in turn leads to erroneous
behaviour later on. This is perhaps most easily explained through
example: test 6.1.6.a is designed to test the constraint feature. It
should fail because the xpath expression uses string comparison
instead of integer comparison to evaluate the constraint. It is
supposed to compare the "to" input to the "from" input and make sure
that "to" is always greater than "from". This test was inexplicably
passing in Selenium but failing during manual execution. The issue in
Selenium is due to the test initially beginning with "from" equal to
10 and "to" completely empty. When the form is loaded the constraint
is evaluated, and since "" < "10" an xforms-invalid message appears.
While manually you'd dismiss this and move onto the actual test,
Selenium has no such logic. Instead the dialog, although modal in
nature is allowed to persist, and when Selenium triggers the event
which should cause xforms-invalid to display, due to the string
compare bug xforms-valid appears instead. The verifyText test which
follows detects the xforms-invalid which was issued on load, as it
matches, and ignores the xforms-valid message which should have cause
the test to fail. When the form is supplied some initial value for
"to" such that xforms-valid is issued on load, Selenium fails the test
because the xforms-invalid message never appears.
It occurs to me that left unchecked this problem has the possibility
of causing a myriad of false positives and negatives in any test which
uses messages to communicate the test status. Having talked to John
about this already, he informs me that this is in fact a flaw in the
processor, as it should not be issuing these events on load. There are
a number of ways this could be resolved in the test suite, but
ultimately this needs to be dealt with in the processor itself. As I
understand it, this issue is to be discussed tomorrow during the
morning teleconference.
Scott