mirror of
https://github.com/emqx/neuron.git
synced 2026-10-29 07:06:32 +08:00
@@ -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
|
||||
```
|
||||
+4
-4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user