Current testing scheme is partially virtual.
All test are done in so-called "dummy" mode.
This mode operates without any interaction with WiFi device.
Recently, the number of cases, when issue caused by changes wasn't detected by regular testing (using test_flows.py
) but noticed during nightly testbed test, has increased.
Yet, we don't have any means to provide automated testing on real hardware.
So temporarily, all developers were forced to manually trigger testbed testing for each PR published as part of regular flow.
CI has only one testbed set up available, so we can perform only single test at same moment.
Also, testbed is able to perform only Cerification tests.
We are interested in wider test scenarios, which cover project-specific bugs, corner cases and etc.
Due to limitations of current testing approach, need of automated tests on real hardware raises. In order to speed up development process, it was decided by community to use boardfarm as a base for automated testing. This project can provide us with basic infrastructure for tests and save effort in terms of development and support. For details about integration process, design please see next sections.
By itself, boardfarm provides us with:
- Abstraction of test setup
- Basic classes of devices
- DUT connectivity (ssh, serial, telnet, etc.)
- Test-suite organisation
boardfarm already has some representation of some general devices (like Linux, OpenWRT device).
But our test flows involve more components and require more info about devices[1].
So we have to expand base classes with representation of a Sniffer and prplWRT
devices capable handling Agent, Controller or both.
Also, some additional abstraction of easyMesh specific entities may ease future work (like CAPI, IEEE1905.1 message).
As boardfarm can handle serial, ssh and telnet connections we don't have expand that and will just use it.
Test suites are defined by .cfg
or .py
file.
Such suites logically group individual tests.
Testing report with logs, html page is generated for the whole suite.
It's expected to form-up main test suite which will repeat all tests from test-flows.py
.
Hierarchy of devices, entities their relation can be understood easier using typical test set-up scheme provided below:
Please, note.
In general case, it's expected that prplMesh is delivered to the DUT (device under test) as OpenWRT *.ipk
or the DUT is already flashed with prplMesh embedded in image.
Thus, LAN connection for flashing in uboot mode is not a must and is deliberately missing from the scheme.
In general, in order to start using boardfarm we have to create:
- Devices
- prplWRT
- dockerized dummy device
- Wired sniffer
- Wireless sniffer
- Additional entities
- UCCSocket
- ALEntity
- Radio
- RadioDocker
- RadioHostapd
- VirtualAP
- VirtualAPDocker
- VirtualAPHostapd
Relations between classes and their hierarchy displayed below:
Please, note. That scheme is general and do not includes all methods and fields. If you are interested in them, please see source code.
This additional infrastructure should be enough to start porting already existing tests from test_flows.py
.
boardfarm itself supports plugins[2]. It allows to embed code to boardfarm which isn't present in main repository. All device classes, test specific entities and tests itself should be included like this.
[1] Test flows documentation.
[2] Commit which replaces BFT_OVERLAY
with plugins functionality.