diff --git a/ft/README.md b/ft/README.md new file mode 100644 index 00000000..c11f0ffa --- /dev/null +++ b/ft/README.md @@ -0,0 +1,35 @@ +# Functional test + +Functional testing uses the robotframework automated testing framework, providing templates for each test case of the northbound APP and southbound DRIVER types. + +Testing is divided into the following categories. +|Test case|Description| +|-----|----------| +|Core interface test|Mainly including the addition, deletion, modification, query, subscription, and other operations of the HTTP API interface for core data(PLUGIN, NODE, GROUP, TAG)| +|Southbound DRIVER test|| +|Northbound APP test|| +|Plugin specific test case|Such as OPC UA specific device discovery, can different devices be connected normally| + +To run all functional testers + +Enter the neuron/build directory. +Install Mosquito software. +```shell +$ sudo apt-get install -y mosquitto +``` + +Start the mosquitto server. +```shell +$ mosquitto -v & +``` + +Install requirements. +```shell +$ python3 -m pip install -U pip +$ python3 -m pip install -r ft/requirements.txt +``` + +Run functional tests and generate test reports. +```shell +$ python3 -m robot --maxerroelines=600 -P ft/ -d ft/reports ft +``` diff --git a/tests/README.md b/tests/README.md index f1c2e211..5f5619a8 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,15 +1,15 @@ # Test - -To run all unit testers +Unit testing uses googletest testing framework, testing point processing, JSON reading, architecture, HTTP acquisition, and other small-scale tests. +To run all unit tests. ```shell $ cd build $ ctest --output-on-failure ``` -Introducing coverage statistics using LCOV +To introduce coverage statistics using LCOV: -Adding parameter -DUSE_GCOV=1 during compilation. +Add parameter -DUSE_GCOV=1 during compilation Generate image files .gcno and data files .gcda under build/tests/CMakeFiles/.dir