15.01.2013 Views

Model-Based Testing - Testing Experience

Model-Based Testing - Testing Experience

Model-Based Testing - Testing Experience

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

▪ Implementation using existing tools: Since the<br />

framework is completely based on standards, it can<br />

be adopted with almost any UML-compliant tool.<br />

Therefore no tools were developed to support the<br />

methodology.<br />

MATE Overview<br />

Figure 1 describes the activities defined in MATE and<br />

their relationships. Regardless of the software development<br />

process followed to develop the system, this work<br />

assumes that UML models are used in the requirements,<br />

design and testing disciplines. Figure 2 shows the artifacts<br />

and their dependencies, and Figure 3 shows an overview<br />

of the main work products for a simple functionality:<br />

Login. Arrows describe the transformations used to obtain<br />

one work product from another.<br />

These work products are:<br />

▪ Use Case: Use cases are used to capture the requirements,<br />

i.e., what a system is supposed to do.<br />

▪ Scenario: Since use cases are specified using textual notation<br />

in natural language, we resorted to scenarios as a systematic<br />

approach to capture use cases. A scenario describes<br />

one path in the flow of a use case and can be described using<br />

UML sequence diagrams.<br />

▪ State machine: A UML state machine represents a finite state<br />

machine using UML notation.<br />

▪ State machine with OTP: The state machine is augmented<br />

using the Oracle Test Profile (OTP) with the testing information.<br />

In many cases, this allows the automatic addition of the<br />

Figure 3<br />

www.testingexperience.com<br />

Figure 2<br />

oracle to test cases.<br />

▪ Test Scenario: This represents the test requirements for a<br />

scenario. Test scenarios are described using the UML <strong>Testing</strong><br />

Profile, representing the test case behavior with UML Sequence<br />

Diagrams.<br />

▪ Test Code: Test scenarios are translated into executable test<br />

code that tests the code of the corresponding scenario.<br />

▪ Oracle Method: Is automatically obtained from the State<br />

Machine with OTP. The test code uses the oracle method to<br />

calculate the expected result automatically.<br />

Figure 3 shows the Login design scenario and the generated<br />

Login_test test scenario. The test scenario proceeds from the<br />

transformation Scenario2Test. Figure 3 also shows the Login_SM<br />

state machine, which represents the possible states for the Login<br />

The Magazine for Professional Testers<br />

29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!