-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Some unit tests already assert the behaviour of the app in its most critical aspects, but right now there's nothing in place even remotely close to appropriate and thorough integration tests.
Sniffnet's scarcity of testing is historically due to two aspects:
- the challenge to have a reproducible and testable stream of network traffic
- the lack of a framework to properly test Iced-based GUIs
Now, both of these limitations seem to be gone.
Point 1. is not a problem anymore because Sniffnet now supports PCAP files import (#795) — this means that we can test packets parsing functionalities against a capture file crafted for the purpose.
Point 2. is also obsolete, since starting from Iced 0.14 they introduced various testing facilities that are game changers in this regard:
- headless mode testing (Headless Mode Testing iced-rs/iced#2698)
- time travel debugging (Time Travel Debugging iced-rs/iced#2910)
- first-class end-to-end testing: test recorder, runtime emulator, program presets, Ice test syntax, and selector API (First-Class End-to-End Testing — Test Recorder, Runtime Emulator, Program Presets, Ice Test Syntax, and Selector API iced-rs/iced#3059)
This issue wants to track the need for extensive integration testing of the whole application, with particular attention to:
- network traffic analysis and statistics
- number of packets / bytes observed
- traffic directionality
- multicast and broadcast identification
- capture timestamps
- network 5-tuples
- protocols and services
- message kinds for ARP and ICMP
- countries and ASNs (we can generate custom MMDBs to test this)
- BPF filters
- graphical user interface interactions and appearance
- test that every interaction has the desired effects on the state of the app
- put in place a workflow to generate screenshots to visually assert that pages are displayed as expected
- record tests, export them as files, and use the emulator to verify that behaviour is stable and consistent after the introduction of new features
- test app stored configurations: samples, backward-compatibility, hedge-cases, invalid TOMLs
- with particular care for window and thumbnail position, window size, and app scale factor