Public Slots | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
pqCoreTestUtility Class Reference

Provides ParaView-specific functionality for regression testing. More...

#include <pqCoreTestUtility.h>

Inheritance diagram for pqCoreTestUtility:
Inheritance graph
[legend]

Public Slots

void setDashboardMode (bool value) override
 put/unset the DASHBOARD_TEST_FROM_CTEST env var to control if ParaView should behave in dashboard mode Also update players and translators More...
 
void updatePlayers () override
 Reimplemented to add/remove the file dialog player according to the DASHBOARD_TEST_FROM_CTEST env var. More...
 
void updateTranslators () override
 Reimplementated to add/remove the file dialog translator according to the DASHBOARD_TEST_FROM_CTEST env var. More...
 

Public Member Functions

 pqCoreTestUtility (QObject *parent=nullptr)
 
 ~pqCoreTestUtility () override
 
bool supportsDashboardMode () override
 Reimplemented to inform this test utility supports dashboard mode always returns true. More...
 

Static Public Member Functions

static QString fixPath (const QString &path)
 Cleans up patch to replace $PARAVIEW_TEST_ROOT and $PARAVIEW_DATA_ROOT with appropriate paths specified on the command line. More...
 
static QString DataRoot ()
 Returns the absolute path to the PARAVIEW_DATA_ROOT in canonical form (slashes forward), or empty string. More...
 
static QString TestDirectory ()
 Returns the temporary test directory in which tests can write temporary outputs, difference images etc. More...
 
static QString BaselineDirectory ()
 Returns the baseline directory in which test recorder will write baseline images. More...
 
static bool SaveScreenshot (vtkRenderWindow *RenderWindow, const QString &File)
 Saves the contents of a render window to a file for later use as a reference image. More...
 
static bool CompareImage (vtkRenderWindow *renderWindow, const QString &referenceImage, double threshold, ostream &output, const QString &tempDirectory, const QSize &size=QSize(300, 300))
 Compares the contents of a render window to a reference image, returning true iff the two match within a given threshold. More...
 
static bool CompareImage (vtkImageData *testImage, const QString &ReferenceImage, double Threshold, ostream &Output, const QString &TempDirectory)
 Compares the test image to a reference image, returning true iff the two match within a given threshold. More...
 
static bool CompareImage (const QString &testPNGImage, const QString &ReferenceImage, double Threshold, ostream &Output, const QString &TempDirectory)
 
static bool CompareImage (QWidget *widget, const QString &referenceImage, double threshold, ostream &output, const QString &tempDirectory, const QSize &size=QSize(300, 300))
 Compares the contents of any arbitrary QWidget to a reference image, returning true iff the two match within a given threshold. More...
 
static bool CompareView (pqView *curView, const QString &referenceImage, double threshold, const QString &tempDirectory, const QSize &size=QSize())
 
static bool CompareTile (QWidget *widget, int rank, int tdx, int tdy, const QString &baseline, double threshold, ostream &output, const QString &tempDirectory)
 
static bool CompareTile (pqView *widget, int rank, int tdx, int tdy, const QString &baseline, double threshold, ostream &output, const QString &tempDirectory)
 
static QString cleanPath (const QString &)
 Cleans a path string. More...
 

Static Public Attributes

static const char * PQ_COMPAREVIEW_PROPERTY_NAME
 

Detailed Description

Provides ParaView-specific functionality for regression testing.

Definition at line 24 of file pqCoreTestUtility.h.

Constructor & Destructor Documentation

◆ pqCoreTestUtility()

pqCoreTestUtility::pqCoreTestUtility ( QObject *  parent = nullptr)

◆ ~pqCoreTestUtility()

pqCoreTestUtility::~pqCoreTestUtility ( )
override

Member Function Documentation

◆ fixPath()

static QString pqCoreTestUtility::fixPath ( const QString &  path)
static

Cleans up patch to replace $PARAVIEW_TEST_ROOT and $PARAVIEW_DATA_ROOT with appropriate paths specified on the command line.

◆ DataRoot()

static QString pqCoreTestUtility::DataRoot ( )
static

Returns the absolute path to the PARAVIEW_DATA_ROOT in canonical form (slashes forward), or empty string.

◆ TestDirectory()

static QString pqCoreTestUtility::TestDirectory ( )
static

Returns the temporary test directory in which tests can write temporary outputs, difference images etc.

◆ BaselineDirectory()

static QString pqCoreTestUtility::BaselineDirectory ( )
static

Returns the baseline directory in which test recorder will write baseline images.

◆ SaveScreenshot()

static bool pqCoreTestUtility::SaveScreenshot ( vtkRenderWindow RenderWindow,
const QString &  File 
)
static

Saves the contents of a render window to a file for later use as a reference image.

◆ CompareImage() [1/4]

static bool pqCoreTestUtility::CompareImage ( vtkRenderWindow renderWindow,
const QString &  referenceImage,
double  threshold,
ostream &  output,
const QString &  tempDirectory,
const QSize &  size = QSize(300, 300) 
)
static

Compares the contents of a render window to a reference image, returning true iff the two match within a given threshold.

◆ CompareImage() [2/4]

static bool pqCoreTestUtility::CompareImage ( vtkImageData testImage,
const QString &  ReferenceImage,
double  Threshold,
ostream &  Output,
const QString &  TempDirectory 
)
static

Compares the test image to a reference image, returning true iff the two match within a given threshold.

◆ CompareImage() [3/4]

static bool pqCoreTestUtility::CompareImage ( const QString &  testPNGImage,
const QString &  ReferenceImage,
double  Threshold,
ostream &  Output,
const QString &  TempDirectory 
)
static

◆ CompareImage() [4/4]

static bool pqCoreTestUtility::CompareImage ( QWidget *  widget,
const QString &  referenceImage,
double  threshold,
ostream &  output,
const QString &  tempDirectory,
const QSize &  size = QSize(300, 300) 
)
static

Compares the contents of any arbitrary QWidget to a reference image, returning true iff the two match within a given threshold.

◆ CompareView()

static bool pqCoreTestUtility::CompareView ( pqView curView,
const QString &  referenceImage,
double  threshold,
const QString &  tempDirectory,
const QSize &  size = QSize() 
)
static

◆ CompareTile() [1/2]

static bool pqCoreTestUtility::CompareTile ( QWidget *  widget,
int  rank,
int  tdx,
int  tdy,
const QString &  baseline,
double  threshold,
ostream &  output,
const QString &  tempDirectory 
)
static

◆ CompareTile() [2/2]

static bool pqCoreTestUtility::CompareTile ( pqView widget,
int  rank,
int  tdx,
int  tdy,
const QString &  baseline,
double  threshold,
ostream &  output,
const QString &  tempDirectory 
)
static

◆ cleanPath()

static QString pqCoreTestUtility::cleanPath ( const QString &  )
static

Cleans a path string.

◆ supportsDashboardMode()

bool pqCoreTestUtility::supportsDashboardMode ( )
inlineoverride

Reimplemented to inform this test utility supports dashboard mode always returns true.

Definition at line 107 of file pqCoreTestUtility.h.

◆ setDashboardMode

void pqCoreTestUtility::setDashboardMode ( bool  value)
overrideslot

put/unset the DASHBOARD_TEST_FROM_CTEST env var to control if ParaView should behave in dashboard mode Also update players and translators

◆ updatePlayers

void pqCoreTestUtility::updatePlayers ( )
overrideslot

Reimplemented to add/remove the file dialog player according to the DASHBOARD_TEST_FROM_CTEST env var.

◆ updateTranslators

void pqCoreTestUtility::updateTranslators ( )
overrideslot

Reimplementated to add/remove the file dialog translator according to the DASHBOARD_TEST_FROM_CTEST env var.

Member Data Documentation

◆ PQ_COMPAREVIEW_PROPERTY_NAME

const char* pqCoreTestUtility::PQ_COMPAREVIEW_PROPERTY_NAME
static

Definition at line 91 of file pqCoreTestUtility.h.


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