Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
829 commits
Select commit Hold shift + click to select a range
3f095c2
Rename column "Program" to "Assessment type" (#775)
sofyakurilova Sep 13, 2024
054815f
Hide "Create" text in edit mode (#773)
sofyakurilova Sep 16, 2024
0038600
Prevent default event (#777)
sofyakurilova Sep 16, 2024
12782df
Show success dialog only for valid risk profile (#779)
sofyakurilova Sep 16, 2024
6c82ae9
Filter Not Started tests from test count (#778)
sofyakurilova Sep 16, 2024
78679ce
Change version label (#780)
sofyakurilova Sep 17, 2024
3d6c4eb
Display tags for Testrun progress page (#781)
sofyakurilova Sep 17, 2024
c63e70e
365728028: (feat) improve callouts (#782)
OlgaMardvilko Sep 17, 2024
2181c8d
367673910: (fix) prevent download PDF report button focused twice on …
OlgaMardvilko Sep 18, 2024
493ca67
Fix tags (#786)
sofyakurilova Sep 18, 2024
9220494
Console errors on starting the test attempt (#784)
sofyakurilova Sep 18, 2024
eac2e85
366014294: (feat) update callouts logic (#787)
OlgaMardvilko Sep 18, 2024
8248696
Destroy "waiting for device" snackbar when status changed (#788)
sofyakurilova Sep 18, 2024
c252fdb
Mark dirty only multi select control when tab navigation (#789)
sofyakurilova Sep 19, 2024
1d451de
Adds focus flow after closing download zip/testing complete dialog (#…
sofyakurilova Sep 20, 2024
1347033
Remove tooltip from link (#793)
sofyakurilova Sep 20, 2024
f09aac4
Adds aria label; code refactoring (#790)
sofyakurilova Sep 20, 2024
a9e7d87
Add mac address filter for the device interface to single ip test (#791)
jhughesoti Sep 23, 2024
f33f107
Do not show "Save changes" dialog when there is no changes in profile…
sofyakurilova Sep 23, 2024
b89afd8
Risk profile completed modal: the redundant information is communica…
sofyakurilova Sep 23, 2024
c14c8bb
Adds timeout to allow screen reader to detect changes and pronounce t…
sofyakurilova Sep 23, 2024
3f8ea7c
Adds button action on space click
sofyakurilova Sep 23, 2024
7049707
Adds focus trap
sofyakurilova Sep 23, 2024
727f1ea
Fix tests
sofyakurilova Sep 23, 2024
f43519a
369106935: (fix) [a11y] make focused element announced (#807)
OlgaMardvilko Sep 24, 2024
7b8bf72
Focus with delay to allow screen reader detect changes
sofyakurilova Sep 24, 2024
6b31410
Focus risk assessment link when appears
sofyakurilova Sep 24, 2024
d85e792
369314564: (fix) set focus after callout dismissed (#812)
OlgaMardvilko Sep 25, 2024
9df0cd7
369312866: (fix) set focus after welcome modal is closed (#813)
OlgaMardvilko Sep 25, 2024
9e22f0d
Fix profiles page style to fit the screen
sofyakurilova Sep 24, 2024
3fa26ad
Improve style for buttons
sofyakurilova Sep 25, 2024
b689291
Improve style for buttons
sofyakurilova Sep 25, 2024
3753427
358071738: (feat) prevent listening mgtt internet connect event in si…
OlgaMardvilko Sep 25, 2024
b10a023
remove singl_intf parameter from start_ui
hitnik Sep 20, 2024
81b759e
single_intf config parameter
hitnik Sep 20, 2024
9f39f1d
added test_get_devices_format (#809)
MariusBaldovin Sep 25, 2024
1acb918
Fix condition to show dialog on name change
sofyakurilova Sep 25, 2024
bf12aa7
Fix tests
sofyakurilova Sep 25, 2024
4b4cd37
365978129: (feat) add PDF report templates (#801)
OlgaMardvilko Sep 26, 2024
957ba71
369538601: (fix) set focus to first interactive elem after stop test …
OlgaMardvilko Sep 26, 2024
aa570c2
Remove steps to resolve from information tests (#817)
jboddey Sep 26, 2024
5ee5374
369327155: (fix) set focus to selected risk profile if no changes on …
OlgaMardvilko Sep 27, 2024
de3cec8
Prevent default event
sofyakurilova Sep 26, 2024
5a49438
Adds simple dialog announcement
sofyakurilova Sep 27, 2024
291e603
Fix tests
sofyakurilova Sep 27, 2024
eccfb23
Return focus on previous active element
sofyakurilova Sep 27, 2024
e028128
remove vsa tag (#823)
jhughesoti Sep 27, 2024
1846b16
Fix baseline tests (#821)
MariusBaldovin Sep 30, 2024
c65f0a1
Active delete button on space and enter
sofyakurilova Sep 30, 2024
f226d78
369779748: (fix) add field name to validation rule for announce by Sc…
OlgaMardvilko Sep 30, 2024
7490c60
Add delay and fix dialog open configuration
sofyakurilova Sep 30, 2024
ccb8cea
Fix tests
sofyakurilova Sep 30, 2024
326b810
367979183: (fix) announce the result and description on completed tes…
OlgaMardvilko Sep 30, 2024
8087d14
Add optional recommendations for informational tests on pilot devices…
jboddey Sep 30, 2024
4a02251
select row on enter and space
sofyakurilova Sep 30, 2024
a2b7631
369542969: (fix) announce completed test modal (#832)
OlgaMardvilko Sep 30, 2024
464c6e8
fixed _ load_version (#828)
MariusBaldovin Sep 30, 2024
9fa3290
Feature/tls 1.0 (#783)
jhughesoti Oct 1, 2024
70d9f16
fix device disconnected whilst monitoring (#830)
hitnik Oct 1, 2024
d968d27
369538601: (fix) focus first interactive elem on start or stop testru…
OlgaMardvilko Oct 1, 2024
ac769d5
Adds deactivate guard for devices page
sofyakurilova Oct 1, 2024
3dd014b
Fix audit
sofyakurilova Oct 1, 2024
25df584
369788198: (fix) validation message alignment on create device (#842)
OlgaMardvilko Oct 2, 2024
11d61b1
370729271: (fix) remove asterisks on the questions in the device flow…
OlgaMardvilko Oct 2, 2024
b1c4f7b
framework/unit_tests (#841)
jhughesoti Oct 2, 2024
01b6601
370711565: (fix) changes for informational test result (#844)
OlgaMardvilko Oct 2, 2024
ebf87b7
Add role and aria-live for screen reader
sofyakurilova Oct 2, 2024
5fbacca
370923173: (fix) remove close button from the certificates panel (#847)
OlgaMardvilko Oct 2, 2024
a69409a
Change text in risk dialog
sofyakurilova Oct 2, 2024
780d3c4
Revised device qualification PDF report and Pilot PDF report. The rep…
hitnik Oct 2, 2024
416e288
Switch test modules base image to pytho:3.10-slim image (#833)
jhughesoti Oct 2, 2024
6b487b8
Change description for NTP test failure (#835)
jboddey Oct 2, 2024
76d8256
370012527: (feat) update PDF reports styles (#850)
OlgaMardvilko Oct 3, 2024
2f63319
Update docs (#839)
jboddey Oct 3, 2024
39e176d
Perform some refactoring (#846)
jboddey Oct 3, 2024
139f03f
Fix report_test.py tests (#848)
MariusBaldovin Oct 4, 2024
3471b1b
369538601: (fix) set focus to first interactive elem after stop test …
OlgaMardvilko Oct 7, 2024
4943253
371506031: (fix) make the welcome modal be on top completed test moda…
OlgaMardvilko Oct 7, 2024
6371363
366151318: (fix) add communicate steps on create device (#851)
OlgaMardvilko Oct 7, 2024
c8ab340
370941517: (fix) return focus to initial btn after cancel download zi…
OlgaMardvilko Oct 7, 2024
61a1ef8
371177676: (fix) set focus to the initial device if cancel on edit de…
OlgaMardvilko Oct 7, 2024
e2972b6
371525395: (fix) exclude error status from count of completed test re…
OlgaMardvilko Oct 8, 2024
29e65d9
371948760: (fix) set focus to first interactive elem after start test…
OlgaMardvilko Oct 8, 2024
b7b3944
feature/dns_module_resolved_ips (#862)
jhughesoti Oct 8, 2024
cc3ef21
stop monitoring when test run is cancelled (#855)
hitnik Oct 8, 2024
d52b29b
session/remove_invalid_questions (#834)
MariusBaldovin Oct 8, 2024
2b01d51
API tests (#766)
MariusBaldovin Oct 8, 2024
d0c31fd
371525174: (fix) update ui on PDF report (#866)
OlgaMardvilko Oct 8, 2024
e46a9c0
Fix navigation structure in PDF report (#867)
jboddey Oct 9, 2024
65c74ed
copy a device profile questionnaire to risk profile
hitnik Oct 7, 2024
57fada4
device risk to risk_profile risk
hitnik Oct 8, 2024
9800a1c
page counter
hitnik Oct 9, 2024
94a3a9d
bold table headers
hitnik Oct 9, 2024
a9e35b9
test report duration format
hitnik Oct 9, 2024
01222a5
372610099: (fix) update the text for Risk assessment complete modal (…
OlgaMardvilko Oct 10, 2024
35358b2
fix sensitive info risk
hitnik Oct 10, 2024
7a4b88f
Remove global app component store
sofyakurilova Oct 15, 2024
0ea6aaa
372804973: (fix) make risk profile names not case sensitive (#882)
OlgaMardvilko Oct 15, 2024
9daa9d3
370942396: (fix) change create device errors and program styles for i…
OlgaMardvilko Oct 15, 2024
49df261
Adds action value instead of null, undefined, string; move common fun…
sofyakurilova Oct 16, 2024
a682b9a
369806347: (fix) improve unit tests (#887)
OlgaMardvilko Oct 16, 2024
547a41e
Send event to GA when test run is completed for Pilot program
sofyakurilova Oct 16, 2024
6181a72
373617780: (fix) change to allow MAC address error text move on to ne…
OlgaMardvilko Oct 16, 2024
1c9bb38
Answers per page calculation refactor (#884)
hitnik Oct 17, 2024
50fef24
Send event to GA when Pilot zip is downloaded
sofyakurilova Oct 16, 2024
a3a238a
Fix tests
sofyakurilova Oct 17, 2024
71c7581
373855404: (fix) allow to change case of letters for existing profile…
OlgaMardvilko Oct 17, 2024
58d52ef
Device endpoints (#872)
MariusBaldovin Oct 17, 2024
d3206dd
Profiles endpoint (#870)
MariusBaldovin Oct 17, 2024
0c14365
Reports endpoint (#868)
MariusBaldovin Oct 17, 2024
515aa7d
Certificates endpoint (#861)
MariusBaldovin Oct 17, 2024
a81d9b1
Remove v from firmware version in UI (#897)
jboddey Oct 18, 2024
fa0de21
372768360: (feat) [Settings] only device port is enabled in no intern…
OlgaMardvilko Oct 18, 2024
fc46050
Change error message
sofyakurilova Oct 18, 2024
5a0ac68
Fix tests
sofyakurilova Oct 18, 2024
46c39ea
Update statuses.md (#894)
jboddey Oct 18, 2024
e3e6e1a
Add release 2.0 fixes to dev (#879)
jboddey Oct 18, 2024
85244da
Fix spelling mistake in report (#902)
jboddey Oct 18, 2024
0715cef
Hide complete dialog if test run is missing in reports
sofyakurilova Oct 21, 2024
5ee001b
374055268: (fix) prevent overwrite copied profile (#909)
OlgaMardvilko Oct 21, 2024
7247ac4
Update dependencies (#903)
jboddey Oct 21, 2024
9a99c45
Merge hotfix into dev (#911)
jboddey Oct 22, 2024
0d9f64a
The link provided in the risk profile answers is not clickable (#908)
sofyakurilova Oct 22, 2024
c5a2a04
Catch invalid device config nicely (#912)
jboddey Oct 22, 2024
1589978
Check if dhcp-1.pcap exists (#913)
jboddey Oct 22, 2024
f86804d
Skip first default values to display error correctly
sofyakurilova Oct 23, 2024
ccddc4d
updated package.yml to start testrun and check if successfully starte…
MariusBaldovin Oct 23, 2024
837be6a
Add better error handling to port stat tests (#914)
jboddey Oct 23, 2024
fccc586
374258745: (fix) [PDF report] wrap long words into the next line to p…
OlgaMardvilko Oct 24, 2024
5b021df
Adds separate method for value
sofyakurilova Oct 24, 2024
ce95c24
375367968: (fix) [Setting panel] remove callout about two ports warni…
OlgaMardvilko Oct 25, 2024
30d0ac9
374084009: Fix error on restoring DHCP server configuration if device…
jboddey Oct 28, 2024
aadb7a0
updated readme.md (#926)
MariusBaldovin Oct 29, 2024
851981c
Upload cert - error handling (#924)
MariusBaldovin Oct 29, 2024
3c0e8d4
Feature/cli no UI (#916)
jhughesoti Oct 29, 2024
ab785be
Connection/README.md (#937)
MariusBaldovin Oct 31, 2024
e8a8593
Disable MQTT log (#930)
jboddey Oct 31, 2024
1fe91e4
corrected mistake on vnc (#940)
MariusBaldovin Oct 31, 2024
2dac94e
remove dublicate tests from the TLS test module (#942)
hitnik Oct 31, 2024
dbece93
tls/README.md (#941)
MariusBaldovin Oct 31, 2024
c048531
updated protocol/README.md (#939)
MariusBaldovin Oct 31, 2024
bcf35c7
update readme.mf for dns module (#938)
MariusBaldovin Oct 31, 2024
64c8fc9
updated postman file (#865)
MariusBaldovin Oct 31, 2024
c56adac
Scapy update to 2.6.0 (#943)
MariusBaldovin Oct 31, 2024
20974d9
added procps package in base container (#945)
MariusBaldovin Nov 4, 2024
23a3201
remove the mqtt debug line (#944)
MariusBaldovin Nov 4, 2024
eb7f292
Unit tests (#946)
MariusBaldovin Nov 4, 2024
f66cd75
Fix security.services.vnc test (#921)
MariusBaldovin Nov 4, 2024
84c354b
Change test in Delete Report Dialog
sofyakurilova Nov 4, 2024
4ac264e
Fix style
sofyakurilova Nov 4, 2024
bc8a1fe
added error handling if 200~dhcp-1.pcap is empty (#949)
MariusBaldovin Nov 4, 2024
bc986de
Add communication network type test (#950)
jhughesoti Nov 4, 2024
f60af44
Adds tooltip for title
sofyakurilova Nov 6, 2024
ee105a3
Fix is based on console error
sofyakurilova Nov 6, 2024
7af5b42
Feature/sys test timeout (#951)
jhughesoti Nov 6, 2024
8b98a5f
374289627: (fix) change the report url from static to dynamic (#954)
OlgaMardvilko Nov 7, 2024
bb9c98a
Pin python requirements (#764)
jhughesoti Nov 7, 2024
18c9752
typo error (#961)
MariusBaldovin Nov 12, 2024
f163711
Conn/module_config typo errors (#959)
MariusBaldovin Nov 12, 2024
33db0a9
conn/ipv6_slaac (#962)
MariusBaldovin Nov 12, 2024
c22457e
Fix tls error result (#963)
jhughesoti Nov 13, 2024
a42de22
Add BACnet test and extend port scan (#957)
jboddey Nov 13, 2024
de942c2
Error handling for connection module (#960)
MariusBaldovin Nov 13, 2024
755c717
Adds coverage check
sofyakurilova Nov 18, 2024
dba5024
Adds coverage check
sofyakurilova Nov 18, 2024
5bb6bb0
Adds coverage check
sofyakurilova Nov 18, 2024
015270a
Fix floating test issue
sofyakurilova Nov 19, 2024
a5ff62a
Fix permissions of resources folder during install (#974)
jboddey Nov 20, 2024
a9a1420
Only run tests if they are included in the device's test pack (#956)
jboddey Nov 21, 2024
de47f2d
changed the logic to display the description when test is non complia…
MariusBaldovin Nov 21, 2024
1c209d5
fix chrony install error (#979)
hitnik Nov 21, 2024
8ac041d
Error handling when lease is None (#981)
MariusBaldovin Nov 22, 2024
9af06af
Bacnet traceback error (#989)
MariusBaldovin Nov 25, 2024
561ddc1
Feature/tls module report (#871)
jhughesoti Nov 29, 2024
1a45400
Initialize listener every time (#990)
jhughesoti Nov 29, 2024
fc6738c
Merge release changes into dev (#1030)
jboddey Dec 20, 2024
3248a64
Update Crypto and Jinja libraries (#1038)
jboddey Jan 2, 2025
cadb6bf
Added debug message in case users enters an incorrect device mac addr…
MariusBaldovin Jan 3, 2025
cca00ab
Allow NTPv3 packets (#1048)
jboddey Jan 6, 2025
d6b5231
Re-render device profile (#1050)
MariusBaldovin Jan 8, 2025
421e52d
Handling error if profile name contains special characters (#1043)
MariusBaldovin Jan 8, 2025
390b572
389661817: (feat) change profile name validation (#1057)
OlgaMardvilko Jan 14, 2025
3365ab3
Add column; change pilot text; change order of columns
sofyakurilova Jan 14, 2025
2d9d145
389657377: (feat) add status Starting to UI (#1062)
OlgaMardvilko Jan 15, 2025
95011c0
Add full port scan to determine any HTTPS/TLS server running on non-s…
jhughesoti Jan 16, 2025
7d050aa
Remove 'v' from testing complete modal (#1063)
jboddey Jan 16, 2025
237223a
384421113: Add starting status (#1032)
jboddey Jan 17, 2025
0b36aa2
Pin download artifact actions (#1065)
jboddey Jan 17, 2025
d3ff78e
Adds statuses for Testing complete modal
sofyakurilova Jan 21, 2025
472f253
Profile export endpoint (#1052)
MariusBaldovin Jan 27, 2025
c251c99
Fix protocol.services.bacnet (#1082)
MariusBaldovin Jan 28, 2025
0285f49
tr-ws/tr-ui containers (#1089)
MariusBaldovin Jan 30, 2025
5055ac1
Generating module reports using Jinja2 (#1073)
hitnik Jan 31, 2025
9bbc3a9
Update dependencies; increase budget
sofyakurilova Jan 31, 2025
eec9cfd
Add a disclaimer about tests affected by single interface mode (#1056)
jboddey Jan 31, 2025
4df99ec
Update TLS client description (#1097)
jboddey Feb 2, 2025
6868082
Set test description for module timeout (#1098)
jboddey Feb 3, 2025
86aade5
Fix services resolving wrong ip (#1096)
jhughesoti Feb 7, 2025
270eadd
384032243: Rename test result to pilot recommendation (#1031)
jboddey Feb 11, 2025
fae4954
fixed reports unittest (#1110)
MariusBaldovin Feb 12, 2025
030ad4c
prevent mqtt sending messages when test is not running
hitnik Feb 12, 2025
a0977f7
Fix bacnet version for devices that do not report IP address in their…
jhughesoti Feb 20, 2025
5f020c6
added logger if no bacnet packets are found for the object_id (#1152)
MariusBaldovin Feb 20, 2025
c652654
Merge release changes into dev (#1154)
jboddey Feb 21, 2025
f89449a
fix pilot report steps to resolve
hitnik Feb 25, 2025
f67c816
fix presence of empty steps to resolve
hitnik Feb 25, 2025
6d834ae
fix no type attribute error (#1164)
MariusBaldovin Feb 28, 2025
7556560
Add the "export" field to the MQTT message
hitnik Feb 19, 2025
8129096
"export" field to the /reports api endpoint
hitnik Feb 19, 2025
28418ae
fix API unit tests
hitnik Feb 19, 2025
4219b44
handle the dns.pcap missing (#1166)
MariusBaldovin Feb 28, 2025
8d80ffb
DNS module bug (#1165)
MariusBaldovin Feb 28, 2025
9cad994
fix the duration in pilot and qualification (#1167)
MariusBaldovin Mar 2, 2025
a10d8a2
Use field "export" for zip download, or make url from "report" field …
sofyakurilova Mar 3, 2025
6ccff43
Change host for "export" field
sofyakurilova Mar 3, 2025
1a16056
Fix test
sofyakurilova Mar 3, 2025
a80989d
Fix spelling of occurred (#1170)
jboddey Mar 5, 2025
b686ca3
Catch OS error in TLS server protocol test (#1171)
jboddey Mar 5, 2025
daeec25
Increase timeout value for /export request
sofyakurilova Mar 11, 2025
f8061fa
Use base64 icons instead of font for proper rendering without interne…
sofyakurilova Mar 19, 2025
fee256b
Fix html to not display font icons
sofyakurilova Mar 20, 2025
0d81b7d
Update DNS from DHCP test description (#1192)
jboddey Mar 26, 2025
90e4ef7
fix key service not found error (#1194)
MariusBaldovin Mar 26, 2025
3515281
Test tests (#1177)
MariusBaldovin Mar 26, 2025
2e24937
Resolve and use device address for reads (#1215)
jhughesoti Apr 4, 2025
44ee015
Fix missing bracket (#1217)
jboddey Apr 4, 2025
3a48fdb
Removed Ubuntu 20.04 runner (#1243)
MariusBaldovin Apr 16, 2025
6dd43a2
bug/ethtool (#1242)
jhughesoti Apr 16, 2025
57650ae
feature/allow_monitor_disconnect (#1249)
jhughesoti Apr 17, 2025
e8f5e33
Merge google material 3 changes into dev
sofyakurilova Apr 25, 2025
187037e
fix the tcp/udp scans to target the correct ip address (#1269)
MariusBaldovin Apr 25, 2025
2abc889
PDF report bug on device profile update (#1267)
MariusBaldovin Apr 25, 2025
cb1302c
Feature/module logging (#1135)
jhughesoti Apr 25, 2025
ba9a8f2
Add disable option to network modules (#1275)
jhughesoti Apr 29, 2025
caccd5e
Test tests (NTP) (#1284)
MariusBaldovin May 6, 2025
15dc480
Release/v2.2 (#1281)
jboddey May 6, 2025
f34a012
Regenerate the pdf on donwload if device profile is updated (#1283)
MariusBaldovin May 6, 2025
950a60e
413365465: (fix) [v2.2.1] add validation to disallow forward slashes …
OlgaMardvilko May 6, 2025
507710b
Do not show Welcome modal when opening TR in another tab (#1274)
sofyakurilova May 6, 2025
5b15d56
416198286: (fix) fix compliant status replaced with no-compliant resu…
OlgaMardvilko May 7, 2025
8d0dfb2
416187964: (fix) update dependences for fixing security issues (#1288)
OlgaMardvilko May 7, 2025
d09cce6
remove any kind of IP multicast from mdns test (#1294)
MariusBaldovin May 13, 2025
d0fc5e3
Testing/modbus (#1295)
MariusBaldovin May 13, 2025
ccc4147
feature/ntp_report_packets (#1296)
jhughesoti May 13, 2025
4bcebc3
show outbound connections when no tls connections are found (#1297)
jhughesoti May 14, 2025
ab57ea4
Change stop method to async (#1292)
jboddey May 14, 2025
b486af0
Fix bugs in _security_tls_v1_2_server (#1248)
MariusBaldovin May 15, 2025
2977c01
Fix Outbound connections table format (#1298)
hitnik May 15, 2025
df1c139
Resolve merge conflicts
jboddey May 20, 2025
c844df2
Fix package-lock.json
jboddey May 20, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions: {}
name: Tests
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 60
steps:
- name: Checkout source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
Binary file modified docs/roadmap.pdf
Binary file not shown.
16 changes: 14 additions & 2 deletions framework/python/src/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from fastapi import (FastAPI, APIRouter, Response, Request, status, UploadFile)
from fastapi.responses import FileResponse
from fastapi.middleware.cors import CORSMiddleware
import asyncio
from datetime import datetime
import json
from json import JSONDecodeError
Expand Down Expand Up @@ -350,9 +351,17 @@ async def stop_testrun(self, response: Response):
response.status_code = 404
return self._generate_msg(False, "Testrun is not currently running")

self._testrun.stop()
# Launch stop in the background
asyncio.create_task(self._run_stop())

return self._generate_msg(True, "Testrun stopped")
# Return response immediately
return self._generate_msg(True, "Testrun stop initiated")

async def _run_stop(self):
try:
await self._testrun.stop() # Assuming .stop is async
except Exception as e:
LOGGER.exception("Error while stopping testrun: %s", e)

async def get_status(self):
return self._testrun.get_session().to_json()
Expand Down Expand Up @@ -700,6 +709,9 @@ async def get_report(self, response: Response, device_name, timestamp):
response.status_code = 404
return self._generate_msg(False, "Device not found")

# Regenerate the pdf if the device profile has been updated
self._get_testrun().get_test_orc().regenerate_pdf(device, timestamp)

# 1.3 file path
file_path = os.path.join(
DEVICES_PATH,
Expand Down
5 changes: 5 additions & 0 deletions framework/python/src/common/testreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ def from_json(self, json_file):
if 'additional_info' in json_file['device']:
self._device['device_profile'] = json_file['device']['additional_info']

# Used for regenerating the report since after initial report creation the
# 'additional_info' field is changed to 'device_profile' in the report
if 'device_profile' in json_file['device']:
self._device['device_profile'] = json_file['device']['device_profile']

self._status = json_file['status']

if 'result' in json_file:
Expand Down
5 changes: 4 additions & 1 deletion framework/python/src/core/testrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,10 @@ def start(self):
while True:
time.sleep(5)

def stop(self):
async def stop(self):

# First, change the status to stopping
self.get_session().stop()

# First, change the status to stopping
self.get_session().stop()
Expand Down
115 changes: 62 additions & 53 deletions framework/python/src/test_orc/test_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,67 @@ def zip_results(self, device, timestamp: str, profile):
LOCAL_DEVICE_REPORTS.replace("{device_folder}", device.device_folder),
timestamp)

# Report file path
# Regenerate the report if the device profile has been updated
self._regenerate_report_files(device, timestamp)

# Define temp directory to store files before zipping
results_dir = os.path.join(f"/tmp/testrun/{time.time()}")

# Define where to save the zip file
zip_location = os.path.join("/tmp/testrun", timestamp)

# Delete zip_temp if it already exists
if os.path.exists(results_dir):
os.remove(results_dir)

# Delete ZIP if it already exists
if os.path.exists(zip_location + ".zip"):
os.remove(zip_location + ".zip")

shutil.copytree(src_path, results_dir)

# Include profile if specified
if profile is not None:
LOGGER.debug(f"Copying profile {profile.name} to results directory")
shutil.copy(profile.get_file_path(),
os.path.join(results_dir, "profile.json"))

with open(os.path.join(results_dir, "profile.pdf"), "wb") as f:
f.write(profile.to_pdf(device).getvalue())

# Create ZIP archive
shutil.make_archive(zip_location, "zip", results_dir)

# Delete the temp results directory
shutil.rmtree(results_dir)

# Check that the ZIP was successfully created
zip_file = zip_location + ".zip"
LOGGER.info(f"""Archive {"created at " + zip_file
if os.path.exists(zip_file)
else "creation failed"}""")

return zip_file

except Exception as error: # pylint: disable=W0703
LOGGER.error("Failed to create zip file")
LOGGER.debug(error)
return None

def regenerate_pdf(self, device, timestamp):
"""Regenerate the pdf report"""
self._regenerate_report_files(device, timestamp)

def _regenerate_report_files(self, device, timestamp):
'''Regenerate the report if the device profile has been updated'''

try:

# Report files path
report_path = os.path.join(
LOCAL_DEVICE_REPORTS.replace("{device_folder}", device.device_folder),
timestamp, "test", device.mac_addr.replace(":", ""))

# report.json path
report_json_path = os.path.join(report_path, "report.json")

# Parse string timestamp
date_timestamp: datetime.datetime = datetime.strptime(
timestamp, "%Y-%m-%dT%H:%M:%S")
Expand All @@ -382,21 +435,15 @@ def zip_results(self, device, timestamp: str, profile):
if test_report is None:
return None

# Load the report.json into TestReport
if os.path.exists(report_json_path):
with open(report_json_path, "r", encoding="utf-8") as report_json_file:
report_json = json.load(report_json_file)
test_report = TestReport()
test_report.from_json(report_json)

# Copy the original report for comparison
test_report_copy = copy.deepcopy(test_report)

# Update the report with 'additional_info' field
test_report.update_device_profile(device.additional_info)

# Overwrite report only if additional_info has been updated
# Overwrite report only if additional_info has been changed
if test_report.to_json() != test_report_copy.to_json():
LOGGER.debug("Device profile has been updated, regenerating the report")

# Store the jinja templates
reload_templates = []
Expand Down Expand Up @@ -432,49 +479,11 @@ def zip_results(self, device, timestamp: str, profile):
with open(os.path.join(report_path, "report.pdf"), "wb") as f:
f.write(test_report.to_pdf().getvalue())

# Define temp directory to store files before zipping
results_dir = os.path.join(f"/tmp/testrun/{time.time()}")

# Define where to save the zip file
zip_location = os.path.join("/tmp/testrun", timestamp)

# Delete zip_temp if it already exists
if os.path.exists(results_dir):
os.remove(results_dir)

# Delete ZIP if it already exists
if os.path.exists(zip_location + ".zip"):
os.remove(zip_location + ".zip")

shutil.copytree(src_path, results_dir)

# Include profile if specified
if profile is not None:
LOGGER.debug(f"Copying profile {profile.name} to results directory")
shutil.copy(profile.get_file_path(),
os.path.join(results_dir, "profile.json"))

with open(os.path.join(results_dir, "profile.pdf"), "wb") as f:
f.write(profile.to_pdf(device).getvalue())

# Create ZIP archive
shutil.make_archive(zip_location, "zip", results_dir)

# Delete the temp results directory
shutil.rmtree(results_dir)
LOGGER.debug("Report has been regenerated")

# Check that the ZIP was successfully created
zip_file = zip_location + ".zip"
LOGGER.info(f"""Archive {"created at " + zip_file
if os.path.exists(zip_file)
else "creation failed"}""")

return zip_file

except Exception as error: # pylint: disable=W0703
LOGGER.error("Failed to create zip file")
except Exception as error:
LOGGER.error("Failed to regenerate the report")
LOGGER.debug(error)
return None

def test_in_progress(self):
return self._test_in_progress
Expand Down
2 changes: 1 addition & 1 deletion make/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: Testrun
Version: 2.2
Version: 2.2.1
Architecture: amd64
Maintainer: Google <boddey@google.com>
Homepage: https://github.com/google/testrun
Expand Down
2 changes: 1 addition & 1 deletion modules/test/dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Within the ```python/src``` directory, the below tests are executed.
|---|---|---|---|
| dns.network.hostname_resolution | Verifies that the device resolves hostnames | The device sends DNS requests | Required |
| dns.network.from_dhcp | Verifies that the device allows for a DNS server to be provided by the DHCP server | The device sends DNS requests to the DNS server provided by the DHCP server | Informational |
| dns.mdns | Does the device has MDNS (or any kind of IP multicast) | Device may send MDNS requests | Informational |
| dns.mdns | Does the device has MDNS | Device may send MDNS requests | Informational |
6 changes: 6 additions & 0 deletions modules/test/ntp/ntp.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
# Image name: testrun/ntp-test
FROM testrun/base-test:latest

# Set DEBIAN_FRONTEND to noninteractive mode
ENV DEBIAN_FRONTEND=noninteractive

# Install required software
RUN apt-get update && apt-get install -y tshark

ARG MODULE_NAME=ntp
ARG MODULE_DIR=modules/test/$MODULE_NAME

Expand Down
1 change: 1 addition & 0 deletions modules/test/ntp/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

# User defined packages
scapy==2.6.0
pyshark==0.6
Loading