ParaView
Public Member Functions | Protected Attributes
pqTestUtility Class Reference

Organizes basic functionality for regression testing. More...

#include <pqTestUtility.h>

Inheritance diagram for pqTestUtility:
Inheritance graph
[legend]
Collaboration diagram for pqTestUtility:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 pqTestUtility (QObject *parent=0)
 ~pqTestUtility ()
pqEventDispatcherdispatcher ()
 Get the event dispatcher. Dispatcher is used to play tests back.
pqEventPlayereventPlayer ()
 Get the event player.
pqEventTranslatoreventTranslator ()
 Get the event translator. This is used for recording tests.
void addEventSource (const QString &fileExtension, pqEventSource *source)
 add an event source for playback of files An pqXMLEventSource is automatically added if XML support is enabled.
void addEventObserver (const QString &fileExtension, pqEventObserver *translator)
 add an event observer for recording files An pqXMLEventObserver is automatically added if XML support is enabled.
bool playingTest () const
 Returns if the utility is currently playing a test.
bool playTests (const QString &filename)
 Plays back the test given by the filename(s).
virtual bool playTests (const QStringList &filenames)
void recordTests (const QString &filename)
 start the recording of tests to a file
void addDataDirectory (const QString &label, const QDir &path)
 add a directory for recording/playback of file dialogs
void removeDataDirectory (const QString &label)
 remove a directory for recording/playback of file dialogs
QString convertToDataDirectory (const QString &file)
 given filename convert to one of the data directories
QString convertFromDataDirectory (const QString &file)
 give a filename convert from one of the data directories

Protected Attributes

pqEventDispatcher Dispatcher
pqEventPlayer Player
pqEventTranslator Translator
bool PlayingTest
QMap< QString, pqEventSource * > EventSources
QMap< QString, pqEventObserver * > EventObservers
QMap< QString, QDir > DataDirectories

Detailed Description

Organizes basic functionality for regression testing.

Definition at line 52 of file pqTestUtility.h.


Constructor & Destructor Documentation

pqTestUtility::pqTestUtility ( QObject *  parent = 0)
pqTestUtility::~pqTestUtility ( )

Member Function Documentation

pqEventDispatcher* pqTestUtility::dispatcher ( )

Get the event dispatcher. Dispatcher is used to play tests back.

pqEventPlayer* pqTestUtility::eventPlayer ( )

Get the event player.

This the test-file-interpreter (if you will), that parses the test file and creates events from it that can be dispatched by the pqEventDispatcher.

pqEventTranslator* pqTestUtility::eventTranslator ( )

Get the event translator. This is used for recording tests.

void pqTestUtility::addEventSource ( const QString &  fileExtension,
pqEventSource source 
)

add an event source for playback of files An pqXMLEventSource is automatically added if XML support is enabled.

A pqPythonEventSource is automatically added if Python support is enabled.

void pqTestUtility::addEventObserver ( const QString &  fileExtension,
pqEventObserver translator 
)

add an event observer for recording files An pqXMLEventObserver is automatically added if XML support is enabled.

A pqPythonEventObserver is automatically added if Python support is enabled.

bool pqTestUtility::playingTest ( ) const [inline]

Returns if the utility is currently playing a test.

Definition at line 86 of file pqTestUtility.h.

bool pqTestUtility::playTests ( const QString &  filename)

Plays back the test given by the filename(s).

This is a blocking call i.e. it does not return until the test has been played or aborted due to failure. Returns true if the test played successfully.

virtual bool pqTestUtility::playTests ( const QStringList &  filenames) [virtual]
void pqTestUtility::recordTests ( const QString &  filename)

start the recording of tests to a file

void pqTestUtility::addDataDirectory ( const QString &  label,
const QDir &  path 
)

add a directory for recording/playback of file dialogs

void pqTestUtility::removeDataDirectory ( const QString &  label)

remove a directory for recording/playback of file dialogs

QString pqTestUtility::convertToDataDirectory ( const QString &  file)

given filename convert to one of the data directories

QString pqTestUtility::convertFromDataDirectory ( const QString &  file)

give a filename convert from one of the data directories


Member Data Documentation

Definition at line 111 of file pqTestUtility.h.

Definition at line 112 of file pqTestUtility.h.

Definition at line 113 of file pqTestUtility.h.

bool pqTestUtility::PlayingTest [protected]

Definition at line 114 of file pqTestUtility.h.

QMap<QString, pqEventSource*> pqTestUtility::EventSources [protected]

Definition at line 116 of file pqTestUtility.h.

QMap<QString, pqEventObserver*> pqTestUtility::EventObservers [protected]

Definition at line 117 of file pqTestUtility.h.

QMap<QString, QDir> pqTestUtility::DataDirectories [protected]

Definition at line 119 of file pqTestUtility.h.


The documentation for this class was generated from the following file: