WTF - WiFi Test Framework for OpenWrt

Hi,

I’m working on a small open-source tool called WTF — Wi-Fi Test Framework. The goal is to automate repetitive Wi-Fi throughput tests on OpenWrt-based access points.

The basic use case is:

  1. Change Wi-Fi radio settings on the AP
  2. Apply/reload the wireless configuration
  3. Run iperf3 throughput measurement
  4. Collect the result
  5. Repeat the same process for multiple channel/bandwidth combinations

This is mainly intended for testing Wi-Fi performance under different radio configurations, for example when comparing different channels, bandwidth settings, or AP/client setups.

At the current stage, WTF is a Python CLI tool that runs from a Linux client machine and controls the OpenWrt AP remotely.

Current architecture:

  • Linux client machine runs WTF
  • WTF connects to the OpenWrt AP via SSH
  • Wireless settings are changed using UCI
  • iperf3 is used for throughput measurements
  • A separate control network is used for SSH/UCI access
  • A Wi-Fi test network is used for throughput testing
  • The control network and the test network are expected to use different IP address spaces.

Current functionality:

  • configuration loading and validation
  • basic CLI commands
  • OpenWrt AP abstraction
  • SSH/UCI interaction
  • initial iperf3 test execution flow
  • result saving

Planned next steps:

  • better error handling
  • more automated tests
  • CI/CD
  • improved documentation
  • eventually PyPI packaging

The project is still early-stage and not production-ready. I’m mainly looking for feedback from people who work with OpenWrt, Wi-Fi testing, or network automation.

I would especially appreciate comments on:

  • whether this client-side architecture makes sense;

  • better ways to apply/reload wireless settings after UCI changes;

  • common failure cases I should handle when changing Wi-Fi settings remotely;

  • whether there are existing OpenWrt tools or workflows I should study;

  • how to structure tests for this kind of tool without requiring real hardware for every test.

GitHub:
https://github.com/KOROBYAKA/WTF

Any feedback or criticism is welcome.

5 Likes

Catchy name :slightly_smiling_face:

4 Likes

It's what you say when the test results come out :smiley:

2 Likes

Why not use a test framework, like pytest? I think it would be beneficial, because:

  1. Save you from inventing a machinery that runs tests - it's already there
  2. It is familiar to a lot of people (or should be :wink: ), so it's going to be easier for people to use, and also for them to contribute to the project
  3. It comes with builtin (or plugin-available) report generation capacity, so you can make this fancier using existing components, rather than build it all from scratch
  4. It also provides an easier way to repeat the same test with different parameters

just my $0.02

Realistically, pure throughput tests will only show how well a wifi link deals with bulk data transfers. Many use cases however are interactive and their quality will, above a certain capacity (often 25-50 Mbps), already plateau out, and the perceived quality will depend much stronger on latency and jitter. So I would ask you to also add concurrent latency measurements to your load testing, so you will know the latency and jitter for both idle and loaded conditions. Finally, and that might already be part of your system, I would recommend to use 3 distinct load phases with a bit of cool off between them: download only, upload only, concurrent down- and upload.

1 Like

At the moment WTF is more of a benchmark-style utility, so pure pass/fail logic provided by pytest is not what I really want from it. But I agree that pytest features, like parametrization and fixtures, could be useful here.

Also I'm still newbie for Python&pytest infra/env, so I'll explore if there are suitable benchmark-style reporting plugins or patterns I'll think about pytest could be integrated into WTF

Thanks for your $0.02)

Thanks, that's a really good point!

At the moment WTF is mostly focused on throughput measurement, because that was the original task that led to the idea of WTF.

This looks like a very good next step for the project. My first idea is to run ping in parallel while the iperf3 test is running, and then store latency statistics together with the throughput results. Do you think it's god enoug or there should be another execution/measurement methodology?

1 Like

Have a look at what crusader (https://github.com/Zoxc/crusader) does... three load phases all with bidirectional latency measurements (and per side reporting of lost latency probes). That is a pretty decent approach to quickly characterize a link. If possible try to measure one-way delays, but that can be tricky, and then simple RTT measurements are already much better than nothing. The challenge is to make the latency probes dense enough be be interpretable but not so dense that they cause too much of a load by themselves...

1 Like

Make them all pass :rofl:

I see you point, those are tests to obtain metrics not validations. But as you pointed out, you might benefit from the structure it provides to make the development of your tests easier. That beings said, I dare say that one day, in the future you will reach the point where (or asked to) thresholds will be set to determine if those metrics you have been obtaining are good or bad.

(not necessarily a problem for pytest to solve, I know)

1 Like

I've release a new version with RTT, check here: Update: WTF now supports RTT, loaded RTT, throughput, CPU load and plotting - #2 by lleachii

The OWD measurements require another util, so I think I'll make some day lightweighted OWD metrics collector, but won;t include it to the WTF, at least for now.