From 0dea68c1a576f9d6ec93571fd717e484bc414236 Mon Sep 17 00:00:00 2001 From: spo Date: Thu, 15 Oct 2015 16:40:09 +0300 Subject: [PATCH] Add SQUISH tests --- test.squish/suite_ERROR_NOTIFICATION/envvars | 0 .../shared/scripts/common.py | 1 + test.squish/suite_ERROR_NOTIFICATION/suite.conf | 10 ++++++++++ .../tst_679/test.py | 5 ++++- test.squish/suite_FEATURE_PARAMETERS/envvars | 0 .../shared/scripts/common.py | 1 + test.squish/suite_FEATURE_PARAMETERS/suite.conf | 10 ++++++++++ .../tst_474/test.py | 2 ++ .../tst_576/test.py | 2 ++ test.squish/suite_STANDALONE/tst_c/test.py | 10 ++++++++-- test_squish.sh | 12 +++++++++--- 11 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 test.squish/suite_ERROR_NOTIFICATION/envvars create mode 120000 test.squish/suite_ERROR_NOTIFICATION/shared/scripts/common.py create mode 100644 test.squish/suite_ERROR_NOTIFICATION/suite.conf rename test.squish/{suite_ISSUES_SALOME => suite_ERROR_NOTIFICATION}/tst_679/test.py (84%) create mode 100644 test.squish/suite_FEATURE_PARAMETERS/envvars create mode 120000 test.squish/suite_FEATURE_PARAMETERS/shared/scripts/common.py create mode 100644 test.squish/suite_FEATURE_PARAMETERS/suite.conf rename test.squish/{suite_ISSUES_SALOME => suite_FEATURE_PARAMETERS}/tst_474/test.py (96%) rename test.squish/{suite_ISSUES_SALOME => suite_FEATURE_PARAMETERS}/tst_576/test.py (95%) diff --git a/test.squish/suite_ERROR_NOTIFICATION/envvars b/test.squish/suite_ERROR_NOTIFICATION/envvars new file mode 100644 index 000000000..e69de29bb 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 index 000000000..c9dd6a8ec --- /dev/null +++ b/test.squish/suite_ERROR_NOTIFICATION/shared/scripts/common.py @@ -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 index 000000000..bae54b56b --- /dev/null +++ b/test.squish/suite_ERROR_NOTIFICATION/suite.conf @@ -0,0 +1,10 @@ +AUT=salome_run.sh +CWD= +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_ISSUES_SALOME/tst_679/test.py b/test.squish/suite_ERROR_NOTIFICATION/tst_679/test.py similarity index 84% rename from test.squish/suite_ISSUES_SALOME/tst_679/test.py rename to test.squish/suite_ERROR_NOTIFICATION/tst_679/test.py index 978caa9a2..b186d752a 100644 --- a/test.squish/suite_ISSUES_SALOME/tst_679/test.py +++ b/test.squish/suite_ERROR_NOTIFICATION/tst_679/test.py @@ -1,3 +1,5 @@ +#[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")) @@ -21,7 +23,8 @@ def main(): waitFor("object.exists(':Point_QFrame')", 20000) - test.compare(str(findObject(":Point_QFrame").toolTip), "x - Model_AttributeValidator: name 'b' is not defined") + 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") diff --git a/test.squish/suite_FEATURE_PARAMETERS/envvars b/test.squish/suite_FEATURE_PARAMETERS/envvars new file mode 100644 index 000000000..e69de29bb 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 index 000000000..c9dd6a8ec --- /dev/null +++ b/test.squish/suite_FEATURE_PARAMETERS/shared/scripts/common.py @@ -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 index 000000000..bae54b56b --- /dev/null +++ b/test.squish/suite_FEATURE_PARAMETERS/suite.conf @@ -0,0 +1,10 @@ +AUT=salome_run.sh +CWD= +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_ISSUES_SALOME/tst_474/test.py b/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py similarity index 96% rename from test.squish/suite_ISSUES_SALOME/tst_474/test.py rename to test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py index 9cea5a865..181b7f495 100644 --- a/test.squish/suite_ISSUES_SALOME/tst_474/test.py +++ b/test.squish/suite_FEATURE_PARAMETERS/tst_474/test.py @@ -1,3 +1,5 @@ +#[tested functionality] 1. Add parameter 2. Calculate parameter 3. Delete parameter + def main(): source(findFile("scripts", "common.py")) diff --git a/test.squish/suite_ISSUES_SALOME/tst_576/test.py b/test.squish/suite_FEATURE_PARAMETERS/tst_576/test.py similarity index 95% rename from test.squish/suite_ISSUES_SALOME/tst_576/test.py rename to test.squish/suite_FEATURE_PARAMETERS/tst_576/test.py index 6ba9e5ef9..6d375a471 100644 --- a/test.squish/suite_ISSUES_SALOME/tst_576/test.py +++ b/test.squish/suite_FEATURE_PARAMETERS/tst_576/test.py @@ -1,3 +1,5 @@ +#[tested functionality] 1. Add parameter 2. Rename parameter + def main(): source(findFile("scripts", "common.py")) diff --git a/test.squish/suite_STANDALONE/tst_c/test.py b/test.squish/suite_STANDALONE/tst_c/test.py index ebab2b407..818f97ff7 100644 --- a/test.squish/suite_STANDALONE/tst_c/test.py +++ b/test.squish/suite_STANDALONE/tst_c/test.py @@ -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) diff --git a/test_squish.sh b/test_squish.sh index 4a3b2d4cf..72db2fc1c 100755 --- a/test_squish.sh +++ b/test_squish.sh @@ -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" -- 2.30.2