Skip to content

Commit

Permalink
Issue #171 as a CLI test
Browse files Browse the repository at this point in the history
  • Loading branch information
damies13 committed Feb 14, 2024
1 parent c1f6dd9 commit 9588800
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Tests/Regression/Agent/ºBugs.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*** Settings ***
Resource ºCommon.robot

*** Test Cases ***
Issue #171
[Tags] ubuntu-latest windows-latest macos-latest
Run Agent
@{mngr_options}= Create List -s b -n
Run Manager CLI @{mngr_options}
Wait For Manager
Stop Agent
Show Log stdout_manager.txt
Show Log stdout_agent.txt
42 changes: 42 additions & 0 deletions Tests/Regression/Agent/ºCommon.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
*** Settings ***
Library OperatingSystem
Library Process

*** Variables ***

${pyfile_agent} ${EXECDIR}${/}rfswarm_agent${/}rfswarm_agent.py
${pyfile_manager} ${EXECDIR}${/}rfswarm_manager${/}rfswarm.py
${process_agent} None
${process_manager} None


*** Keywords ***

Show Log
[Arguments] ${filename}
Log to console ${\n}-----${filename}-----
${filedata}= Get File ${filename}
Log to console ${filedata}
Log to console -----${filename}-----${\n}

Run Agent
[Arguments] ${options}=[]
${process}= Start Process python3 ${pyfile_agent} ${options} alias=Agent stdout=${OUTPUT DIR}${/}stdout_agent.txt stderr=${OUTPUT DIR}${/}stderr_agent.txt
Set Test Variable $process_agent ${process}

Run Manager CLI
[Arguments] @{options}=[]
${process}= Start Process python3 ${pyfile_manager} ${options} alias=Agent stdout=${OUTPUT DIR}${/}stdout_manager.txt stderr=${OUTPUT DIR}${/}stderr_manager.txt
Set Test Variable $process_manager ${process}

Wait For Manager
${result}= Wait For Process ${process_manager}
Should Be Equal As Integers ${result.rc} 0

Stop Manager
${result}= Terminate Process ${process_manager}
Should Be Equal As Integers ${result.rc} 0

Stop Agent
${result}= Terminate Process ${process_agent}
Should Be Equal As Integers ${result.rc} 0
4 changes: 4 additions & 0 deletions Tests/Regression/Agent/ºFeatures.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*** Settings ***
Resource ºCommon.robot

*** Test Cases ***

0 comments on commit 9588800

Please sign in to comment.