Skip to content

Extensive integration testing #1038

@GyulyVGC

Description

@GyulyVGC

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:

  1. the challenge to have a reproducible and testable stream of network traffic
  2. 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:


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

Metadata

Metadata

Assignees

Labels

icedSomething related to the GUI library usedtestingUnit and integration testing to make the app more reliable

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions