Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » CoAP, MQTT and LWM2M TTCN-3 test case examples(CoAP, MQTT and LWM2M client code)
CoAP, MQTT and LWM2M TTCN-3 test case examples [message #1756376] Thu, 16 March 2017 07:31
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
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

Previous Topic:TTCN-3 decoding hypothesis
Next Topic:Not able to download Titan 6.1.0 binary for 64 bit Ubuntu 16.04
Goto Forum:
  


Current Time: Fri Mar 29 05:21:19 GMT 2024

Powered by FUDForum. Page generated in 0.02783 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top