07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

504 Zhen Ru Dai<br />

can be mapped to JUnit concepts. But s<strong>in</strong>ce JUnit is a framework only for unit<br />

tests, there are a lot of concepts <strong>in</strong> U2TP which are not def<strong>in</strong>ed <strong>in</strong> JUnit and<br />

also needed for unit tests.<br />

A System Under Test does not need to be identified explicitly <strong>in</strong> JUnit. Any<br />

class <strong>in</strong> the classpath can be considered as an utility class or a SUT class. An<br />

arbiter can be realized as a property of the test suite of a type TestResult.<br />

A test context is realized as a class <strong>in</strong>herit<strong>in</strong>g from the JUnit TestCase class.<br />

Test control is def<strong>in</strong>ed by overload<strong>in</strong>g the runTest operation of he JUnit fixture.<br />

A test case is an operation <strong>in</strong> JUnit. Coord<strong>in</strong>ation can be mapped us<strong>in</strong>g any<br />

available synchronization mechanism available to the test components such as<br />

semaphores. In JUnit, predef<strong>in</strong>ed verdicts are pass, fail and error. There is no<br />

<strong>in</strong>conclusive verdict. Test components, stimulus, observation, test configuration,<br />

timezone are not def<strong>in</strong>ed <strong>in</strong> JUnit s<strong>in</strong>ce these concepts are only needed for system<br />

tests. Also wildcards, cod<strong>in</strong>g rules and timers are not concepts of JUnit.<br />

17.3.2 TTCN-3<br />

Fundamentals of TTCN-3 The Test<strong>in</strong>g and Test Control Notation - 3rd edition<br />

(TTCN-3) is a test specification and implementation language to def<strong>in</strong>e test<br />

procedures for black-box test<strong>in</strong>g. At time, it is the only accepted standard for<br />

test system development <strong>in</strong> the telecommunication area.<br />

TTCN-3 is a modular language. It comprises concepts suitable for various<br />

types of system test<strong>in</strong>gs. Additionally to typical programm<strong>in</strong>g languages, it also<br />

conta<strong>in</strong>s features necessary to specify test procedures like test verdicts, match<strong>in</strong>g<br />

mechanisms, timer handl<strong>in</strong>g, dynamic test configuration specifications, specification<br />

of encod<strong>in</strong>g <strong>in</strong>formation, synchronous and asynchronous communications.<br />

In a TTCN-3 module, stimuli are sent to the system under test (SUT). Its<br />

reactions are observed and compared with the expected behavior def<strong>in</strong>ed <strong>in</strong> the<br />

test case. Based on this comparison, the subsequent test behavior is determ<strong>in</strong>ed<br />

and a test verdict is assigned. If the expected and the observed responses differ,<br />

a failure test verdict is assigned. A successful test is <strong>in</strong>dicated by a test verdict<br />

pass. S<strong>in</strong>ce TTCN-3 has been <strong>in</strong>troduced <strong>in</strong> the last chapter <strong>in</strong> detail, the reader<br />

is requested to read that chapter for a better understand<strong>in</strong>g.<br />

Mapp<strong>in</strong>g to TTCN-3 TTCN-3 served as a second basis for the development of<br />

the U2TP. Nevertheless, there are concepts which differ from or are added to<br />

the Test<strong>in</strong>g Profile. Thus, a mapp<strong>in</strong>g from the Test<strong>in</strong>g Profile to TTCN-3 is<br />

complete but not the other way around.<br />

Table 17.4 shows an excerpt of the most important mapp<strong>in</strong>g rules of the<br />

standard. It compares the U2TP concepts with exist<strong>in</strong>g TTCN-3 test<strong>in</strong>g concepts.<br />

Almost all U2TP concepts have direct correspondence or can be mapped<br />

to TTCN-3 test<strong>in</strong>g concepts.<br />

In order to represent the system under test, TTCN-3 provides the <strong>in</strong>direct<br />

def<strong>in</strong>ition via ports from the test components to the SUT. Test components are<br />

specified by component types. There is a default arbiter built <strong>in</strong> TTCN-3. If the<br />

user wants to specify an explicit arbiter, it must be realized by the ma<strong>in</strong> test

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

Saved successfully!

Ooh no, something went wrong!