Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...
Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...
Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 8. openETCS Domain Framework<br />
The class<strong>es</strong> in ::oETCS::DF::UT are the t<strong>es</strong>t suit<strong>es</strong>, which inherit from TextFixture [16],<br />
which is a class of the CppUnit framework. The class<strong>es</strong> that are t<strong>es</strong>ted are indicated by the<br />
aggregations m_pAnd, m_pTelegram, m_pStateMachine, and m_pControlFlow. Of course, all<br />
class<strong>es</strong> are t<strong>es</strong>ted, but, due to the size and complexity of the figure, only some exampl<strong>es</strong> are<br />
sketched.<br />
The t<strong>es</strong>t suite class<strong>es</strong> must have acc<strong>es</strong>s to all attribut<strong>es</strong>, which include the private and<br />
protected on<strong>es</strong>, of the t<strong>es</strong>ted class<strong>es</strong> to provide white-box t<strong>es</strong>ting [78, p. 312] instead of pure<br />
black-box t<strong>es</strong>ting [78, p. 312], which only runs t<strong>es</strong>ts on the outputs for certain inputs. Since<br />
most of those methods are not public visible / acc<strong>es</strong>sible, a friend [79] relation between t<strong>es</strong>t<br />
suite class<strong>es</strong> and the class<strong>es</strong> to be t<strong>es</strong>ted have to be defined (omitted in the figure). Black-box<br />
t<strong>es</strong>ting might be sufficient for t<strong>es</strong>ts for the CFunctionBlock class<strong>es</strong> because those are defined as<br />
transfer functions for certain inputs, which return certain outputs. Consequently, their internal<br />
stat<strong>es</strong> are not of inter<strong>es</strong>t for the t<strong>es</strong>ts. However, this is not the case for all other class<strong>es</strong> and<br />
white-box t<strong>es</strong>ts are implemented via direct class attribute acc<strong>es</strong>s.<br />
8.7.2. Unit T<strong>es</strong>ting Implementation<br />
The implementation of t<strong>es</strong>ts for CFunctionBlock blocks is realised as random t<strong>es</strong>ting [78, p. 317].<br />
For all inputs of a certain CFunctionBlock class, random input valu<strong>es</strong> are generated. Since the<br />
the transfer function for the Execute() method is always well-defined for each CFunctionBlock<br />
class, the r<strong>es</strong>ulting outputs can be checked for the expected valu<strong>es</strong>.<br />
For class<strong>es</strong> outside the data flow, such interconnections between inputs and outputs is not<br />
defined. Therefore, those have to be t<strong>es</strong>ted in a simulative way [78, p. 318]. Especially, the<br />
class<strong>es</strong> for control flows (CControlFlow and CEVCStateMachine) can be additionally t<strong>es</strong>ted<br />
by state transition t<strong>es</strong>ting [78, p. 318]. For those cas<strong>es</strong>, a transition system is instantiated<br />
by corr<strong>es</strong>ponding state and transition objects and then is t<strong>es</strong>ted if all stat<strong>es</strong> are reached and<br />
executed as expected.<br />
A further, more detailed discussion of t<strong>es</strong>t implementation is not in the main focus of this<br />
work. The software reference of the t<strong>es</strong>ts and their implementation can be found in Appendix G.<br />
8.8. Conclusion<br />
The d<strong>es</strong>ign, the implementation, and finally the t<strong>es</strong>ting of the openETCS domain framework<br />
show that all initial defined requirements are fulfilled. Certain, already theoretical introduced<br />
issu<strong>es</strong>, like the integration of hardware virtualisation, are dealt with. Furthermore, the domain<br />
framework is aligned to the terminology of the OMG’s definition of a model-driven architecture<br />
(MDA).<br />
The special situations of the behavioural d<strong>es</strong>ign is d<strong>es</strong>cribed because this is defined by<br />
the instantiation of domain framework class<strong>es</strong>. This can also be called “behaviour through<br />
structure”.<br />
In contrast to all other instanc<strong>es</strong> of the openETCS architecture, the domain framework has<br />
to differentiate between faults, errors, and system failur<strong>es</strong> and has to provide an error handling<br />
interface to the meta model r<strong>es</strong>pectively model.<br />
158