Blame | Last modification | View Log | Download
In order to run the integration tests from the command line you have to## Install Lua5.3 , luarocks-3.2.1, nodejs and npm on da Pi# sudo apt remove -y lua5.1 liblua5.1-dev lua5.2 liblua5.2-dev lua5.3 liblua5.3-dev# sudo apt install lua5.3 liblua5.3-dev# sudo wget https://luarocks.org/releases/luarocks-3.2.1.tar.gz# sudo tar zxpfv luarocks-3.2.1.tar.gz# cd luarocks-3.2.1# ./configure# make# sudo make install# luarocks install lodash# luarocks install luasocket# luarocks install busted# luarocks install luacov# sudo apt install nodejs npm# cd <domoticz testDir>/dzVents/runtime/integration-tests# npm install##Warning!!DO NOT RUN THIS SCRIPT ON YOUR PRODUCTION DATABASE AS IT WILL DELETE EVERYTHING IN YOUR DATABASE!!!!!Then:* Make sure you have Domoticz running with an empty database from the commandline so you can see the log files.* Start the node http server: in `<domoticz testDir>/dzVents/runtime/integration-tests` run `npm start`.So at this point you have Domoticz running and a test nodejs http server.Then go to the test folder and run the tests:```cd runtime/integration-testsbusted test*```When all tests pass you should see this in the logs:```dzVents: Info: Results stage 2: SUCCEEDED```Also check the domoticz log. Some errors are to be expectedfor Raspberry Debian buster like systems a bash script is available: '/runtime/misc/testdzVents.sh' this script will execute all tests and integration tests. andpresent the outcome to your screen.========================= V4.11426 ================+========================== Tests ============================+| time | test-script | expected | tests | result | successful | failed | seconds |===================================================+=============================================================+00:00:02 Device 1 113 OK 113 0 1.009400:00:03 Domoticz 1 70 OK 70 0 0.938700:00:04 EventHelpers 1 32 OK 32 0 0.776900:00:05 EventHelpersStorage 1 50 OK 50 0 0.795200:00:06 HTTPResponse 1 6 OK 6 0 0.061300:00:06 ScriptdzVentsDispatching 1 2 OK 2 0 0.186200:00:07 TimedCommand 1 42 OK 42 0 0.314300:00:07 Time 3 326 OK 326 0 2.227300:00:10 Utils 1 17 OK 17 0 0.097000:00:10 Variable 1 15 OK 15 0 0.092300:00:10 ContactDoorLockInvertedSwitch 3 2 OK 2 0 3.233100:00:14 DelayedVariableScene 8 2 OK 2 0 7.207500:00:21 EventState 19 2 OK 2 0 18.239600:00:40 Integration 33 217 OK 217 0 32.603700:01:12 SelectorSwitch 10 2 OK 2 0 9.6688Total tests: 898Finished without erors after 00:01:22Terminated