]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add SQUISH tests
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 15 Oct 2015 13:40:09 +0000 (16:40 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 15 Oct 2015 13:40:09 +0000 (16:40 +0300)
14 files changed:
test.squish/suite_ERROR_NOTIFICATION/envvars [new file with mode: 0644]
test.squish/suite_ERROR_NOTIFICATION/shared/scripts/common.py [new symlink]
test.squish/suite_ERROR_NOTIFICATION/suite.conf [new file with mode: 0644]
test.squish/suite_ERROR_NOTIFICATION/tst_679/test.py [new file with mode: 0644]
test.squish/suite_FEATURE_PARAMETERS/envvars [new file with mode: 0644]
test.squish/suite_FEATURE_PARAMETERS/shared/scripts/common.py [new symlink]
test.squish/suite_FEATURE_PARAMETERS/suite.conf [new file with mode: 0644]
test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py [new file with mode: 0644]
test.squish/suite_FEATURE_PARAMETERS/tst_576/test.py [new file with mode: 0644]
test.squish/suite_ISSUES_SALOME/tst_474/test.py [deleted file]
test.squish/suite_ISSUES_SALOME/tst_576/test.py [deleted file]
test.squish/suite_ISSUES_SALOME/tst_679/test.py [deleted file]
test.squish/suite_STANDALONE/tst_c/test.py
test_squish.sh

diff --git a/test.squish/suite_ERROR_NOTIFICATION/envvars b/test.squish/suite_ERROR_NOTIFICATION/envvars
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test.squish/suite_ERROR_NOTIFICATION/shared/scripts/common.py b/test.squish/suite_ERROR_NOTIFICATION/shared/scripts/common.py
new file mode 120000 (symlink)
index 0000000..c9dd6a8
--- /dev/null
@@ -0,0 +1 @@
+../../../shared/scripts/common.py
\ No newline at end of file
diff --git a/test.squish/suite_ERROR_NOTIFICATION/suite.conf b/test.squish/suite_ERROR_NOTIFICATION/suite.conf
new file mode 100644 (file)
index 0000000..bae54b5
--- /dev/null
@@ -0,0 +1,10 @@
+AUT=salome_run.sh
+CWD=<AUT_path>
+ENVVARS=envvars
+HOOK_SUB_PROCESSES=true
+IMPLICITAUTSTART=0
+LANGUAGE=Python
+OBJECTMAP=../objects_salome.map
+TEST_CASES=tst_BASE
+VERSION=3
+WRAPPERS=Qt
diff --git a/test.squish/suite_ERROR_NOTIFICATION/tst_679/test.py b/test.squish/suite_ERROR_NOTIFICATION/tst_679/test.py
new file mode 100644 (file)
index 0000000..b186d75
--- /dev/null
@@ -0,0 +1,31 @@
+#[tested functionality] 1. Add parameter 2. Use wrong parameter name 3. Error notification in header 3. Error notification in widget
+
+def main():
+    source(findFile("scripts", "common.py"))
+    
+    startApplication("salome_run.sh")
+    
+    activate_newgeom()
+    
+    clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+    type(waitForObject(":Parameter_QLineEdit"), "a")
+    type(waitForObject(":Parameter_ExpressionEditor"), "3")
+    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+    
+    clickButton(waitForObject(":SALOME*.ConstructionPoint_QToolButton"))
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "a")
+    waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
+    test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate")
+
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
+    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "b")
+
+    waitFor("object.exists(':Point_QFrame')", 20000)
+    
+    test.compare(str(findObject(":Point_QFrame").toolTip), "ModelAPI_StateInvalidArgument")
+    
+    waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
+    test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate\nErrors:\nx - Model_AttributeValidator: name 'b' is not defined")
+
+    close_application()
diff --git a/test.squish/suite_FEATURE_PARAMETERS/envvars b/test.squish/suite_FEATURE_PARAMETERS/envvars
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test.squish/suite_FEATURE_PARAMETERS/shared/scripts/common.py b/test.squish/suite_FEATURE_PARAMETERS/shared/scripts/common.py
new file mode 120000 (symlink)
index 0000000..c9dd6a8
--- /dev/null
@@ -0,0 +1 @@
+../../../shared/scripts/common.py
\ No newline at end of file
diff --git a/test.squish/suite_FEATURE_PARAMETERS/suite.conf b/test.squish/suite_FEATURE_PARAMETERS/suite.conf
new file mode 100644 (file)
index 0000000..bae54b5
--- /dev/null
@@ -0,0 +1,10 @@
+AUT=salome_run.sh
+CWD=<AUT_path>
+ENVVARS=envvars
+HOOK_SUB_PROCESSES=true
+IMPLICITAUTSTART=0
+LANGUAGE=Python
+OBJECTMAP=../objects_salome.map
+TEST_CASES=tst_BASE
+VERSION=3
+WRAPPERS=Qt
diff --git a/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py b/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py
new file mode 100644 (file)
index 0000000..181b7f4
--- /dev/null
@@ -0,0 +1,49 @@
+#[tested functionality] 1. Add parameter 2. Calculate parameter 3. Delete parameter
+
+def main():
+    source(findFile("scripts", "common.py"))
+    
+    startApplication("salome_run.sh")
+    
+    activate_newgeom()
+    
+    #[step] Create parameter 'aa = 4'
+    activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
+    activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
+    type(waitForObject(":Parameter_QLineEdit"), "aa")
+    type(waitForObject(":Parameter_ExpressionEditor"), "4")
+    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+    # check the new parameter
+    waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
+
+    clickButton(waitForObject(":SALOME*.New part_QToolButton"))
+    
+    activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
+    activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
+    type(waitForObject(":Parameter_QLineEdit"), "bb")
+    type(waitForObject(":Parameter_ExpressionEditor"), "aa+1")
+    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+
+    # check the new parameter
+    waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
+
+    openContextMenu(waitForObject(":Object browser_QLineEdit"), 10, 10, 0)
+    activateItem(waitForObjectItem(":_QMenu", "Activate"))
+    
+    openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).aa = 4", 10, 10, 0)
+    activateItem(waitForObjectItem(":_QMenu", "Delete"))
+    waitFor("object.exists(':Delete features._QLabel')", 20000)
+    
+    an_expected = """Selected parameters are used in the following features: bb.
+These features will be deleted.
+Or parameters could be replaced by their values.
+Would you like to continue?"""     
+    test.compare(str(findObject(":Delete features._QLabel").text), an_expected)
+    clickButton(waitForObject(":Delete features.No_QPushButton"))
+
+    # nothing is deleted
+    waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
+    waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
+    
+    close_application()
diff --git a/test.squish/suite_FEATURE_PARAMETERS/tst_576/test.py b/test.squish/suite_FEATURE_PARAMETERS/tst_576/test.py
new file mode 100644 (file)
index 0000000..6d375a4
--- /dev/null
@@ -0,0 +1,29 @@
+#[tested functionality] 1. Add parameter 2. Rename parameter
+
+def main():
+    source(findFile("scripts", "common.py"))
+    
+    startApplication("salome_run.sh")
+   
+    activate_newgeom()
+    
+    clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
+    type(waitForObject(":Parameter_QLineEdit"), "a")
+    type(waitForObject(":Parameter_ExpressionEditor"), "3")
+    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
+    
+    openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).a = 3", 10, 10, 0)
+    activateItem(waitForObjectItem(":_QMenu", "Rename"))
+    type(waitForObject(":_QExpandingLineEdit"), "b")
+    type(waitForObject(":_QExpandingLineEdit"), "<Return>")
+    
+    test.compare(waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).b = 3").text, "b = 3")
+    
+    openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).b = 3", 111, 5, 0)
+    activateItem(waitForObjectItem(":_QMenu", "Edit..."))
+    waitFor("object.exists(':Parameter_QLineEdit')", 20000)
+    test.compare(str(findObject(":Parameter_QLineEdit").text), "b")
+    waitFor("object.exists(':Parameter_ExpressionEditor')", 20000)
+    test.compare(str(findObject(":Parameter_ExpressionEditor").plainText), "3")
+
+    close_application()
diff --git a/test.squish/suite_ISSUES_SALOME/tst_474/test.py b/test.squish/suite_ISSUES_SALOME/tst_474/test.py
deleted file mode 100644 (file)
index 9cea5a8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-def main():
-    source(findFile("scripts", "common.py"))
-    
-    startApplication("salome_run.sh")
-    
-    activate_newgeom()
-    
-    #[step] Create parameter 'aa = 4'
-    activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
-    activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
-    type(waitForObject(":Parameter_QLineEdit"), "aa")
-    type(waitForObject(":Parameter_ExpressionEditor"), "4")
-    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-
-    # check the new parameter
-    waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
-
-    clickButton(waitForObject(":SALOME*.New part_QToolButton"))
-    
-    activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
-    activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
-    type(waitForObject(":Parameter_QLineEdit"), "bb")
-    type(waitForObject(":Parameter_ExpressionEditor"), "aa+1")
-    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-
-    # check the new parameter
-    waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
-
-    openContextMenu(waitForObject(":Object browser_QLineEdit"), 10, 10, 0)
-    activateItem(waitForObjectItem(":_QMenu", "Activate"))
-    
-    openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).aa = 4", 10, 10, 0)
-    activateItem(waitForObjectItem(":_QMenu", "Delete"))
-    waitFor("object.exists(':Delete features._QLabel')", 20000)
-    
-    an_expected = """Selected parameters are used in the following features: bb.
-These features will be deleted.
-Or parameters could be replaced by their values.
-Would you like to continue?"""     
-    test.compare(str(findObject(":Delete features._QLabel").text), an_expected)
-    clickButton(waitForObject(":Delete features.No_QPushButton"))
-
-    # nothing is deleted
-    waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).aa = 4")
-    waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Parameters (1).bb = 5")
-    
-    close_application()
diff --git a/test.squish/suite_ISSUES_SALOME/tst_576/test.py b/test.squish/suite_ISSUES_SALOME/tst_576/test.py
deleted file mode 100644 (file)
index 6ba9e5e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-def main():
-    source(findFile("scripts", "common.py"))
-    
-    startApplication("salome_run.sh")
-   
-    activate_newgeom()
-    
-    clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
-    type(waitForObject(":Parameter_QLineEdit"), "a")
-    type(waitForObject(":Parameter_ExpressionEditor"), "3")
-    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-    
-    openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).a = 3", 10, 10, 0)
-    activateItem(waitForObjectItem(":_QMenu", "Rename"))
-    type(waitForObject(":_QExpandingLineEdit"), "b")
-    type(waitForObject(":_QExpandingLineEdit"), "<Return>")
-    
-    test.compare(waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1).b = 3").text, "b = 3")
-    
-    openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Parameters (1).b = 3", 111, 5, 0)
-    activateItem(waitForObjectItem(":_QMenu", "Edit..."))
-    waitFor("object.exists(':Parameter_QLineEdit')", 20000)
-    test.compare(str(findObject(":Parameter_QLineEdit").text), "b")
-    waitFor("object.exists(':Parameter_ExpressionEditor')", 20000)
-    test.compare(str(findObject(":Parameter_ExpressionEditor").plainText), "3")
-
-    close_application()
diff --git a/test.squish/suite_ISSUES_SALOME/tst_679/test.py b/test.squish/suite_ISSUES_SALOME/tst_679/test.py
deleted file mode 100644 (file)
index 978caa9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-def main():
-    source(findFile("scripts", "common.py"))
-    
-    startApplication("salome_run.sh")
-    
-    activate_newgeom()
-    
-    clickButton(waitForObject(":SALOME*.Parameter_QToolButton"))
-    type(waitForObject(":Parameter_QLineEdit"), "a")
-    type(waitForObject(":Parameter_ExpressionEditor"), "3")
-    clickButton(waitForObject(":Parameter.property_panel_ok_QToolButton"))
-    
-    clickButton(waitForObject(":SALOME*.ConstructionPoint_QToolButton"))
-    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
-    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "a")
-    waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
-    test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate")
-
-    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
-    type(waitForObject(":Point.x_ModuleBase_ParamSpinBox"), "b")
-
-    waitFor("object.exists(':Point_QFrame')", 20000)
-    
-    test.compare(str(findObject(":Point_QFrame").toolTip), "x - Model_AttributeValidator: name 'b' is not defined")
-    waitFor("object.exists(':Point.x_ModuleBase_ParamSpinBox')", 20000)
-    test.compare(str(findObject(":Point.x_ModuleBase_ParamSpinBox").toolTip), "X coordinate\nErrors:\nx - Model_AttributeValidator: name 'b' is not defined")
-
-    close_application()
index ebab2b407ed90885c972257f2e8b5e78bc50d325..818f97ff7f5d183e65b04d74884a8fbfcfae1ef1 100644 (file)
@@ -15,16 +15,22 @@ def main():
     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 531, 537, 0, Qt.LeftButton)
     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 241, 169, 0, Qt.LeftButton)
     clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
-
+    
+    test.vp("VP_SKETCH")
+    
     clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Features")
-#    mouseDrag(waitForObject(":Features_QScrollArea"), 31, 1, -2, -2, 1, Qt.LeftButton)
     clickButton(waitForObject(":Extrusion.Extrusion_AppElements_Button"))
     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 216, 270, 0, Qt.LeftButton)
     clickButton(waitForObject(":Extrusion.property_panel_ok_QToolButton"))
  
+    test.vp("VP_EXTRUSION")
+    
     clickButton(waitForObject(":Extrusion.ExtrusionFuse_AppElements_Button"))
     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 290, 316, 0, Qt.LeftButton)
 
+    clickButton(waitForObject(":OpenParts*.Fit all_QToolButton"))
+    test.vp("VP_EXTRUSIONFUSE")
+
     mouseClick(waitForObject(":Sketch.Basic_AppElements_MenuGroupPanel"), 143, 56, 0, Qt.LeftButton)
     clickButton(waitForObject(":Basic.Circle_AppElements_Button"))
     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 259, 248, 0, Qt.LeftButton)
index 4a3b2d4cf1aef05b847550711ebbc760c9ad3fc0..72db2fc1c778f6762a0b94984d47fd23e74bb5aa 100755 (executable)
@@ -56,13 +56,19 @@ TESTCASES="${TESTCASES} --testcase tst_DISTANCE"
 TESTCASES="${TESTCASES} --testcase tst_RADIUS"
 squishrunner-run suite_STANDALONE "${TESTCASES}"
 
+TESTCASES=""
+TESTCASES="${TESTCASES} --testcase tst_679"
+squishrunner-run suite_ERROR_NOTIFICATION "${TESTCASES}"
+
 TESTCASES=""
 TESTCASES="${TESTCASES} --testcase tst_474"
+TESTCASES="${TESTCASES} --testcase tst_576"
+squishrunner-run suite_FEATURE_PARAMETERS "${TESTCASES}"
+
+TESTCASES=""
 #TESTCASES="${TESTCASES} --testcase tst_532"
-#TESTCASES="${TESTCASES} --testcase tst_576"
-#TESTCASES="${TESTCASES} --testcase tst_679"
 #TESTCASES="${TESTCASES} --testcase tst_903"
-squishrunner-run suite_ISSUES_SALOME "${TESTCASES}"
+#squishrunner-run suite_ISSUES_SALOME "${TESTCASES}"
 
 TESTCASES=""
 #TESTCASES="${TESTCASES} --testcase tst_boolean_001"