Implement comprehensive test suite improvements

- Added 42 new tests covering critical functionality:
  * WiFi connection flow tests (6 tests)
  * Callback firing verification tests (4 tests)
  * DNS server lifecycle tests (3 tests)
  * Error condition tests (7 tests)
  * Parameter value management tests (5 tests)
  * WiFi scanning tests (4 tests)
  * State transition tests (4 tests)
  * Integration tests (5 tests)
  * Stress tests (5 tests)

- Fixed compilation errors by replacing protected connectWifi() calls with public autoConnect()
- Fixed config reset callback test to use resetSettings() instead of erase()
- Added delays around resetSettings() calls to prevent ESP8266 WiFi stack crashes
- Reduced stress test iterations to avoid excessive output
- Improved test stability with better state checking and error handling

Total test count: 86 tests (up from 44)
All tests passing successfully
This commit is contained in:
2025-11-05 23:25:06 +10:00
parent b94f34f06a
commit f056893f87
18 changed files with 1480 additions and 7 deletions
@@ -70,6 +70,9 @@ void test_ap_callback() {
wm.startConfigPortal("TestAP");
// Call process() to ensure portal is fully initialized
wm.process();
// Callback should have fired when AP starts
TEST_ASSERT_TRUE(ap_callback_fired);
@@ -89,6 +92,8 @@ void test_web_server_callback() {
wm.startConfigPortal("TestAP");
// Call process() to ensure server is initialized
wm.process();
delay(100); // Give time for server to start
// Callback should have fired when server starts
@@ -145,6 +150,8 @@ void test_multiple_callbacks() {
wm.setConfigPortalTimeout(5);
wm.startConfigPortal("TestAP");
// Call process() to ensure portal is fully initialized
wm.process();
delay(100);
// Verify AP callback fired