<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>C &lt; + C ) ? +</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Automated Specification-based Testing of Interactive Components with AsmL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ana C. R. Paiva</string-name>
          <email>apaiva@fe.up.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>João C. P. Faria</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Raul F. A. M. Vidal</string-name>
          <email>rmvidal@fe.up.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>---------------- • All authors are with the Electrical Engineering Department, Engineering Faculty of Porto University</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2004</year>
      </pub-date>
      <volume>5</volume>
      <issue>4</issue>
      <abstract>
        <p>- It is presented a promising approach to test interactive components, supporting the automatic generation of test cases from a specification. The relevance and difficulties (issues and challenges) associated with the testing of interactive components are first presented. It is shown that a formal specification with certain characteristics allows the automatic generation of test cases while solving some of the issues presented. The approach is illustrated with an example of automatic testing of the conformity between the implementation of a button, in the .Net framework, and a specification, written in the AsmL language, using the AsmL Tester tool. The conclusion discusses the characteristics of the tool and gives directions for future work.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>Formal Methods</kwd>
        <kwd>Interactive Systems Testing</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 INTRODUCTION</title>
      <p>Tapplications is a difficult and time-consuming task,
he development of high-quality interactive systems and
requiring expertise from diverse areas (software
engineering, psychology). Current IDE's are not powerful
enough for specifying/modeling, building and testing
those systems in an effective way. The development of
interactive systems and applications based on reusable
interactive components is the key to achieve higher quality and
productivity levels. Improving the quality of interactive
components should have a major impact in the quality of
interactive systems and applications built from them, and
should contribute to their increased reuse.</p>
      <p>In this paper, it is presented a promising approach to the
testing of interactive components. By interactive
components we mean reusable controls or widgets or interactors,
capable of both input from the user and output to the user,
written in a general-purpose object-oriented language, such
as Java or C#. Interactive components range from the more
basic ones (such as buttons, text boxes, combo boxes, list
boxes, etc.) to the more sophisticated ones (calendars, data
grids, interactive charts, etc.) built from simpler ones. The
overhead incurred in testing reusable interactive
components pays-off, because of their wider usage and longevity,
when compared to special purpose and short lived "final"
user interfaces.</p>
      <p>The paper is organized as follows: next section (section
2) presents some important issues and challenges of testing
interactive components. Section 3 explains the type of test
automation that is envisioned (automated
specificationbased testing), discusses the type of formal specification
required, and discusses its costs and benefits. Section 4
presents an example of performing automated
specificationbased tests using the AsmL language and the AsmL Tester
tool. Some conclusions and future work can be found in the
final section.</p>
    </sec>
    <sec id="sec-2">
      <title>2 ISSUES AND CHALLENGES OF TESTING</title>
      <sec id="sec-2-1">
        <title>INTERACTIVE COMPONENTS</title>
        <p>
          Testing interactive components is particularly difficult
because it shares and combines the issues and challenges of
testing object-oriented systems [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], component-based
systems [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], and interactive systems. Some of the main issues
and challenges are identified and described next.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.1 Complex Event-driven Behaviour</title>
        <p>Interactive components (and interactive applications and
systems in general) have complex event-driven behaviour,
difficult to analyze and predict, and, consequently, also
difficult to test and debug. Even basic interactive components,
such as buttons and text boxes, may react to and generate
dozens of events. Most of us have already experienced
"strange" behaviours (blocked interfaces, dirty displays,
etc.) apparently at random when using wide-spread
interactive applications and systems. This should not be a
surprise given their complex event-driven behaviour.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.2 Highly-configurable (or Customizable) Behaviour</title>
        <p>Reusable interactive components usually have a
highlyconfigurable (or customizable) behaviour. This can be done
statically or dynamically by setting configuration properties
or attributes, by adding event-handlers or by defining
subclasses and method overriding. Testing an interactive
component in all the configurations allowed is almost
impossible because of the huge set of possible configurations and
the difficulty to predict the customized behaviour.</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.3 Multiple Interfaces</title>
        <p>Interactive components have both a user interface (GUI)
and an application interface (API). The application interface
is used for customizing and composing them, and for
linking them with the underlying application logic. Different
kinds of inputs and outputs occur via these different
interfaces. Adequate testing of an interactive component cannot
look at just one of these interfaces in isolation, and has to
take into account all these kinds of inputs and outputs in
the definition of test cases and in test execution.</p>
      </sec>
      <sec id="sec-2-5">
        <title>2.4 GUI Testing is Difficult to Automate</title>
        <p>Automating the testing of graphical user interfaces poses
well-known challenges:
1. How to properly simulate inputs from the user
(mouse, keyboard and other higher-level events that
are generated by the user)?
2. How to check the outputs to the user without
excessive sensitivity to formatting and rendering details?</p>
      </sec>
      <sec id="sec-2-6">
        <title>2.5 API's with Callbacks and Reentrance</title>
        <p>The designer of a reusable interactive component defines its
methods but does not know in advance which kind of
applications will make use of them. Method calls between an
interactive component and an application occur in both
directions:
1. The application (or test driver) may call methods of
the interactive component. From the testing
perspective, inputs are methods invoked with parameters
while outputs are the values returned by those
methods. This is the traditional situation in unit
testing.
2. The interactive component may generate events
(originated from the user or internally generated)
that cause the invocation of methods in the
application (or test stub), by some kind of callback
mechanism (event handlers, or subclassing and method
overriding). Again, from the testing perspective, the
outputs are the events and parameters passed to the
application, while inputs are returned parameters.</p>
        <p>
          Testing the second kind of interaction (callbacks) poses
specific issues and challenges, as already noted in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]:
1. An application method invoked in a callback may, in
turn, invoke methods of the interactive component
(reentrancy situation) and have access or change its
intermediate state. Hence, the internal state of the
interactive component when it issues a callback is not
irrelevant. Moreover, some restrictions may have to
be posed on the state changes that an application
may request when processing a callback.
2. During testing, one has to check that: (1) the
appropriate callbacks are being issued; (2) when a callback
is issued, the interactive component is put in the
appropriate internal state; (3) during the processing of
a callback, the application doesn't try to change the
state of the interactive component in ways that are
not allowed.
        </p>
      </sec>
      <sec id="sec-2-7">
        <title>2.6 Operating System Interference</title>
        <p>Interaction with the user is mediated by the operating
system in non trivial ways (often, several layers are involved),
introducing more dimensions of configurability, and
complicating the analysis and prediction of its behaviour, as
well as the testing and debugging tasks.</p>
      </sec>
      <sec id="sec-2-8">
        <title>2.7 Insufficient Documentation</title>
        <p>The documentation supplied with interactive components
is usually scarce and not rigorous enough for more
advanced uses, such as advanced customization and thorough
testing. For example, from the documentation, it is difficult
to know precisely:
1. when are events signalled and by what order;
2. what is the internal state of a component when it
signals an event;
3. what is safe for an event handler to do;
4. what interactions exist between events.</p>
        <p>This usually leads to a trial-and-error style of application
programming and poor application quality, and also
complicates the design of test cases.</p>
      </sec>
      <sec id="sec-2-9">
        <title>2.8 Poor Testability</title>
        <p>Testing of interactive components is usually difficult and
time-consuming due to:
1. the lack of rigorous, unambiguous and
comprehensive documentation;
2. the reduced observability (capability to observe the
internal state, display produced, and events raised);
3. the deficient controllability (capability to simulate
user input).</p>
        <p>Some of the issues and challenges described in this
section will be addressed by our testing approach and
discussed in the next sections.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>AUTOMATED SPECIFICATION-BASED TESTING</title>
      <p>Manual testing of GUIs and interactive components is
labour-intensive, frequently monotonous, time-consuming
and costly. Some of the reasons are the existence of varied
possibilities for user interaction and a large number of
possible configurations for each component, and other issues
described in section 2, making it impractical the satisfaction
of adequate coverage criteria by manual testing. It is
necessary to use some type of automation to perform those tests.</p>
      <sec id="sec-3-1">
        <title>3.1 Degree of Automation Envisioned</title>
        <p>The degree of automation we envision is the automatic
generation of test cases (inputs and expected outputs) from
specification, and not just the type of automation that is
provided by unit testing frameworks and tools, such as
JUnit (www.junit.org) or NUnit (www.nunit.org), or the type
of automation provided by capture and replay tools, such
as WinRunner (www.mercure.com) and other tools
(www.stlabs.com/marick/faqs/t-gui.htm).</p>
        <p>Unit testing frameworks and tools are of great help in
organizing and executing test cases, particularly for API testing,
but not in generating test cases from a specification.</p>
        <p>
          Capture and replay tools are probably the most popular
tools for GUI testing, but don’t support the automatic
generation of test cases. With these tools, it is possible to record
the user interactions with a graphical user interface (mouse
input, keyboard input, etc.) and replay them later. Capture
and replay tools are of great help in several scenarios, but
also have widely recognized limitations (see e.g. the lesson
"capture replay fails" in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]). In this type of test automation,
there is no guarantee of test coverage, and there is an
excessive dependency on the “physical” details of the user
interface.
        </p>
        <p>From a higher perspective, these different approaches
and types of automation are complementary and not
opponents.</p>
        <p>The automatic generation of test cases from specification
requires some sort of formal specification of the software to
be tested, that can be used to generate concrete input values
and sequences, as well as the expected outputs (as a test
oracle).</p>
        <p>It is possible to design test cases (for black-box testing)
from informal specifications, but not in an automated way.
At most, inputs can be generated automatically based on
the signatures of methods and events (their calling syntax),
but expected outputs can only be generated based on a
formal specification of their semantics.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2 Type of Specification Needed</title>
        <p>
          A popular type of specification of object-oriented systems is
based on the principles of design by contract [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], by means
of invariants and pre and post-conditions, as found in Eiffel
(www.eiffel.com), ContractJava [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] or JContract
(www.parasoft.com). An invariant is a condition that restricts
the valid states of an object, at least on the boundaries of
method calls. A pre-condition of a method is a condition on
the input parameters and the internal state of the object that
should hold when a method is called. On the opposite side,
a post-condition of a method is a condition on the input
parameters, initial state of the object (when the method is
called), final state of the object (when the method returns),
and value returned that should hold at the end of the
method execution.
        </p>
        <p>
          Although with limitations, some test tools, such as JTest
(www.parasoft.com), have the capability of generating unit
tests based on the specification of pre and post-conditions.
While pre and post-conditions are a good mean to restrict
the allowed behaviours of an object, they are not adequate,
in general, to fully specify their intended behaviour,
particularly when callbacks are involved. As already noted by
Szyperski in his book [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], the semantics of components that
issue callbacks, as is the case of interactive components (see
section 2), cannot be captured only by means of pre and
post-conditions (at least with the meaning presented
above).
        </p>
        <p>The Object Constraint Language (OCL) (see
www.uml.org) goes a step further, by allowing the
specification, in the post-condition of a method, of messages that
must have been sent (method calls and sending of signals)
during its execution. However, in general, it is not possible
to specify the order by which messages are sent and the
state of the object when each message is sent (important
because of re-entrance, as explained in section 2). The
definition of post-conditions in OCL has another advantage
over its definition in Java or Eiffel, because OCL is a
higherlevel formal language supporting formal reasoning and
automation.</p>
        <p>
          AsmL [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] (http://research.microsoft.com/fse/asml), a formal
specification language developed at Microsoft Research,
tightly integrated with the .Net framework, bridges over
the limitations found in OCL by means of "model
programs". A "model program" is an executable specification of
a method. A model program may be organized in a
sequence of steps. For example, if a method issues a callback
in the middle of its execution, three steps should be
defined: a first step to lead the object to the appropriate state
before issuing the callback; a second step where the
callback is issued; a third step to lead the object to the
appropriate final state and return. These steps facilitate the
definition of restrictions on sequences of actions/events that are
common to find in user interface modelling and are not
easy to express using just post-conditions. Each step
comprises one or more non-contradictory "model statements"
that are executed simultaneously. Model statements are
written in a high-level action language with primitives to
create new objects, assign new values to the attributes of an
object, and call other methods. Model programs may be
used in combination with pre and post-conditions, usually
dispensing the later. Examples of specifications written in
AsmL will be presented in section 4.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3 Conformity Checks</title>
        <p>
          With appropriate tool support (as is the case of the AsmL
Tester tool), model programs can be used as executable
specification oracles [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. That is, the results and state
changes produced by the execution of model programs
(executable specifications written in AsmL) can be compared
with the results produced by the execution of the
corresponding implementation under test (written in any .Net
compliant language in this case). Any discrepancies found
are reported by the tool. Mappings between actions and
states in the specification and the implementation have to
be defined, either explicitly or implicitly (based on name
equality). Although this is not the only way of performing
conformity checks between a specification and an
implementation (see [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] for a discussion of other possible
ways), it is a feasible way.
        </p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4 Finite State Machine Model and Test Case</title>
      </sec>
      <sec id="sec-3-5">
        <title>Generation</title>
        <p>For the generation of test cases, the AsmL Tester tool first
generates a FSM (Final State Machine) from the AsmL
specification, and then generates a test suite (with one or
more test cases) from the FSM, according to criteria
provided by the user. Since the number of possible object states
(possible combinations of values of instance variables) is
usually huge, the states in the FSM are an abstraction of the
possible object states, according to some criteria provided
by the user.</p>
        <p>It is well known that state machine models are
appropriate for describing the behaviour of interactive systems (and
reactive systems in general), and a good basis for the
generation of test cases, but usually there is not a good
integration between the object model and the state machine model.
AsmL and the AsmL Tester tool solve this problem with the
generation of the FSM from the specification (formal object
model).</p>
      </sec>
      <sec id="sec-3-6">
        <title>3.5 Advantages of the Formal Specification of</title>
      </sec>
      <sec id="sec-3-7">
        <title>Interactive Components</title>
        <p>When compared to other testing techniques, automated
specification-based testing has the disadvantage of
requiring a formal specification (to achieve a higher degree of
automation). But the investment in the formal specification
of reusable interactive components may be largely
compensated by the multiple benefits it can bring:</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>EXAMPLE</title>
      <p>In this example, the AsmL Tester tool is used to test the
conformity between the implementation of the button control
in the .Net framework (
class) and a specification of a small part of its behaviour
(related to mouse and keyboard events only) in the AsmL
language. The example is small but was selected mainly to
illustrate the testing process and turnarounds to some
difficulties, and not the power of the AsmL language. The
approach presented can easily scale to be used in larger
interactive controls.</p>
      <sec id="sec-4-1">
        <title>4.1 Formal Specification of a Button in AsmL</title>
        <p>The button specification has instance variables (
Specification 1), events ( Specification 2), and methods (
Specification 3).</p>
        <p>
          Two types of events should be distinguished: events
received by the button ( , , and
), and events generated by the button in response
to the previous ones ( ). Both these types of events
may be sent by the button to the application via event
handlers. There are more button events in the .Net platform but
only these events are considered in this example.
Instance variables , and (
Specifi1. Formal specifications and models are an excellent
complement to informal specifications and
documentation, because ambiguities are removed and
inconsistencies are avoided.
2. Formal specifications allow the automation of
specification-based testing, as described in this paper.
3. Besides being useful as the basis for the generation
of test cases, FSM's can also be used to automatically
prove required properties of a system, with
modelchecking tools that exhaustively search the state
space. The properties are written in temporal logic.
For example, Campos, in [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ], uses model checking
tools to prove usability properties of user interfaces.
4. Desired properties of a system (with a finite or
infinite state space) may be proved in a semi-automated
way, given a formal specification or model of the
system, and a formal description of those properties
[
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
5. Executable specifications (or models) of user
interfaces and interactive systems may be used as fully
functional prototypes. Problems in specification and
design can be discovered and corrected before
implementation begins.
6. In restricted domains, and with appropriate tool
support (see for example [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]), formal specifications
or models of user interfaces can be used as the basis
for the automatic generation of an implementation
in some target platform, according to refinement or
translation rules. The generated implementations are
correct by construction, and conformity tests are not
needed.
        </p>
        <p>
          Overall, higher rigor in the description and verification
of interactive components is important to gain confidence
on their correctness and encourage their reuse [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
cation 1) model the internal state of the button, and
correspond to properties existing in the class in the .Net
framework.
        </p>
        <p>Instance variables and
represent event flags that were added to check that
appropriate sequences of mouse and keyboard events are
received by a button ( after , after
).</p>
        <p>Instance variable was added to tell
whether the event was generated by the button in
response to the last keyboard or mouse event received. This
instance variable is reset each time an event is received
(method ).</p>
        <p>Specification 1 - Button instance variables.</p>
        <p>Specification 2 – Button events.
# $ % &amp; &amp; 8 ’ B * ; e
6 % 7 8 ’ % &amp; ’ ( ) ) * + D / , ’ ( ) ) * + 8 ’ ( ) ) * + g . 7 ,
! " # $ %&amp; ’ ( % ) * $ % + , # - * . /
QUATIC’2004 PROCEEDINGS
Implementation 1 – Implementation of a testable button class
(TButton).</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.3 Specification and Implementation of a Test</title>
      </sec>
      <sec id="sec-4-3">
        <title>Container</title>
        <p>In order for a user to interact with a button, it must be
made visible by putting it inside some window or
container. With this purpose, a class was created both
at the specification level ( Specification 4) and at the
implementation level ( Implementation 2). Due to limitations
of the test tool, auxiliary methods ,</p>
        <p>, and had to be created to
simulate user events that are sent to the button contained in
the form. These methods are selected to trigger the
transitions in the state transition diagram ( Figure 1). Each test
case will be constructed as a sequence of calls to these
methods.</p>
        <p>Specification 3 – Button methods.</p>
        <p>class to simulate user events.
QUATIC’2004 PROCEEDINGS
[ m Implementation 2 – Container class TBForm. (specification) and
b and the Implementation
\ 7 F * ( C 4 &gt; ‘ 4 + ) ; = C 4 8:] J6’ C% )h. 14, e+ F6 *_ &lt;(] +C0 A4 8*h Hi’ CF 4* (B *C 4; eh Ci pToinpgserf(ocromnfocromnfaonrcmeitryeltaetsiotsnist)
isbentewceeesnsarsypetocifdiceafitnioenmaanpd</p>
      </sec>
      <sec id="sec-4-4">
        <title>4.5 Definition of Mappings between the Specification</title>
        <p>
          implementation methods and data (state) [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. These
relations can be established manually or in an automated way.
        </p>
        <p>It was defined a relation between the classes</p>
        <p>(implementation). After this, the methods
with the same names and arguments in both classes are
4.4 Generation of the Finite State Machine Model automatically related. In the current version of the test tool,
data relations have to be defined manually. In this example,
The AsmL Tester tool was used to automatically generate only the instance variable was mapped, as
the finite state machine (FSM) from the AsmL specification, shown in Figure 2. Conformance tests will execute related
bas1e.d oLnisttheoffosltlaotweivnagricaobnlefisg-uaralltitohne ienvfoenrmtfaltaigosn:defined in methods in both levels (specification and implementation)
the specification of the class ( and will compare results obtained from both and also
com, and ); pare the related data.
2. List of actions that trigger transitions – the
constructor and methods defined in the class
( , , and</p>
      </sec>
      <sec id="sec-4-5">
        <title>4.7 Test Execution and Results</title>
        <p>As soon as the conformity relations are defined and the
FSM and the test suit are generated, it is possible to execute
conformance tests. Every time there is an inconsistence, the
tool stops and reports the error.</p>
        <p>The tool reports a conformance error when the sequence of
events , , and is executed
( Figure 4), with key 'A'. The error is an inconsistency
between the value of the value at the
implementation (the value is true) and the specification (the value
is false). This means that the implementation (the
class in the .Net framework) generates a event, when
it receives from the user the sequence of events ,
, and . According to the documentation of
the .Net framework, this should only happen when the key
pressed is the spacebar (which is not the case here).</p>
        <p>Error</p>
        <p>To reproduce this abnormal behaviour manually it is
necessary to press the left mouse button on a .Net button,
and press and release a keyboard key without releasing the
mouse button. This will have the effect of selecting the
button and executing the action associated with it. According
to the documentation, this should only happen with the
spacebar key.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>CONCLUSION</title>
      <p>An approach to test interactive components, with the
automatic generation of test cases from a specification was
described. In comparison with others, the approach
presented in this paper requires a formal specification with
demonstrated benefits in the development and verification
of interactive components. In the past, formal specification
and verification techniques have been used mainly in the
development of critical systems, but, from our point of
view, they also have a major role to play in the
development and verification of reusable components, as is the case
of interactive components.</p>
      <p>It was presented an example of automatic testing the
conformity between the implementation of a button, in the
.Net framework, and a specification, written in the AsmL
language, using the AsmL Tester tool. Some test code was
needed to overcome testability limitations of the target
code. Although, only a small part of the behaviour of a
button was specified and tested, the tests were successful, that
is, a bug was detected. A larger example could be used
since the approach can easily scale but it would be difficult
to explain that example in few pages.</p>
      <p>However, in its current state, the AsmL Tester tool also
has some limitations:
1. It still requires too much user intervention.
2. While the tight integration with the .Net framework
has some advantages, one of its shortcomings arises
from the fact that the level of abstraction of the
specification is not as high as should be.
3. Interactive components can have lots of states and
actions or events that can be hard to manipulate and
test. The AsmL Tester tool allows the selection of
which actions should appear in the FSM diagram
(and in the test cases generated from the FSM).
Consequently, it is possible to test separately parts of the
behaviour of the object or component under test. But
a rigorous method is needed to define those parts
and “sum” the results obtained in each part to take
coverage criteria conclusions.</p>
      <p>
        The approach presented in this paper has to be extended
and matured in several directions:
1. Use the approach presented in larger examples.
2. Explore other ways to generate test cases from the
FSM model – some criteria to generate
specificationbased tests can be found at [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
3. Define additional check points – for instance, when a
callback is issued and on return.
4. Model Checking – integrate the approach with model
checking techniques to prove properties about the
model.
5. Verification of the user interface contract – particularly
challenging is the problem of checking that the outputs
sent by an interactive component to the user obey to
some kind of specification or contract. For example,
the user interface contract of a textbox is to allow the
user to insert and visualize a string through a small
      </p>
      <p>window.</p>
      <p>Above points and possible others will be subject of future
work.</p>
    </sec>
    <sec id="sec-6">
      <title>ACKNOWLEDGMENT</title>
      <p>The authors wish to thank the anonymous reviewers for
their comments and suggestions.</p>
      <p>Ana C. R. Paiva received M.Sc degree in Electrical and Computers
Engineering from Engineering Faculty of Porto University (FEUP) and
a degree in Information Systems Engineering from Minho University of
Portugal in 1997 and 1995 respectively. She is currently developing
hers doctorate in formal methods applied to user interfaces at FEUP,
Electrical and Computers Engineering Department, where she is an
Assistant Lecture since 1999.</p>
      <p>João C. P. Faria received a Ph.D. in Electrical and Computer
Engineering from the Engineering Faculty of Porto University (FEUP) in
1999, and a degree in Electrical Engineering from FEUP in 1985. He is
an Assistant Professor at FEUP, Electrical and Computers Engineering
Department, Informatics.</p>
      <p>Raul F. A. M. Vidal received a Ph.D. in Digital Electronics at UMIST in
1978, an M.Sc in Communication Engineering at UMIST in 1974 and a
degree in Electrical Engineering at Engineering Faculty of Porto
University (FEUP) in 1972. He is an Associate Professor at FEUP,
Electrical and Computers Engineering Department, Informatics.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R. V.</given-names>
            <surname>Binder</surname>
          </string-name>
          , Testing
          <string-name>
            <surname>Object-Oriented</surname>
            <given-names>Systems</given-names>
          </string-name>
          : Models, Patterns and Tools:
          <string-name>
            <surname>Addison-Wesley</surname>
          </string-name>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J. Z.</given-names>
            <surname>Gao</surname>
          </string-name>
          , H.
          <string-name>
            <surname>-S. J. Tsao</surname>
            , and
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Wu</surname>
          </string-name>
          ,
          <source>Testing and Quality Assurance for Component-Based Software: Artech House Publishers</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>C.</given-names>
            <surname>Szyperski</surname>
          </string-name>
          , Component Software:
          <article-title>Beyond Object-Oriented Programming: Addison-</article-title>
          <string-name>
            <surname>Wesley</surname>
          </string-name>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Kaner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Bach</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Pettichord</surname>
          </string-name>
          , Lessons Learned in Software Testing:
          <string-name>
            <given-names>A</given-names>
            <surname>Context-Driven</surname>
          </string-name>
          <string-name>
            <surname>Approach</surname>
          </string-name>
          : John Wiley &amp; Sons,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>B.</given-names>
            <surname>Meyer</surname>
          </string-name>
          ,
          <article-title>"Applying Design by Contract,"</article-title>
          <source>IEEE Computer</source>
          , pp.
          <fpage>40</fpage>
          -
          <lpage>51</lpage>
          ,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F.</given-names>
            <surname>Findler</surname>
          </string-name>
          ,
          <article-title>"Contract Soundness for Object-Oriented Languages," presented at Object-Oriented Programming Systems, Languages and Applications (OOPSLA</article-title>
          ),
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Microsoft</surname>
          </string-name>
          ,
          <article-title>"Introducing AsmL: A Tutorial for the Abstract State Machine Language,"</article-title>
          <source>Foundations of Software Research</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A. C.</given-names>
            <surname>Paiva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Faria</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Vidal</surname>
          </string-name>
          ,
          <article-title>"Specification-based Testing of User Interfaces," presented at 10th DSV-</article-title>
          IS Workshop - Design,
          <article-title>Specification and Verification of Interactive Systems</article-title>
          , Funchal - Madeira,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J.</given-names>
            <surname>Campos and M. D. Harrison</surname>
          </string-name>
          ,
          <article-title>"Model Checking Interactor Specifications,"</article-title>
          <source>in Automated Software Engineering</source>
          , vol.
          <volume>8</volume>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>I. MacColl</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Carrington</surname>
          </string-name>
          ,
          <article-title>"User Interface Correctness," presented at Human Computer Interaction -</article-title>
          HCI'
          <fpage>97</fpage>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>M. D. Lozano</surname>
          </string-name>
          ,
          <article-title>"Entorno Metodológico Orientado a Objectos para</article-title>
          la Especificación y Desarrollo de Interfaces de Usuario,
          <article-title>" in Sistemas Informáticos y Computación</article-title>
          . Valencia: Universidad Politécnica de Valencia,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>J.</given-names>
            <surname>Offutt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Abdurazik</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Ammann</surname>
          </string-name>
          ,
          <article-title>"Generating test data from state-based specifications,"</article-title>
          <source>Software Testing, Verification and Reliability</source>
          , vol.
          <volume>13</volume>
          , pp.
          <fpage>25</fpage>
          -
          <lpage>53</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>