Skip to content

Commit

Permalink
Merge branch 'refs/heads/v1.4.0' into Test-damies13#195-for-Issue-dam…
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekKuczynski committed Oct 27, 2024
2 parents 26b0910 + e0a6a89 commit 4925428
Show file tree
Hide file tree
Showing 16 changed files with 586 additions and 51 deletions.
18 changes: 18 additions & 0 deletions Doc/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
- [Do we have any sample test cases?](#do-we-have-any-sample-test-cases)
- [Is there a tutorial on how to use rfswarm?](#is-there-a-tutorial-on-how-to-use-rfswarm)
- [does rfswarm support IPv6?](#does-rfswarm-support-ipv6)
- [Errors mentioning Matplotlib, Numpy or Kiwisolver](#errors-mentioning-matplotlib-numpy-or-kiwisolver)
- [Windows Defender Prompt](#windows-defender-prompt)

## How are issues prioritised?

Expand Down Expand Up @@ -109,3 +111,19 @@ As far as I know all components of rfswarm work with IPv6, what I can confirm wo
- configuring the agent ini file with a manager name that only resolves to an IPv6 address

rfswarm works in IPv4 only networks as well.

## Errors mentioning Matplotlib, Numpy or Kiwisolver

If you are using Windows OS and getting these types of errors try installing `msvc-runtime` as this is a common issue on Windows
```console
pip install msvc-runtime
```
If this doesn't solve the problem or you are not using Windows (i.e. Mac / Linux) then please create a bug report

## Windows Defender Prompt

On Windows computers you may receive the following dialogue the first time you run RFSwarm Manager:

![Image](Images/WindowsDefenderFirewall.png "Windows Defender Prompt")

For best results it's suggested you make sure both checkboxes are checked and then click allow, so that your agent machines can connect to your manager
Binary file added Doc/Images/WindowsDefenderFirewall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 22 additions & 8 deletions Tests/Regression/Reporter/GUI_Bugs.robot
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,27 @@ Template with Start and End Dates
Save Template File OS DIALOG ${templatename}

Click Button GenerateHTML
# Wait For Status GeneratingXHTMLReport
Wait For Status SavedXHTMLReport

Sleep 1
Close GUI

${html}= Parse XML ${resultfolder0}${/}${resultdata0}.html
${sectionid}= Get Element Attribute ${html} id .//h1[text()='2 Test Result Summary']/..
${table}= Get Element ${html} .//div[@id='${sectionid}']//table
${expected}= Get Elements Texts ${table} tr/td[1]

Copy Files ${resultfolder0}/*.report ${testresultfolder0}
Copy Files ${resultfolder0}/*.html ${testresultfolder0}

# ${html}= Parse XML ${resultfolder0}${/}${resultdata0}.html
# import lxml.etree
# tree = lxml.etree.parse("/home/dave/Downloads/Reporter-windows-latest-3.11/Issue-#250/20240626_130059_jpetstore-nomon-quick/20240626_130059_jpetstore-nomon-quick.html", lxml.etree.HTMLParser())
${html}= Evaluate lxml.etree.parse(r'${resultfolder0}${/}${resultdata0}.html', lxml.etree.HTMLParser()) modules=lxml.etree
# ${rawhtml}= Get File ${resultfolder0}${/}${resultdata0}.html
# ${html}= Evaluate lxml.etree.fromstring('${rawhtml}', lxml.etree.HTMLParser()) modules=lxml.etree
# ${sectionid}= Get Element Attribute ${html} id .//h1[text()='2 Test Result Summary']/..
# ${sectionid}= Get Element Attribute ${html} id .//h1[text()='4 Test Result Summary']/..
${sectionid}= Get Element Attribute ${html} id //h1[contains(text(), 'Test Result Summary')]/..
# FB9D1A0486F //div[@id='FB9D1A0486F']//table
${table}= Get Element ${html} //div[@id='${sectionid}']//table
${expected}= Get Elements Texts ${table} tr/td[1]

Log To Console Open Reporter with resultfolder1 and check template works

Open GUI -d ${resultfolder1} -t ${templatefolder}${/}${templatename}.template
Expand All @@ -283,8 +292,13 @@ Template with Start and End Dates
Copy Files ${resultfolder1}/*.report ${testresultfolder1}
Copy Files ${resultfolder1}/*.html ${testresultfolder1}

${html}= Parse XML ${resultfolder1}${/}${resultdata1}.html
${sectionid}= Get Element Attribute ${html} id .//h1[text()='2 Test Result Summary']/..
# ${html}= Parse XML ${resultfolder1}${/}${resultdata1}.html
# ${html}= Evaluate lxml.etree.parse("${resultfolder1}${/}${resultdata1}.html", lxml.etree.HTMLParser()) modules=lxml.etree
${html}= Evaluate lxml.etree.parse(r'${resultfolder1}${/}${resultdata1}.html', lxml.etree.HTMLParser()) modules=lxml.etree
# ${rawhtml}= Get File ${resultfolder1}${/}${resultdata1}.html
# ${html}= Evaluate lxml.etree.fromstring('${rawhtml}', lxml.etree.HTMLParser()) modules=lxml.etree
# ${sectionid}= Get Element Attribute ${html} id .//h1[text()='2 Test Result Summary']/..
${sectionid}= Get Element Attribute ${html} id //h1[contains(text(), 'Test Result Summary')]/..
${table}= Get Element ${html} .//div[@id='${sectionid}']//table
FOR ${index} ${item} IN ENUMERATE @{expected}
${row}= Evaluate ${index} + 2
Expand Down
10 changes: 5 additions & 5 deletions Tests/Regression/Reporter/GUI_Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Get Text Value To Right Of
${value}= Copy From The Right Of ${img} ${offsetx}
# Take A Screenshot
WHILE $b4value == $value limit=10
Sleep 10 ms
Wait For ${img} timeout=${default_image_timeout}
${offsetx}= Evaluate ${offsetx}+10
${value}= Copy From The Right Of ${img} ${offsetx}
# Take A Screenshot
Expand Down Expand Up @@ -260,7 +260,7 @@ Click Dialog Button
# Take A Screenshot

Wait For Status
[Arguments] ${status} ${timeout}=300
[Arguments] ${status} ${timeout}=1800
${statusl}= Convert To Lower Case ${status}
${img}= Set Variable reporter_${platform}_status_${statusl}.png
Log ${CURDIR}
Expand Down Expand Up @@ -291,7 +291,7 @@ Open GUI windows
Set Confidence 0.9
# ${process}= Start Process python3 ${pyfile} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
# ${process}= Start Process python ${pyfile} -g 6 @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
${process}= Start Process ${cmd_reporter} -g 6 @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
${process}= Start Process ${cmd_reporter} @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt

Set Suite Variable $process ${process}
# reporter_windows_status_previewloaded
Expand All @@ -306,7 +306,7 @@ Open GUI ubuntu
Set Suite Variable ${platform} ubuntu
Set Confidence 0.9
# ${process}= Start Process python3 ${pyfile} -g 6 @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
${process}= Start Process ${cmd_reporter} -g 6 @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
${process}= Start Process ${cmd_reporter} @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
Set Suite Variable $process ${process}
# Sleep 60
# Capture Screen
Expand All @@ -318,7 +318,7 @@ Open GUI macos
Set Suite Variable ${platform} macos
Set Confidence 0.9
# ${process}= Start Process python3 ${pyfile} -g 5 @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
${process}= Start Process ${cmd_reporter} -g 6 @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
${process}= Start Process ${cmd_reporter} @{appargs} alias=Reporter stdout=${OUTPUT DIR}${/}stdout.txt stderr=${OUTPUT DIR}${/}stderr.txt
Set Suite Variable $process ${process}
# Sleep 60
Set Screenshot Folder ${OUTPUT DIR}
Expand Down
15 changes: 10 additions & 5 deletions Tests/Regression/Reporter/GUI_Features.robot
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ Verify That Files Get Saved With Correct Extension And Names
Open GUI -d ${resultfolder}
Click Button savetemplate
Save Template File OS DIALOG ${templatename}
Click Button generatehtml
Sleep 2
Click Button generateword
Sleep 2
Click Button generateexcel
Sleep 2
Click Button generatehtml
Sleep 2

Wait For Status SavedXHTMLReport

# Verify files:
Remove File ${templatefolder}${/}here_will_be_template.txt
Expand Down Expand Up @@ -1232,12 +1234,13 @@ Verify Plan Graph - No Total
Log to console basefolder: ${basefolder} console=True
${resultfolder}= Set Variable ${basefolder}${/}${resultdata}
${resultfile}= Set Variable ${basefolder}${/}${resultdata}${/}${resultdata}.report
${templatefile}= Set Variable ${basefolder}${/}original_base.template
Should Exist ${resultfolder}
Log resultfolder: ${resultfolder} console=True
Should Not Exist ${resultfile}

# pass a default ini file with extended height to ensure that default values are used
Open GUI -d ${resultfolder} -i ${basefolder}${/}RFSwarmReporter.ini
Open GUI -d ${resultfolder} -i ${basefolder}${/}RFSwarmReporter.ini -t ${templatefile}
# Run Keyword And Continue On Failure Wait For Status PreviewLoaded 120
Wait For Status PreviewLoaded

Expand Down Expand Up @@ -1295,12 +1298,13 @@ Verify Plan Graph - With Total
Log to console basefolder: ${basefolder} console=True
${resultfolder}= Set Variable ${basefolder}${/}${resultdata}
${resultfile}= Set Variable ${basefolder}${/}${resultdata}${/}${resultdata}.report
${templatefile}= Set Variable ${basefolder}${/}original_base.template
Should Exist ${resultfolder}
Log resultfolder: ${resultfolder} console=True
Should Not Exist ${resultfile}

# pass a default ini file with extended height to ensure that default values are used
Open GUI -d ${resultfolder} -i ${basefolder}${/}RFSwarmReporter.ini
Open GUI -d ${resultfolder} -i ${basefolder}${/}RFSwarmReporter.ini -t ${templatefile}
# Run Keyword And Continue On Failure Wait For Status PreviewLoaded 120
Wait For Status PreviewLoaded

Expand Down Expand Up @@ -1361,12 +1365,13 @@ Verify Plan Table
Log to console basefolder: ${basefolder} console=True
${resultfolder}= Set Variable ${basefolder}${/}${resultdata}
${resultfile}= Set Variable ${basefolder}${/}${resultdata}${/}${resultdata}.report
${templatefile}= Set Variable ${basefolder}${/}original_base.template
Should Exist ${resultfolder}
Log resultfolder: ${resultfolder} console=True
Should Not Exist ${resultfile}

# pass a default ini file with extended height to ensure that default values are used
Open GUI -d ${resultfolder} -i ${basefolder}${/}RFSwarmReporter.ini
Open GUI -d ${resultfolder} -i ${basefolder}${/}RFSwarmReporter.ini -t ${templatefile}
# Run Keyword And Continue On Failure Wait For Status PreviewLoaded 120
Wait For Status PreviewLoaded

Expand Down
Binary file modified Tests/Regression/Reporter/Images/file_method/macos_finder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ filteragent = None
filtertype = None
sql = SELECT MetricTime as 'Time' , MetricValue as 'Value' , PrimaryMetric as x91Namex93 FROM MetricData WHERE MetricType == 'Agent' AND SecondaryMetric == 'Robots' AND MetricTime >= 1695874263 AND MetricTime <= 1695877212 ORDER BY MetricTime
secondarymetric = Robots

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ win_width = 1000
win_height = 600

[Reporter]
template =
template = original_base.template
resultdir =
templatedir =
results =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[Report]
order = F96CC319A38,F96CC319A3D,F96CC3282EB
title = OCDemo Requests
showtlogo = -1
dateformat = yyyy-mm-dd
timeformat = HH:MM
timezone = Australia/Brisbane
showstarttime = -1
showendtime = -1
font = Verdana
fontsize = 12
percentile = 90

[F96CC319A38]
name = Template
parent = TOP
type = note
changed = 1714034531.3852513
note = Define your template by adding sections and configuring the section settingsx12Each section can be:x12 - Note (like this) section, free textx12 - Heading, usefull for grouping sectionsx12 - Contents like a table of contents or figuresx12 - Data Table, with data from test resultsx12 - Data Graph, for graphical representation of test resultsx12x12Each section can also have sub sectionsx12x12The cover page and overall report settings can be found on the settings pane of the Report item abovex12

[F96CC319A3D]
name = Test Result Summary
parent = TOP
type = table
changed = 1728516305.4417443
colours = 0
datatype = ResultSummary
sql = SELECT r.result_name as x91Result Namex93 , round(min(rp.elapsed_time),3) 'Minimum', round(avg(rp.elapsed_time),3) 'Average', round(percentile(rp.elapsed_time, 90),3) '90x37ile', round(max(rp.elapsed_time),3) 'Maximum', round(stdev(rp.elapsed_time),3) 'Std. Dev.', count(rp.result) as 'Pass', count(rf.result) as 'Fail', count(ro.result) as 'Other' FROM Results as r LEFT JOIN Results as rp ON r.rowid == rp.rowid AND rp.result == 'PASS' LEFT JOIN Results as rf ON r.rowid == rf.rowid AND rf.result == 'FAIL' LEFT JOIN Results as ro ON r.rowid == ro.rowid AND ro.result <> 'PASS' AND ro.result <> 'FAIL' WHERE r.end_time >= 1695874263 AND r.end_time <= 1695877212 GROUP BY r.result_name ORDER BY x91Result Namex93

[F96CC3282EB]
name = Robots
parent = TOP
type = graph
changed = 1714034594.8325248

[F96CC3282EBL]
secondarymetric = total_robots
changed = 1728516306.583407
filteragent = None
filtertype = None
datatype = Metric
sql = SELECT MetricTime as 'Time' , MetricValue as 'Value' , PrimaryMetric as x91Namex93 FROM MetricData WHERE MetricType == 'Scenario' AND SecondaryMetric == 'total_robots' AND MetricTime >= 1695874263 AND MetricTime <= 1695877212 ORDER BY MetricTime
metrictype = Scenario
axisen = 1

[F96CC3282EBR]
datatype = Metric
changed = 1728516306.5845017
axisen = 0
metrictype = Agent
filteragent = None
filtertype = None
sql = SELECT MetricTime as 'Time' , MetricValue as 'Value' , PrimaryMetric as x91Namex93 FROM MetricData WHERE MetricType == 'Agent' AND SecondaryMetric == 'Robots' AND MetricTime >= 1695874263 AND MetricTime <= 1695877212 ORDER BY MetricTime
secondarymetric = Robots

Loading

0 comments on commit 4925428

Please sign in to comment.