CoAP, MQTT and LWM2M TTCN-3 test case examples [message #1756376] |
Thu, 16 March 2017 07:31 |
|
Dear all,
please find attached a few example test cases as part of a mini-framework for IOT protocols CoAP, MQTT and LWM2M(Lightweight M2M).
* Contents:
build/
sources symlinked from src/
Makefile (for Linux)
cfg/
Config files for the tests:
ft_coap.cfg (tests against COAP stack like Californium)
ft_leshan.cfg (tests against Leshan LwM2M server)
ft_mqtt.cfg (tests against MQTT broker)
sut/
System under test implementations:
paho.mqtt.testing (includes an MQTT broker implemented in Python)
CaliforniumServer.jar (COAP test server implemented with Californium stack)
Leshan-server-demo.jar (Leshan LwM2M server)
src/
IoT_Framework/
src/
Framework sources
test/
CoapTestSuite_Etsi.ttcn (TTCN-3 tests against COAP stack)
LeshanTestSuite.ttcn (TTCN-3 tests against Leshan using HTTP and LwM2M with COAP binding)
MqttTestSuite_Interop.ttcn (TTCN-3 tests against an MQTT broker)
* Build
ttcn3_makefilegen -f -g -e iottests *.ttcn *.hh *.cc (optional; the pregenerated Makefile should be OK)
make
* Execute
- COAP tests
Start SUT: java -jar ./CaliforniumServer.jar
(Java 8 required)
Start tests: ttcn3_start ./build/iottests ./cfg/ft_coap.cfg
- LwM2M tests
Start SUT: java -jar ./leshan-server-demo.jar
(Java 8 required)
Start tests: ttcn3_start ./build/iottests ./cfg/ft_leshan.cfg
- MQTT tests
Start SUT: python ./paho.mqtt.testing/interoperability/startbroker.py
(Python 3.4 required)
Start tests: ttcn3_start ./build/iottests ./cfg/ft_mqtt.cfg
Notes:
- The tests are not production-ready, they are provided as examples to be used as starting points for further development
Waiting for responses is not guarded with timers, the test execution might get stuck
Failing test can influence the next tests
Running against correct implementations should work though :-)
Hope you'll find it useful.
Best regards
Elemer
-
Attachment: IoT_FT.tgz
(Size: 11.99MB, Downloaded 223 times)
[Updated on: Thu, 16 March 2017 11:41] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02783 seconds