Simple Flask Server to create ESP WiFi Manager webpages
Install all required packages with the following command in a virtual environment to avoid any conflicts with other packages installed on your local system.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
On Windows the package pycryptodome>=3.14.0,<4
shall be used instead of
pycrypto>=2.6.1,<3
Simulation webpages use bootstrap 3.4.
Run the simulation of the ESP WiFi Manager after activating the virtual environment of the Setup section
sh run.sh
Open http://127.0.0.1:5000/
{:target="_blank"} in a browser
The unittests are covering a wide range of the simulation interface and use
the nose2
package to do so.
Run unittests for all or a single class or even for a single function as shown onwards
To create the necessary coverage report directories call the
prepare_test.sh
script
cd ./
# prepare coverage directories
sh prepare_test.sh
# run all unittests
nose2 --config tests/unittest.cfg -v tests
# run all unittests of the class WiFiManager
nose2 --config tests/unittest.cfg -v tests.test_wifi_manager
# run the unittest of the "load_and_connect" function of WiFiManager class
nose2 --config tests/unittest.cfg -v tests.test_wifi_manager.TestWiFiManager.test_load_and_connect
Test absolute truth of the unittesting framework itself.
nose2 --config tests/unittest.cfg -v tests.test_absolute_truth.TestAbsoluteTruth
Test generic helper
implementation
nose2 --config tests/unittest.cfg -v tests.test_generic_helper.TestGenericHelper
Test led helper
implementation. Currently only
the used Neopixel part of it.
nose2 --config tests/unittest.cfg -v tests.test_led_helper.TestNeopixel
Unittests of all Micropython fake modules.
Test fake machine
implementations.
nose2 --config tests/unittest.cfg -v tests.test_machine.TestMachine
nose2 --config tests/unittest.cfg -v tests.test_pin.TestPin
nose2 --config tests/unittest.cfg -v tests.test_rtc.TestRTC
Test fake neopixel
implementations.
nose2 --config tests/unittest.cfg -v tests.test_neopixel.TestNeoPixel
Test fake network
implementations.
nose2 --config tests/unittest.cfg -v tests.test_network.TestNetworkHelper
Test message
implementations.
nose2 --config tests/unittest.cfg -v tests.test_message.TestMessage
Test path helper
implementation.
nose2 --config tests/unittest.cfg -v tests.test_path_helper.TestPathHelper
Test time helper
implementation.
nose2 --config tests/unittest.cfg -v tests.test_time_helper.TestTimeHelper
Test wifi helper
implementation.
nose2 --config tests/unittest.cfg -v tests.test_wifi_helper.TestWifiHelper
Test wifi manager
implementation.
nose2 --config tests/unittest.cfg -v tests.test_wifi_manager.TestWiFiManager