Skip to content

Commit

Permalink
Checking for test conflicts for Reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekKuczynski committed Sep 2, 2024
1 parent 39c3b8c commit df18a2c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 50 deletions.
14 changes: 10 additions & 4 deletions Tests/Regression/Agent/CommandLine_Bugs.robot
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Check If The Not Buildin Modules Are Included In The Agent Setup File
END

Verify If Agent Runs With Existing INI File From Current Version
#[Tags] windows-latest ubuntu-latest macos-latest Issue #49
[Tags] windows-latest ubuntu-latest macos-latest Issue #49
${location}= Get Agent Default Save Path
Run Agent
Expand All @@ -100,7 +100,7 @@ Verify If Agent Runs With Existing INI File From Current Version
END

Verify If Agent Runs With No Existing INI File From Current Version NO GUI
#[Tags] windows-latest ubuntu-latest macos-latest Issue #49
[Tags] windows-latest ubuntu-latest macos-latest Issue #49
${location}= Get Agent Default Save Path
Remove File ${location}${/}RFSwarmAgent.ini
Expand All @@ -117,7 +117,7 @@ Verify If Agent Runs With No Existing INI File From Current Version NO GUI
END

Verify If Agent Runs With Existing INI File From Previous Version NO GUI
#[Tags] windows-latest ubuntu-latest macos-latest Issue #49
[Tags] windows-latest ubuntu-latest macos-latest Issue #49
${location}= Get Agent Default Save Path
Remove File ${location}${/}RFSwarmAgent.ini
Expand All @@ -135,4 +135,10 @@ Verify If Agent Runs With Existing INI File From Previous Version NO GUI
${result}= Terminate Process ${process_agent}
ELSE
Fail msg=Agest is not running!
END
END

[Teardown] Run Keywords
... Remove File ${location}${/}RFSwarmAgent.ini AND
... Run Agent AND
... Sleep 3 AND
... Stop Agent
74 changes: 37 additions & 37 deletions Tests/Regression/Agent/CommandLine_Features.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,6 @@ Agent Help
Log to console ${\n}${result}
Should Contain ${result} AGENTNAME

Agent Command Line ROBOT -r
[Tags] ubuntu-latest macos-latest Issue #14
Run Process whereis robot alias=data #not working on windows
${pip_data} Get Process Result data
Should Not Be Empty ${pip_data.stdout} msg=Cant find robotframework pip informations
${pip_data_list}= Split String ${pip_data.stdout}
Log To Console robot executable: ${pip_data_list}[1]

VAR ${robot_exec} ${pip_data_list}[1]
VAR ${scenario_dir} ${CURDIR}${/}testdata${/}Issue-#14${/}Issue-#14.rfs
VAR @{agnt_options} -g 1 -r ${robot_exec} -m http://localhost:8138
VAR @{mngr_options} -g 1 -n -s ${scenario_dir}

Log To Console Run Agent with custom robot executable.
Run Agent ${agnt_options}
Sleep 5s
Run Manager CLI ${mngr_options}
Wait For Manager 8min
Stop Agent
Show Log ${OUTPUT DIR}${/}stdout_agent.txt
Show Log ${OUTPUT DIR}${/}stdout_manager.txt
Show Log ${OUTPUT DIR}${/}stderr_agent.txt
Show Log ${OUTPUT DIR}${/}stderr_manager.txt

@{test_result}= List Directories In Directory ${results_dir} absolute=${True} pattern=*_Issue-#14
Log To Console Result dir: ${test_result}
Should Not Be Empty ${test_result}
@{result_content}= List Directories In Directory ${test_result}[0]
Log To Console Result dir content: ${result_content}
Should Not Be Empty ${result_content}
@{test_logs}= List Directories In Directory ${test_result}[0]${/}logs
Should Not Be Empty ${test_logs}

[Teardown] Run Keywords Stop Agent Stop Manager

Agent Command Line INI -i
[Tags] ubuntu-latest macos-latest Issue #14 # can't get agent output in windows
Expand Down Expand Up @@ -104,7 +68,43 @@ Agent Command Line AGENTDIR -d

[Teardown] Stop Agent

# -r mode here
Agent Command Line ROBOT -r
[Tags] ubuntu-latest macos-latest Issue #14
Run Process whereis robot alias=data #not working on windows
${pip_data} Get Process Result data
Should Not Be Empty ${pip_data.stdout} msg=Cant find robotframework pip informations
${pip_data_list}= Split String ${pip_data.stdout}
Log To Console robot executable: ${pip_data_list}[1]

${scenario_dir}= Normalize Path ${CURDIR}${/}testdata${/}Issue-#14${/}Issue-#14.rfs
VAR ${robot_exec} ${pip_data_list}[1]
#VAR ${scenario_dir} ${CURDIR}${/}testdata${/}Issue-#14${/}Issue-#14.rfs
VAR @{agnt_options} -g 1 -r ${robot_exec}
VAR @{mngr_options} -g 1 -n -s ${scenario_dir}

Log To Console Run Agent with custom robot executable.
Run Agent ${agnt_options}
Sleep 5s
Run Manager CLI ${mngr_options}
Wait For Manager 8min
Stop Agent
Show Log ${OUTPUT DIR}${/}stdout_agent.txt
Show Log ${OUTPUT DIR}${/}stdout_manager.txt
Show Log ${OUTPUT DIR}${/}stderr_agent.txt
Show Log ${OUTPUT DIR}${/}stderr_manager.txt

@{test_result}= List Directories In Directory ${results_dir} absolute=${True} pattern=*_Issue-#14
Log To Console Result dir: ${test_result}
Should Not Be Empty ${test_result}
@{result_content}= List Directories In Directory ${test_result}[0]
Log To Console Result dir content: ${result_content}
Should Not Be Empty ${result_content}
@{test_logs}= List Directories In Directory ${test_result}[0]${/}logs
Log To Console Logs files: ${result_content}
Should Not Be Empty ${test_logs}

[Teardown] Run Keywords Stop Agent Stop Manager

Agent Command Line XMLMODE -x
[Tags] ubuntu-latest macos-latest windows-latest Issue #14
Expand Down
17 changes: 8 additions & 9 deletions Tests/Regression/Reporter/CommandLine_Features.robot
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
*** Settings ***
Resource GUI_Common.robot

Suite Setup Set Platform

*** Test Cases ***
Reporter Command Line INI -i
[Tags] ubuntu-latest macos-latest windows-latest Issue #14
#[Tags] ubuntu-latest macos-latest windows-latest Issue #14

VAR ${testdata} Issue-#14${/}result_dir
VAR ${resultdata} ini_testcase
Expand Down Expand Up @@ -33,7 +32,7 @@ Reporter Command Line INI -i
Should Contain ${html_content} <div class="body"><p>This is a test for Issue-#14</p></div>

Manager Command Line DIR -d
[Tags] windows-latest ubuntu-latest macos-latest Issue #14
#[Tags] windows-latest ubuntu-latest macos-latest Issue #14

${testdata} Set Variable Issue-#14${/}result_dir
${resultdata} Set Variable 20240622_182505_test_scenario
Expand All @@ -56,7 +55,7 @@ Manager Command Line DIR -d
... msg=results path value did not save correctly [settings != scenario]!

Reporter Command Line TEMPLATE -t
[Tags] ubuntu-latest macos-latest windows-latest Issue #14
#[Tags] ubuntu-latest macos-latest windows-latest Issue #14

${basefolder}= Normalize Path ${CURDIR}${/}testdata${/}Issue-#14
${templatefile}= Normalize Path ${basefolder}${/}Issue-#14.template
Expand All @@ -68,18 +67,18 @@ Reporter Command Line TEMPLATE -t

${template_offset} Get Index From List ${inifile_content} template
Should Be Equal template ${inifile_content}[${template_offset}] msg=template value is missing!
${inifile_content}[${template_offset + 2}]= Evaluate r"${inifile_content}[${template_offset + 2}]".replace('x35', '#')
${inifile_content}[${template_offset + 2}]= Evaluate r"${inifile_content}[${template_offset + 2}]".replace('x35', '#')
Should Be Equal ${templatefile} ${inifile_content}[${template_offset + 2}]
... msg=template path value did not save correctly [settings != scenario]!

${templatedir_offset} Get Index From List ${inifile_content} templatedir
Should Be Equal templatedir ${inifile_content}[${templatedir_offset}] msg=templatedir value is missing!
${inifile_content}[${templatedir_offset + 2}]= Evaluate r"${inifile_content}[${templatedir_offset + 2}]".replace('x35', '#')
${inifile_content}[${templatedir_offset + 2}]= Evaluate r"${inifile_content}[${templatedir_offset + 2}]".replace('x35', '#')
Should Be Equal ${basefolder} ${inifile_content}[${templatedir_offset + 2}]
... msg=templatedir path value did not save correctly [settings != scenario]!

Manager Command Line HTML report --html
[Tags] windows-latest ubuntu-latest macos-latest Issue #14
#[Tags] windows-latest ubuntu-latest macos-latest Issue #14

${testdata} Set Variable Issue-#14${/}result_dir
${resultdata} Set Variable 20240622_182505_test_scenario
Expand All @@ -92,7 +91,7 @@ Manager Command Line HTML report --html
List Should Contain Value ${result_files} ${resultdata}.html

Manager Command Line HTML report --docx
[Tags] windows-latest ubuntu-latest macos-latest Issue #14
#[Tags] windows-latest ubuntu-latest macos-latest Issue #14

${testdata} Set Variable Issue-#14${/}result_dir
${resultdata} Set Variable 20240622_182505_test_scenario
Expand All @@ -105,7 +104,7 @@ Manager Command Line HTML report --docx
List Should Contain Value ${result_files} ${resultdata}.docx

Manager Command Line HTML report --xlsx
[Tags] windows-latest ubuntu-latest macos-latest Issue #14
#[Tags] windows-latest ubuntu-latest macos-latest Issue #14

${testdata} Set Variable Issue-#14${/}result_dir
${resultdata} Set Variable 20240622_182505_test_scenario
Expand Down

0 comments on commit df18a2c

Please sign in to comment.