A popular feature of the LANforge WiFIRE feature set is captive portal testing portal-bot. If you’re considering doing captive portal testing, the first thing to know is that you are not going to be automating a bunch of web browsers (that would be madness). You will be writing a perl script. More specifically, a perl .pm extension to our portal-bot.pl script.
Portal testing can be complex because it normally involves re-creating whatever JSON/AJAX/REST call chain the web pages does with a perl script. This process looks like:
- Establish laptop with serial connection to LANforge system and with an Ethernet cable
- VNC to LANforge and change default gateway and use browser to document login HTTP process
- Write a portal-bot extension that mimics that behavior
- Incorporate a logout mechanism
It is very useful (and a requirement for long-running capacity testing) to have an API call to the captive portal controller that will log out a session. Otherwise you cannot repeat the test for each station without manually intervening at the captive portal controller to log out one/some/all logged in stations. This logout mechanism could be web-based or could be ssh based, so long as the mechanism can be unattended.
Please review some of our existing portal-testing documentation:
- The WiFi Captive Portal Bot
- Associating Stations with the lf_associate_ap Script
- Changing Station POST_IFUP Field with the CLI API