Commit 4b7b71b3 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Converting Python test to XML

parent 24b1dc92
......@@ -11,7 +11,6 @@ SET (TESTS_WITH_BASELINES
# ${CMAKE_CURRENT_SOURCE_DIR}/CTHAMRMaterialInterfaceFilter.py
${CMAKE_CURRENT_SOURCE_DIR}/FileSeries.py
${CMAKE_CURRENT_SOURCE_DIR}/NonlinearSubdivisionDisplay.py
${CMAKE_CURRENT_SOURCE_DIR}/SaveLargeScreenshot.py
${CMAKE_CURRENT_SOURCE_DIR}/SLACTools.py
)
......@@ -62,7 +61,6 @@ set (StreamingServerSideTest_DISABLE_CRS TRUE)
SET (StreamingServerSideTest_BREAK TRUE)
# Set image threshold overrides for the tests.
SET(SaveLargeScreenshot_THRESHOLD 10000)
SET(SLACTools_THRESHOLD 20)
add_client_tests("pypv"
......
#/usr/bin/env python
import QtTesting
import QtTestingImage
object1 = 'pqClientMainWindow/menubar/menuSources'
QtTesting.playCommand(object1, 'activate', 'RTAnalyticSource')
object2 = 'pqClientMainWindow/objectInspectorDock/objectInspector/Accept'
QtTesting.playCommand(object2, 'activate', '')
object3 = 'pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/0/MultiViewFrameMenu/SplitHorizontalButton'
QtTesting.playCommand(object3, 'activate', '')
object4 = 'pqClientMainWindow/menubar/menuFilters/DataAnalysis'
QtTesting.playCommand(object4, 'activate', 'ProbeLine')
QtTesting.playCommand(object2, 'activate', '')
object5 = 'pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/1/MultiViewFrameMenu/SplitVerticalButton'
QtTesting.playCommand(object5, 'activate', '')
object6 = 'pqClientMainWindow/pipelineBrowserDock/pipelineBrowser'
QtTesting.playCommand(object6, 'mousePress', '1,1,0,51,13,/0:0/0:0')
QtTesting.playCommand(object6, 'mouseRelease', '1,0,0,51,13,/0:0/0:0')
QtTesting.playCommand(object4, 'activate', 'ExtractHistogram')
QtTesting.playCommand(object2, 'activate', '')
object7 = 'pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/0/MultiViewFrameMenu/SplitVerticalButton'
QtTesting.playCommand(object7, 'activate', '')
object8 = 'pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/MultiViewSplitter:0/0/MultiViewFrameMenu/WindowCaption'
QtTesting.playCommand(object8, 'mousePress', '1,1,0,42,4')
QtTesting.playCommand(object8, 'mouseRelease', '1,0,0,42,4')
###
object15 = 'pqClientMainWindow/pipelineBrowserDock/pipelineBrowser'
QtTesting.playCommand(object15, 'keyEvent', '7,16777220,0, ,0,1')
object16 = 'pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/MultiViewSplitter:1/0/MultiViewFrameMenu/CloseAction'
QtTesting.playCommand(object16, 'activate', '')
object17 = 'pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/1/MultiViewFrameMenu/SplitVerticalAction'
QtTesting.playCommand(object17, 'activate', '')
object18 = 'pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/MultiViewSplitter:1/1/1QWidget0/1QScrollArea0/qt_scrollarea_viewport/EmptyView/ConvertActionsFrame/3D View'
QtTesting.playCommand(object18, 'activate', '')
###
object9 = 'pqClientMainWindow/menubar/menu_File'
QtTesting.playCommand(object9, 'activate', 'actionFileSaveScreenshot')
object12 = 'pqClientMainWindow/SaveSnapshotDialog/selectedViewOnly'
QtTesting.playCommand(object12, 'set_boolean', 'false')
object10 = 'pqClientMainWindow/SaveSnapshotDialog/width'
QtTesting.playCommand(object10, 'set_string', '1')
QtTesting.playCommand(object10, 'set_string', '10')
QtTesting.playCommand(object10, 'key', '16777219')
QtTesting.playCommand(object10, 'key', '16777219')
QtTesting.playCommand(object10, 'set_string', '9')
QtTesting.playCommand(object10, 'set_string', '90')
QtTesting.playCommand(object10, 'set_string', '900')
object11 = 'pqClientMainWindow/SaveSnapshotDialog/height'
QtTesting.playCommand(object11, 'key', '16777217')
QtTesting.playCommand(object11, 'set_string', '90')
QtTesting.playCommand(object11, 'set_string', '90')
QtTesting.playCommand(object11, 'set_string', '900')
object13 = 'pqClientMainWindow/SaveSnapshotDialog/ok'
QtTesting.playCommand(object13, 'activate', '')
object14 = 'pqClientMainWindow/FileSaveScreenshotDialog'
#remove old file, if any
QtTesting.playCommand(object14, 'remove',
'$PARAVIEW_TEST_ROOT/savelargescreenshot.test.png')
QtTesting.playCommand(object14, 'filesSelected', '$PARAVIEW_TEST_ROOT/savelargescreenshot.test.png')
import time
print "Wait for 2 secs"
time.sleep(2);
QtTestingImage.compareImage('$PARAVIEW_TEST_ROOT/savelargescreenshot.test.png',
'SaveLargeScreenshot.png');
......@@ -8,6 +8,7 @@ SET (TESTS_WITH_INLINE_COMPARES
${CMAKE_CURRENT_SOURCE_DIR}/TestIsoVolume.xml
${CMAKE_CURRENT_SOURCE_DIR}/LoadStateMultiView.xml
${CMAKE_CURRENT_SOURCE_DIR}/RenderNan.xml
${CMAKE_CURRENT_SOURCE_DIR}/SaveLargeScreenshot.xml
)
SET (TESTS_WITH_BASELINES)
......@@ -284,6 +285,9 @@ SET (H5PartReaderPlugin_DISABLE_CRS TRUE)
SET (LoadPlugins_DISABLE_CRS TRUE)
SET (NiftiReaderWriterPlugin_DISABLE_CRS TRUE)
# Set image threshold overrides for the tests.
SET(SaveLargeScreenshot_THRESHOLD 10000)
IF(NOT PARAVIEW_BUILD_PLUGIN_EyeDomeLighting)
SET(EyeDomeLighting_DISABLE_C TRUE)
ENDIF()
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="RTAnalyticSource" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/0/MultiViewFrameMenu/SplitHorizontalButton" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/DataAnalysis" command="activate" arguments="ProbeLine" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/1/MultiViewFrameMenu/SplitVerticalButton" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,51,13,/0:0/0:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,51,13,/0:0/0:0" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/DataAnalysis" command="activate" arguments="ExtractHistogram" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/0/MultiViewFrameMenu/SplitVerticalButton" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/MultiViewSplitter:0/0/MultiViewFrameMenu/WindowCaption" command="mousePress" arguments="1,1,0,42,4" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/MultiViewSplitter:0/0/MultiViewFrameMenu/WindowCaption" command="mouseRelease" arguments="1,0,0,42,4" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="keyEvent" arguments="7,16777220,0, ,0,1" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/MultiViewSplitter:1/0/MultiViewFrameMenu/CloseAction" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/1/MultiViewFrameMenu/SplitVerticalAction" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewManager/SplitterFrame/MultiViewSplitter/MultiViewSplitter:1/1/1QWidget0/1QScrollArea0/qt_scrollarea_viewport/EmptyView/ConvertActionsFrame/3D View" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileSaveScreenshot" />
<pqevent object="pqClientMainWindow/SaveSnapshotDialog/selectedViewOnly" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/SaveSnapshotDialog/width" command="set_string" arguments="900" />
<pqevent object="pqClientMainWindow/SaveSnapshotDialog/height" command="set_string" arguments="900" />
<pqevent object="pqClientMainWindow/SaveSnapshotDialog/ok" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileSaveScreenshotDialog" command="remove" arguments="$PARAVIEW_TEST_ROOT/savelargescreenshot.test.png" />
<pqevent object="pqClientMainWindow/FileSaveScreenshotDialog" command="filesSelected" arguments="$PARAVIEW_TEST_ROOT/savelargescreenshot.test.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/savelargescreenshot.test.png" baseline="$PARAVIEW_DATA_ROOT/Baseline/SaveLargeScreenshot.png" />
</pqevents>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment