Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ index.txt
log.html
output.xml
report.html
browser/
playwright-log.txt
screenshots/

# docs entries
node_modules
Expand Down
Binary file modified atest/resources/dashboard_output/overview/runTags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified atest/resources/dashboard_output/run/runDateFilter.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified atest/resources/dashboard_output/run/runTags.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.
Binary file modified atest/resources/dashboard_output/tables/baseRunTable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion atest/resources/database_output/runs.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[['2025-03-13 00:21:34.707148+00:00', 'Tests', 'Tests', 114, 107, 7, 0, '14.429', '2025-03-13 00:21:34.708148', 'dev,prod,project_1', 'output-20250313-002134', 'output-20250313-002134.xml', '[]', None], ['2025-03-13 00:21:51.185366+00:00', 'Tests', 'Tests', 114, 102, 10, 2, '21.152', '2025-03-13 00:21:51.186367', 'dev,prod,project_1', 'output-20250313-002151', 'output-20250313-002151.xml', '[]', None], ['2025-03-13 00:22:22.304104+00:00', 'Testsuites', 'Testsuites', 114, 107, 7, 0, '26.243', '2025-03-13 00:22:22.305102', 'dev,prod,project_1', 'output-20250313-002222', 'output-20250313-002222.xml', '[]', None], ['2025-03-13 00:22:57.472888+00:00', 'Tests', 'Tests', 114, 102, 11, 1, '20.052', '2025-03-13 00:22:57.474475', 'dev,prod,project_1', 'output-20250313-002257', 'output-20250313-002257.xml', '[]', None], ['2025-03-13 00:23:38.413294+00:00', 'Other', 'Other', 114, 100, 10, 4, '14.333', '2025-03-13 00:23:38.414516', 'dev,prod,project_1', 'output-20250313-002338', 'output-20250313-002338.xml', '[]', None], ['2025-03-13 00:24:00.827779+00:00', 'Tests', 'Tests', 114, 104, 10, 0, '19.753', '2025-03-13 00:24:00.828780', 'dev,prod,project_1', 'output-20250313-002400', 'output-20250313-002400.xml', '[]', None], ['2025-03-13 00:24:31.912429+00:00', 'Testsuites', 'Testsuites', 114, 104, 9, 1, '13.148', '2025-03-13 00:24:31.913455', 'dev,prod,project_1', 'output-20250313-002431', 'output-20250313-002431.xml', '[]', None], ['2025-03-13 00:24:57.422440+00:00', 'Tests', 'Tests', 114, 104, 9, 1, '28.665', '2025-03-13 00:24:57.424073', 'dev,prod,project_1', 'output-20250313-002457', 'output-20250313-002457.xml', '[]', None], ['2025-03-13 00:25:28.306253+00:00', 'Tests', 'Tests', 114, 112, 0, 2, '17.016', '2025-03-13 00:25:28.307311', 'dev,prod,project_1', 'output-20250313-002528', 'output-20250313-002528.xml', '[]', None], ['2025-03-13 00:25:49.609465+00:00', 'Tests', 'Tests', 114, 114, 0, 0, '28.637', '2025-03-13 00:25:49.611031', 'dev,prod,project_1', 'output-20250313-002549', 'output-20250313-002549.xml', '[]', None], ['2025-03-13 00:26:36.304669+00:00', 'Other', 'Other', 114, 104, 10, 0, '14.655', '2025-03-13 00:26:36.305700', 'dev,prod,project_1', 'output-20250313-002636', 'output-20250313-002636.xml', '[]', None], ['2025-03-13 00:27:03.713995+00:00', 'Testsuites', 'Testsuites', 114, 106, 8, 0, '30.136', '2025-03-13 00:27:03.716163', 'dev,prod,project_1', 'output-20250313-002703', 'output-20250313-002703.xml', '[]', None], ['2025-03-13 00:27:39.871333+00:00', 'Tests', 'Tests', 114, 102, 12, 0, '23.442', '2025-03-13 00:27:39.873333', 'dev,prod,project_1', 'output-20250313-002739', 'output-20250313-002739.xml', '[]', None], ['2025-03-13 00:29:15.926420+00:00', 'Tests', 'Tests', 114, 77, 37, 0, '15.463', '2025-03-13 00:29:15.928002', 'dev,prod,project_1', 'output-20250313-002915', 'output-20250313-002915.xml', '[]', None], ['2025-03-13 00:30:06.726165+00:00', 'Tests', 'Tests', 114, 106, 8, 0, '17.723', '2025-03-13 00:30:06.727746', 'dev,prod,project_1', 'output-20250313-003006', 'output-20250313-003006.xml', '[]', None]]
[['2025-03-13 00:21:34.707148+00:00', 'Tests', 'Tests', 114, 107, 7, 0, '14.429', '2025-03-13 00:21:34.708148', 'prod,project_1,version_1.0', 'output-20250313-002134', 'output-20250313-002134.xml', '[]', '1.0'], ['2025-03-13 00:21:51.185366+00:00', 'Tests', 'Tests', 114, 102, 10, 2, '21.152', '2025-03-13 00:21:51.186367', 'dev,project_1,version_1.0', 'output-20250313-002151', 'output-20250313-002151.xml', '[]', '1.0'], ['2025-03-13 00:22:22.304104+00:00', 'Testsuites', 'Testsuites', 114, 107, 7, 0, '26.243', '2025-03-13 00:22:22.305102', 'prod,project_2,version_1.0', 'output-20250313-002222', 'output-20250313-002222.xml', '[]', '1.0'], ['2025-03-13 00:22:57.472888+00:00', 'Tests', 'Tests', 114, 102, 11, 1, '20.052', '2025-03-13 00:22:57.474475', 'dev,project_2,version_1.1', 'output-20250313-002257', 'output-20250313-002257.xml', '[]', '1.1'], ['2025-03-13 00:23:38.413294+00:00', 'Other', 'Other', 114, 100, 10, 4, '14.333', '2025-03-13 00:23:38.414516', 'prod,project_1,version_1.1', 'output-20250313-002338', 'output-20250313-002338.xml', '[]', '1.1'], ['2025-03-13 00:24:00.827779+00:00', 'Tests', 'Tests', 114, 104, 10, 0, '19.753', '2025-03-13 00:24:00.828780', 'dev,project_1,version_1.1', 'output-20250313-002400', 'output-20250313-002400.xml', '[]', '1.1'], ['2025-03-13 00:24:31.912429+00:00', 'Testsuites', 'Testsuites', 114, 104, 9, 1, '13.148', '2025-03-13 00:24:31.913455', 'prod,project_2,version_1.1', 'output-20250313-002431', 'output-20250313-002431.xml', '[]', '1.1'], ['2025-03-13 00:24:57.422440+00:00', 'Tests', 'Tests', 114, 104, 9, 1, '28.665', '2025-03-13 00:24:57.424073', 'dev,project_2,version_1.1', 'output-20250313-002457', 'output-20250313-002457.xml', '[]', '1.1'], ['2025-03-13 00:25:28.306253+00:00', 'Tests', 'Tests', 114, 112, 0, 2, '17.016', '2025-03-13 00:25:28.307311', 'prod,project_1,version_1.1', 'output-20250313-002528', 'output-20250313-002528.xml', '[]', '1.1'], ['2025-03-13 00:25:49.609465+00:00', 'Tests', 'Tests', 114, 114, 0, 0, '28.637', '2025-03-13 00:25:49.611031', 'prod,project_1,version_1.2', 'output-20250313-002549', 'output-20250313-002549.xml', '[]', '1.2'], ['2025-03-13 00:26:36.304669+00:00', 'Other', 'Other', 114, 104, 10, 0, '14.655', '2025-03-13 00:26:36.305700', 'prod,project_2,version_1.2', 'output-20250313-002636', 'output-20250313-002636.xml', '[]', '1.2'], ['2025-03-13 00:27:03.713995+00:00', 'Testsuites', 'Testsuites', 114, 106, 8, 0, '30.136', '2025-03-13 00:27:03.716163', 'prod,project_2,version_1.2', 'output-20250313-002703', 'output-20250313-002703.xml', '[]', '1.2'], ['2025-03-13 00:27:39.871333+00:00', 'Tests', 'Tests', 114, 102, 12, 0, '23.442', '2025-03-13 00:27:39.873333', 'dev,project_1,version_1.2', 'output-20250313-002739', 'output-20250313-002739.xml', '[]', '1.2'], ['2025-03-13 00:29:15.926420+00:00', 'Tests', 'Tests', 114, 77, 37, 0, '15.463', '2025-03-13 00:29:15.928002', 'dev,project_1,version_1.2', 'output-20250313-002915', 'output-20250313-002915.xml', '[]', '1.2'], ['2025-03-13 00:30:06.726165+00:00', 'Tests', 'Tests', 114, 106, 8, 0, '17.723', '2025-03-13 00:30:06.727746', 'dev,project_2,amount,version_1.2', 'output-20250313-003006', 'output-20250313-003006.xml', '[]', '1.2']]
173 changes: 166 additions & 7 deletions atest/resources/keywords/dashboard-keywords.resource
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*** Settings ***
Library Collections
Library String
Library json
Library Browser
Library DocTest.VisualTest
Resource ../variables/variables.resource
Expand Down Expand Up @@ -56,27 +58,60 @@ Validate Component
Take Screenshot filename=${SCREENSHOT_FOLDER}/${name} selector=id=${id}
Validate Screenshot screenshot=${name} reference=${name} folder=${folder}

Open Filter Dialog
Click selector=id=filters

Close Filter Dialog
Click selector=id=closeFilters

Set Run Filter
[Arguments] ${value}
Click selector=id=filters
Open Filter Dialog
Select Options By id=runs value ${value}
Click selector=id=closeFilters
Close Filter Dialog

Set Run Tags Filter
[Arguments] @{tags} ${strict}=False
Open Filter Dialog
Click selector=id=selectRunTags
IF ${strict}
${elements} Get Elements selector=id=runTag >> css=input.form-check-input
FOR ${element} IN @{elements}
${id} Get Attribute ${element} id
IF "${id}".startswith("runTagCheckBox")
Uncheck Checkbox selector=id=${id}
END
END
END
FOR ${tag} IN @{tags}
Check Checkbox selector=id=runTagCheckBox${tag}
END
Close Filter Dialog

Set Versions Filter
[Arguments] @{versions}
Open Filter Dialog
Click selector=id=selectProjectVersion
FOR ${version} IN @{versions}
Check Checkbox selector=id=projectVersionInputItem${version}
END
Close Filter Dialog

Set Date Filter
[Arguments] ${fromDate}=${None} ${fromTime}=${None} ${toDate}=${None} ${toTime}=${None}
Click selector=id=filters
Open Filter Dialog
Sleep time_=500ms
IF '${fromDate}' != '${None}' Type Text selector=id=fromDate txt=${fromDate} clear=True
IF '${fromTime}' != '${None}' Type Text selector=id=fromTime txt=${fromTime} clear=True
IF '${toDate}' != '${None}' Type Text selector=id=toDate txt=${toDate} clear=True
IF '${toTime}' != '${None}' Type Text selector=id=toTime txt=${toTime} clear=True
Click selector=id=closeFilters
Close Filter Dialog

Set Amount Filter
[Arguments] ${amount}
Click selector=id=filters
[Arguments] ${amount} ${close_filter_dialog}=True
Open Filter Dialog
Fill Text selector=id=amount txt=${amount}
Click selector=id=closeFilters
IF ${close_filter_dialog} Close Filter Dialog

Change Settings
Click selector=id=themeDark
Expand All @@ -86,3 +121,127 @@ Change Settings
Click selector=id=toggleLabels
Select Options By id=toggleBarRounding value 0
Click selector=id=closeSettings

Add Filter Profile For
[Arguments] @{selected_filters} ${profile_name}
Add Filter Profile ${profile_name} For @{selected_filters}

Add Filter Profile ${profile_name} For
[Arguments] @{selected_filters} ${open_filter_dialog}=True
IF ${open_filter_dialog} Open Filter Dialog
Click selector=id=addFilterProfile
Fill Text selector=id=filterProfileName txt=${profile_name}
VAR @{filters} Runs RunTags Versions FromDate FromTime ToDate ToTime Amount
FOR ${filter} IN @{filters}
${check} Evaluate '${filter}' in @{selected_filters}
IF ${check}
Check Checkbox selector=id=profileCheck${filter}
ELSE
Uncheck Checkbox selector=id=profileCheck${filter}
END
END
Click selector=id=saveFilterProfile
Close Filter Dialog

Apply Filter Profile
[Arguments] ${profile_name}
Open Filter Dialog
Click selector=id=selectFilterProfile
Click selector=id=profile${profile_name}
Take Screenshot
Close Filter Dialog

Get Filter Profile Settings
[Arguments] ${profile_name}
${settings_str} LocalStorage Get Item key=settings
${settings} Loads ${settings_str}
VAR ${filter_profile} ${settings}[filterProfiles][${profile_name}]
RETURN ${filter_profile}

Reset Filters
Open Filter Dialog
Click selector=id=resetFilters
Close Filter Dialog

Filter Profile ${profile_name} Should Be
[Arguments] ${filter_value_str}
${settings} Get Filter Profile Settings profile_name=${profile_name}
${expected} Evaluate ${filter_value_str}
Should Be Equal first=${settings} second=${expected}

Validate Selected Run Tags Of Filter Profile ${profile_name}
[Arguments] @{tags} ${strict}=True
${settings} Get Filter Profile Settings profile_name=${profile_name}
VAR ${run_tags} ${settings}[runTags]
VAR @{checked_tags} @{EMPTY}
FOR ${run_tag} IN @{run_tags}
Log ${run_tag}
IF ${run_tag}[checked]
Append To List ${checked_tags} ${run_tag}[id]
END
END
FOR ${tag} IN @{tags}
List Should Contain Value list_=${checked_tags} value=${tag}
END
IF '${strict}' == 'True'
FOR ${tag} IN @{checked_tags}
List Should Contain Value list_=${tags} value=${tag}
END
END

Validate Filter Settings
#TODO
[Arguments] ${runs}=${EMPTY}
... ${runTags}=${EMPTY}
... ${versions}=${EMPTY}
... ${fromDate}=${EMPTY}
... ${fromTime}=${EMPTY}
... ${toDate}=${EMPTY}
... ${toTime}=${EMPTY}
... ${amount}=${EMPTY}

Open Filter Dialog
IF len("${runs}") Get Selected Options id=runs value == ${runs}
IF len("S{run_tags}")
VAR @{selected_run_tags} @{EMPTY}
${elements} Get Elements selector=id=runTag >> css=input.form-check-input
FOR ${element} IN @{elements}
${id} Get Attribute ${element} id
IF "${id}".startswith("runTagCheckBox")
${state} Get Checkbox State selector=${element}
IF ${state}
${tag} Replace String string=${id} search_for=runTagCheckBox replace_with=${EMPTY}
Append To List ${selected_run_tags} ${tag}
END
END
END
Log ${selected_run_tags}
Should Be True ${selected_run_tags} == "${runTags}".split()
END

IF len("${versions}")
VAR @{selected_versions} @{EMPTY}
${elements} Get Elements selector=id=projectVersionList >> css=input.form-check-input
FOR ${element} IN @{elements}
${id} Get Attribute ${element} id
IF "${id}".startswith("projectVersionInputItem")
${state} Get Checkbox State selector=${element}
IF ${state}
${version} Replace String string=${id} search_for=projectVersionInputItem replace_with=${EMPTY}
Append To List ${selected_versions} ${version}
END
END
END
Log ${selected_versions}
Should Be True ${selected_versions} == "${versions}".split()
END
IF len("${fromDate}") Browser.Get Text id=fromDate == ${fromDate}
IF len("${fromTime}") Browser.Get Text id=fromTime == ${fromTime}
IF len("${toDate}") Browser.Get Text id=toDate == ${toDate}
IF len("${toTime}") Browser.Get Text id=toTime == ${toTime}
IF len("${amount}") Browser.Get Text id=amount == ${amount}

Close Filter Dialog

Should Show ${runs} Of ${total_runs} Runs
Get Property selector=id=runTitle >> h6 property=innerText assertion_operator=== assertion_expected=showing ${runs} of ${total_runs} runs
18 changes: 17 additions & 1 deletion atest/resources/keywords/general-keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,23 @@ Generate Dashboard
${index} Get Dashboard Index
Release Lock name=dashboard_index
VAR ${DASHBOARD_INDEX} ${index} scope=test
${output} Run command=robotdashboard -d robotresults_${DASHBOARD_INDEX}.db -f ${CURDIR}/../outputs:dev:prod:project_1 -n robotdashboard_${DASHBOARD_INDEX}.html
${files} Catenate SEPARATOR=${SPACE}
... -o ${CURDIR}/../outputs/output-20250313-002134.xml:prod:project_1:version_1.0
... -o ${CURDIR}/../outputs/output-20250313-002151.xml:dev:project_1:version_1.0
... -o ${CURDIR}/../outputs/output-20250313-002222.xml:prod:project_2:version_1.0
... -o ${CURDIR}/../outputs/output-20250313-002257.xml:dev:project_2:version_1.1
... -o ${CURDIR}/../outputs/output-20250313-002338.xml:prod:project_1:version_1.1
... -o ${CURDIR}/../outputs/output-20250313-002400.xml:dev:project_1:version_1.1
... -o ${CURDIR}/../outputs/output-20250313-002431.xml:prod:project_2:version_1.1
... -o ${CURDIR}/../outputs/output-20250313-002457.xml:dev:project_2:version_1.1
... -o ${CURDIR}/../outputs/output-20250313-002528.xml:prod:project_1:version_1.1
... -o ${CURDIR}/../outputs/output-20250313-002549.xml:prod:project_1:version_1.2
... -o ${CURDIR}/../outputs/output-20250313-002636.xml:prod:project_2:version_1.2
... -o ${CURDIR}/../outputs/output-20250313-002703.xml:prod:project_2:version_1.2
... -o ${CURDIR}/../outputs/output-20250313-002739.xml:dev:project_1:version_1.2
... -o ${CURDIR}/../outputs/output-20250313-002915.xml:dev:project_1:version_1.2
... -o ${CURDIR}/../outputs/output-20250313-003006.xml:dev:project_2:amount:version_1.2
${output} Run command=robotdashboard -d robotresults_${DASHBOARD_INDEX}.db ${files} -n robotdashboard_${DASHBOARD_INDEX}.html
Log ${output}

Remove Database And Dashboard
Expand Down
67 changes: 66 additions & 1 deletion atest/testsuites/06_filters.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,75 @@ Validate Dashboard Run Name Filter
Set Run Filter value=Tests
Validate Component id=runStatisticsSection name=runNameFilter folder=run

Validate Dashboard Run Tags Filter
Should Show 15 Of 15 Runs

Set Run Tags Filter dev
Validate Component id=runStatisticsSection name=runTagsFilterDev folder=run
Should Show 7 Of 7 Runs

Set Run Tags Filter prod
Validate Component id=runStatisticsSection name=runTagsFilterDevProd folder=run
Should Show 0 Of 0 Runs

Set Run Tags Filter prod strict=True
Validate Component id=runStatisticsSection name=runTagsFilterProd folder=run
Should Show 8 Of 8 Runs

Set Run Tags Filter dev amount strict=True
Validate Component id=runStatisticsSection name=runTagsFilterAmount folder=run
Should Show 1 Of 1 Runs

Validate Dashboard Date Filter
Set Date Filter fromDate=13032025 fromTime=0025
Set Date Filter fromDate=03132025 fromTime=1225am
Validate Component id=runStatisticsSection name=runDateFilter folder=run

Validate Dashboard Amount Filter
Set Amount Filter amount=5
Validate Component id=runStatisticsSection name=runAmountFilter folder=run

Add Filter Profile With Runs Filter
Set Run Filter value=Tests
Add Filter Profile PrfRuns For Runs
Filter Profile PrfRuns Should Be {'runs': 'Tests'}

Add Filter Profile With Run Tags Filter
Set Run Tags Filter prod project_1
Add Filter Profile PrfTags For RunTags
Validate Selected Run Tags Of Filter Profile PrfTags prod project_1 strict=True

Add Filter Profile With Versions Filter
Set Versions Filter None
Add Filter Profile PrfVersions For Versions
Filter Profile PrfVersions Should Be {'projectVersions': [{'value': 'All', 'checked': False}, {'value': 'None', 'checked': True}, {'value': '1.2', 'checked': False}, {'value': '1.1', 'checked': False}, {'value': '1.0', 'checked': False}]}

Add Filter Profile With Date Filters
Set Date Filter fromDate=03132025 fromTime=1225am toDate=04012025 toTime=1159pm

Add Filter Profile PrfFrom For FromDate FromTime
Filter Profile PrfFrom Should Be {'fromDate': '2025-03-13', 'fromTime': '00:25'}

Add Filter Profile PrfTo For ToDate ToTime
Filter Profile PrfTo Should Be {'toDate': '2025-04-01', 'toTime': '23:59'}

Add Filter Profile PrfFromTo For FromDate ToTime
Filter Profile PrfFromTo Should Be {'fromDate': '2025-03-13', 'toTime': '23:59'}

Add Filter Profile With Amount Filter
Set Amount Filter amount=200 close_filter_dialog=False
Add Filter Profile PrfAmount For Amount open_filter_dialog=False
Filter Profile PrfAmount Should Be {'amount': '200'}

Applied Filter Profile Adds New Filter
Set Run Filter value=Tests
Set Run Tags Filter prod project_1
Set Versions Filter 1.2
Set Date Filter fromDate=03102025 fromTime=1010pm toDate=03142025 toTime=0245am
Set Amount Filter amount=13 close_filter_dialog=False
Add Filter Profile Profile1 For Runs RunTags Versions
... FromDate FromTime ToDate ToTime Amount open_filter_dialog=False
Reset Filters
Apply Filter Profile profile_name=Profile1
Validate Filter Settings runs=Tests runTags=prod project_1 versions=1.2
... fromDate=2025-03-10 fromTime=22:10 toDate=2025-03-14 toTime=02:45
... amount=13
Loading
Loading