From 75ee870259473d38256e6937bca352d249b09850 Mon Sep 17 00:00:00 2001 From: Christian Stenger <christian.stenger@nokia.com> Date: Tue, 11 Sep 2012 16:32:14 +0200 Subject: [PATCH] Squish: Use global objects.map from inside SCOM Change-Id: Ib789dd239fb7dfbb684e2f97607aa30de205fe0b Reviewed-by: Robert Loehning <robert.loehning@nokia.com> --- tests/system/objects.map | 1 + tests/system/suite_SCOM/objects.map | 18 ------------------ tests/system/suite_SCOM/suite.conf | 2 ++ tests/system/suite_SCOM/tst_SCOM01/test.py | 6 ++---- tests/system/suite_SCOM/tst_SCOM02/test.py | 4 +--- tests/system/suite_SCOM/tst_SCOM04/test.py | 6 ++---- tests/system/suite_SCOM/tst_SCOM05/test.py | 14 +++++++------- 7 files changed, 15 insertions(+), 36 deletions(-) delete mode 100644 tests/system/suite_SCOM/objects.map diff --git a/tests/system/objects.map b/tests/system/objects.map index e63bf0b1fba..42ce2b1d860 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -1,3 +1,4 @@ +:*Qt Creator.Build Project_Core::Internal::FancyToolButton {text='Build Project' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Clear_QToolButton {text='Clear' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Continue_Core::Internal::FancyToolButton {text='Continue' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.DoubleTabWidget_ProjectExplorer::Internal::DoubleTabWidget {name='ProjectExplorer__Internal__DoubleTabWidget' type='ProjectExplorer::Internal::DoubleTabWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='DoubleTabWidget'} diff --git a/tests/system/suite_SCOM/objects.map b/tests/system/suite_SCOM/objects.map deleted file mode 100644 index b6274c5c253..00000000000 --- a/tests/system/suite_SCOM/objects.map +++ /dev/null @@ -1,18 +0,0 @@ -:*Qt Creator.DoubleTabWidget_ProjectExplorer::Internal::DoubleTabWidget {name='ProjectExplorer__Internal__DoubleTabWidget' type='ProjectExplorer::Internal::DoubleTabWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='DoubleTabWidget'} -:New Qt Quick Application.Add to version control:_QLabel {name='addToVersionControlLabel' text='Add to version control:' type='QLabel' visible='1'} -:Next_QPushButton {name='__qt__passive_wizardbutton1' text~='(Next.*|Continue)' type='QPushButton' visible='1'} -:Qt Creator.Build Project_Core::Internal::FancyToolButton {text='Build Project' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'} -:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'} -:Qt Creator.Project.Menu.Project_QMenu {name='Project.Menu.Project' type='QMenu' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator_Core::Internal::IssuesPaneToggleButton {type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' unnamed='1' visible='1'} -:Qt Creator_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:addToVersionControlComboBox_QComboBox {buddy=':New Qt Quick Application.Add to version control:_QLabel' name='addToVersionControlComboBox' type='QComboBox' visible='1'} -:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'} -:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'} diff --git a/tests/system/suite_SCOM/suite.conf b/tests/system/suite_SCOM/suite.conf index a1a1dc9996b..a657ebe86e5 100644 --- a/tests/system/suite_SCOM/suite.conf +++ b/tests/system/suite_SCOM/suite.conf @@ -1,10 +1,12 @@ AUT=qtcreator CLASS= CLASSPATH= +CWD= ENVVARS=envvars HOOK_SUB_PROCESSES=false IMPLICITAUTSTART=0 LANGUAGE=Python +OBJECTMAP=../objects.map TEST_CASES=tst_SCOM01 tst_SCOM02 tst_SCOM04 tst_SCOM05 VERSION=2 WRAPPERS=Qt diff --git a/tests/system/suite_SCOM/tst_SCOM01/test.py b/tests/system/suite_SCOM/tst_SCOM01/test.py index 14a9e70954b..df7578df061 100644 --- a/tests/system/suite_SCOM/tst_SCOM01/test.py +++ b/tests/system/suite_SCOM/tst_SCOM01/test.py @@ -14,15 +14,13 @@ def main(): selectBuildConfig(1, 0, config) # try to compile test.log("Testing build configuration: " + config) - clickButton(waitForObject(":Qt Creator.Build Project_Core::Internal::FancyToolButton")) + clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")) waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") # check output if build successful - ensureChecked(waitForObject(":Qt Creator_Core::Internal::OutputPaneToggleButton")) + ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton")) compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow") if not test.verify(str(compileOutput.plainText).endswith("exited normally."), "Verifying building of simple qt quick application."): test.log(compileOutput.plainText) # exit qt creator invokeMenuItem("File", "Exit") -# no cleanup needed, as whole testing directory gets properly removed after test finished - diff --git a/tests/system/suite_SCOM/tst_SCOM02/test.py b/tests/system/suite_SCOM/tst_SCOM02/test.py index 82b94a20514..67e8fca6ab2 100644 --- a/tests/system/suite_SCOM/tst_SCOM02/test.py +++ b/tests/system/suite_SCOM/tst_SCOM02/test.py @@ -14,12 +14,10 @@ def main(): # save all to invoke qml parsing invokeMenuItem("File", "Save All") # open issues list view - ensureChecked(waitForObject(":Qt Creator_Core::Internal::IssuesPaneToggleButton")) + ensureChecked(waitForObject(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton")) issuesView = waitForObject(":Qt Creator.Issues_QListView") # verify that error is properly reported test.verify(checkSyntaxError(issuesView, ["Unexpected token"], True), "Verifying QML syntax error while parsing simple qt quick application.") # exit qt creator invokeMenuItem("File", "Exit") -# no cleanup needed, as whole testing directory gets properly removed after test finished - diff --git a/tests/system/suite_SCOM/tst_SCOM04/test.py b/tests/system/suite_SCOM/tst_SCOM04/test.py index 8ba9b8938e6..369dbe0b76a 100644 --- a/tests/system/suite_SCOM/tst_SCOM04/test.py +++ b/tests/system/suite_SCOM/tst_SCOM04/test.py @@ -24,16 +24,14 @@ def main(): selectBuildConfig(1, 0, config) # try to compile test.log("Testing build configuration: " + config) - clickButton(waitForObject(":Qt Creator.Build Project_Core::Internal::FancyToolButton")) + clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")) # wait until build finished waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") # open issues list view - ensureChecked(waitForObject(":Qt Creator_Core::Internal::IssuesPaneToggleButton")) + ensureChecked(waitForObject(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton")) issuesView = waitForObject(":Qt Creator.Issues_QListView") # verify that error is properly reported test.verify(checkSyntaxError(issuesView, expectedErrorAlternatives, False), "Verifying cpp syntax error while building simple qt quick application.") # exit qt creator invokeMenuItem("File", "Exit") -# no cleanup needed, as whole testing directory gets properly removed after test finished - diff --git a/tests/system/suite_SCOM/tst_SCOM05/test.py b/tests/system/suite_SCOM/tst_SCOM05/test.py index b6e11226845..f7e456da54a 100644 --- a/tests/system/suite_SCOM/tst_SCOM05/test.py +++ b/tests/system/suite_SCOM/tst_SCOM05/test.py @@ -5,11 +5,13 @@ def verifyChangeProject(projectName): # select project projItem = waitForObjectItem(":Qt Creator_Utils::NavigationTreeView", projectName) openItemContextMenu(waitForObject(":Qt Creator_Utils::NavigationTreeView"), projectName, 5, 5, 0) - activateItem(waitForObjectItem(":Qt Creator.Project.Menu.Project_QMenu", 'Set "%s" as Active Project' % projectName)) - waitFor("projItem.font.bold==True",3000) + activateItem(waitForObjectItem("{name='Project.Menu.Project' type='QMenu' visible='1' " + "window=':Qt Creator_Core::Internal::MainWindow'}", + 'Set "%s" as Active Project' % projectName)) + waitFor("projItem.font.bold==True", 3000) # check if bold is right project test.verify(projItem.font.bold == True, - "Simple Qt Quick App - multiple projects - verifying if properly set to project: " + projectName) + "Multiple projects - verifying if active project is set to " + projectName) def main(): projectName1 = "SampleApp1" @@ -26,11 +28,11 @@ def main(): # change to project 2 verifyChangeProject(projectName2) # build project 2 - clickButton(waitForObject(":Qt Creator.Build Project_Core::Internal::FancyToolButton")) + clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")) # wait for build to complete waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") # check output if build successful - ensureChecked(waitForObject(":Qt Creator_Core::Internal::OutputPaneToggleButton")) + ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton")) outputLog = str(waitForObject(":Qt Creator.Compile Output_Core::OutputWindow").plainText) # verify that project was built successfully test.verify(outputLog.endswith("exited normally."), @@ -40,5 +42,3 @@ def main(): "Verifying that proper project " + projectName2 + " was built.") # exit qt creator invokeMenuItem("File", "Exit") -# no cleanup needed, as whole testing directory gets properly removed after test finished - -- GitLab