A testing apparatus for performing a setup testing or a hold testing on a
device under test ("DUT") storing a given data signal according to a
given clock signal is provided, wherein the testing apparatus includes a
timing generating unit for generating sequentially a plurality of timing
signals having different timings during the setup testing or the hold
testing on the basis of a fist offset value given before starting the
setup testing or the hold testing; a pattern generating unit for
generating the clock signal and the data signal; a pattern formatting
unit for shifting the phase of the data signal with respect to the clock
signal sequentially according to the timing signals sequentially
generated and providing the DUT with the clock signal and the
phase-shifted data signal sequentially; and a determining module for
acquiring a setup time or a hold time of the DUT on the basis of storage
data which are the data signals stored by the DUT.