diff --git a/Tests/Regression/Manager/GUI_Bugs.robot b/Tests/Regression/Manager/GUI_Bugs.robot new file mode 100644 index 000000000..8d754085c --- /dev/null +++ b/Tests/Regression/Manager/GUI_Bugs.robot @@ -0,0 +1,14 @@ +*** Settings *** +Resource GUI_Common.robot + +*** Test Cases *** +Issue #171 + [Tags] ubuntu-latest windows-latest macos-latest + Open Agent + Open Manager GUI + Click Tab Agents + Sleep 5 + Take A Screenshot + + Close Manager GUI + Stop Agent diff --git a/Tests/Regression/Manager/GUI_Common.robot b/Tests/Regression/Manager/GUI_Common.robot new file mode 100644 index 000000000..2f1ce2e7a --- /dev/null +++ b/Tests/Regression/Manager/GUI_Common.robot @@ -0,0 +1,89 @@ +*** Settings *** +Library OperatingSystem +Library Process +Library String + +Library ImageHorizonLibrary reference_folder=${IMAGE_DIR} + +Suite Setup Set Platform + +*** Variables *** +${IMAGE_DIR} ${CURDIR}/Images/file_method +${pyfile_manager} ${EXECDIR}${/}rfswarm_manager${/}rfswarm.py +${pyfile_agent} ${EXECDIR}${/}rfswarm_agent${/}rfswarm_agent.py +${process_manager} None +${process_agent} None + +*** Keywords *** +Set Platform + [Tags] macos-latest + Set Suite Variable ${platform} macos + +Set Platform + [Tags] windows-latest + Set Suite Variable ${platform} windows + +Set Platform + [Tags] ubuntu-latest + Set Suite Variable ${platform} ubuntu + +Open Agent + [Arguments] ${options} + ${process}= Start Process python3 ${pyfile} alias=Agent stdout=${OUTPUT DIR}${/}stdout_agent.txt stderr=${OUTPUT DIR}${/}stderr_agent.txt + Set Test Variable $process_agent ${process} + +Open Manager GUI + [Arguments] ${options} + Set Confidence 0.9 + ${process}= Start Process python3 ${pyfile} alias=Manager stdout=${OUTPUT DIR}${/}stdout_manager.txt stderr=${OUTPUT DIR}${/}stderr_manager.txt + Set Test Variable $process_manager ${process} + Sleep 10 + Set Screenshot Folder ${OUTPUT DIR} + Take A Screenshot + +Close Manager GUI + [Tags] windows-latest ubuntu-latest + Press Combination Key.esc + Press Combination x Key.ctrl + ${result}= Wait For Process ${process_manager} timeout=60 + ${running}= Is Process Running ${process_manager} + IF not ${running} + Should Be Equal As Integers ${result.rc} 0 + ELSE + Take A Screenshot + ${result} = Terminate Process ${process_manager} + Fail + END + +Close Manager GUI + [Tags] macos-latest + # Press Combination Key.esc + # Press Combination q Key.command + # Click Image manager_${platform}_menu_python3.png + Click Image manager_${platform}_button_closewindow.png + Take A Screenshot + ${result}= Wait For Process ${process_manager} timeout=60 + ${running}= Is Process Running ${process_manager} + IF not ${running} + Should Be Equal As Integers ${result.rc} 0 + ELSE + Take A Screenshot + ${result} = Terminate Process ${process_manager} + Fail + END + +Stop Agent + ${result} = Terminate Process ${process_agent} + Should Be Equal As Integers ${result.rc} 0 + +Click Tab + [Arguments] ${tabname} + ${tabnamel}= Convert To Lower Case ${tabname} + ${img}= Set Variable manager_${platform}_tab_${tabnamel}.png + Log ${CURDIR} + Log ${IMAGE_DIR} + Wait For ${img} timeout=300 + @{coordinates}= Locate ${img} + Click Image ${img} + Sleep 0.1 + Take A Screenshot diff --git a/Tests/Regression/Manager/GUI_Features.robot b/Tests/Regression/Manager/GUI_Features.robot new file mode 100644 index 000000000..e69de29bb