Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » CoAP Conformance example test cases in titan.misc(IPL4 test port in UDP mode-example)
CoAP Conformance example test cases in titan.misc [message #1745671] Fri, 14 October 2016 09:37 Go to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
The recently published conformance test cases (see https://github.com/eclipse/titan.misc) are based on

http://www.etsi.org/plugtests/CoAP/Document/CoAP_TestDescriptions_v015.pdf


and this is how you can execute them:


git clone https://github.com/eclipse/titan.misc

cd titan.misc


Initialize/update submodules:

git submodule init CoAP_Conf/Libraries/titan.Libraries.TCCUsefulFunctions
git submodule init CoAP_Conf/ProtocolModules/titan.ProtocolModules.CoAP
git submodule init CoAP_Conf/TestPorts/titan.TestPorts.Common_Components.Socket-API
git submodule init CoAP_Conf/TestPorts/titan.TestPorts.IPL4asp


git submodule update CoAP_Conf/Libraries/titan.Libraries.TCCUsefulFunctions
git submodule update CoAP_Conf/ProtocolModules/titan.ProtocolModules.CoAP
git submodule update CoAP_Conf/TestPorts/titan.TestPorts.Common_Components.Socket-API
git submodule update CoAP_Conf/TestPorts/titan.TestPorts.IPL4asp







cd CoAP_Conf/bin

./install.sh  # will create symlinks
make   

Check that you have a Java version at least 1.8

 java -version


Run the Eclipse Californium server (attached; alternatively you can create/configure your own, see http://www.eclipse.org/californium/)

 java -jar CaliforniumServer.jar


The server will start to listen on port 5683:


Oct 14, 2016 9:56:13 AM org.eclipse.californium.core.network.config.NetworkConfig createStandardWithFile
INFO: Loading standard properties from file Californium.properties
Oct 14, 2016 9:56:14 AM org.eclipse.californium.core.CoapServer start
INFO: Starting server
Oct 14, 2016 9:56:14 AM org.eclipse.californium.core.CoapServer start
INFO: No endpoints have been defined for server, setting up server endpoint on default port 5,683
Oct 14, 2016 9:56:14 AM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Starting endpoint at 0.0.0.0/0.0.0.0:5683
origin-tracer directory does not exist. Skipping origin traces...
PlugtestServer listening on port 5683



Execute the test cases:

ttcn3_start coaptests coap.cfg



As a result you should have 8 pass verdicts:

:
:
MC@esekilxxen1841: Terminating MTC.
MTC@esekilxxen1841: Verdict statistics: 0 none (0.00 %), 8 pass (100.00 %), 0 inconc (0.00 %), 0 fail (0.00 %), 0 error (0.00 %).
MTC@esekilxxen1841: Test execution summary: 8 test cases were executed. Overall verdict: pass
MC@esekilxxen1841: MTC terminated.




This is not a complete suite but it can be a good reference for a more exhaustive conformance package.

An interesting feature of the code is that it uses the IPL4 test port for UDP transport.


Best regards
Elemer

[Updated on: Fri, 14 October 2016 09:41]

Report message to a moderator

Re: CoAP Conformance example test cases in titan.misc [message #1746072 is a reply to message #1745671] Fri, 21 October 2016 09:59 Go to previous messageGo to next message
Naum Spaseski is currently offline Naum SpaseskiFriend
Messages: 81
Registered: February 2016
Location: Sophia Antipolis
Member

Hello Elemer,

Thank you for the tests, they are very useful to test the possibilities of CoAP standard messages.

I have a question regarding large messages. I want to send a large message, for example a key, to the test system. Normally, Californium will separate the message in multiple smaller ones. I will receive the first, but I can't get the next one. The options parameter from the response isn't decoded like it should, and consequently I can't send a request to get the second part of the message because I don't know how to encode it. So, how should I treat the messages?

The spec concerning the separating of messages is https://tools.ietf.org/html/draft-ietf-core-block-15

Thanks in advance.

Best regards,
Naum
Re: CoAP Conformance example test cases in titan.misc [message #1746217 is a reply to message #1746072] Tue, 25 October 2016 13:10 Go to previous messageGo to next message
Naum Spaseski is currently offline Naum SpaseskiFriend
Messages: 81
Registered: February 2016
Location: Sophia Antipolis
Member

Hello Elemer,

After further analyzing the problem, I understood that the CoAP codec receives the message correctly (confirmed with wireshark) but it doesn't decode it correctly. The Block2, described in the document above, says that its length should be 0-4 bytes. My response from the server is three bytes, and for some reason, the Codec jumps the first two bytes and decodes only the third.

So, for now I have a dirty workaround, but we should fix it properly.

Best regards,
Naum.
Re: CoAP Conformance example test cases in titan.misc [message #1746222 is a reply to message #1746217] Tue, 25 October 2016 14:37 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Naum,

message fragmentation as described above is not part of CoAP RFC 7252, but a separate RFC, not yet implemented, so current CoAP is not aware of these Options.
The implementation required is small, we will do it soonest.



Best regards
Elemer
Re: CoAP Conformance example test cases in titan.misc [message #1746714 is a reply to message #1746222] Thu, 03 November 2016 15:41 Go to previous messageGo to next message
Naum Spaseski is currently offline Naum SpaseskiFriend
Messages: 81
Registered: February 2016
Location: Sophia Antipolis
Member

Hello Elemer,

I prepared the workaround a little more cleaner (encoding and decoding of a structure with 3 elements, NUM, M and SZX), but I have problems to commit it in the repository http://git.eclipse.org/c/titan/titan.ProtocolModules.CoAP.git, because I don't have rights to do it. I tried it on the master branch, and also on a separate branch, but no success.

What should I to in order to commit the code?

Thanks in advance,

Best regards,
Naum.
Re: CoAP Conformance example test cases in titan.misc [message #1746722 is a reply to message #1746714] Thu, 03 November 2016 16:59 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Naum,

simplest thing you can do is send me the code and I'll have it committed.
Otherwise we are not yet fully familiar with eclipse git, as so far we worked in github (and apparently we have exceeded our quota there...).
But I'll dig into it eventually.

So please end me the changes in some form and I'll see what we can do with it.
If it's not fitting, I'll scream.

Best regards
Elemer



[Updated on: Thu, 03 November 2016 17:00]

Report message to a moderator

Re: CoAP Conformance example test cases in titan.misc [message #1746784 is a reply to message #1746722] Fri, 04 November 2016 14:29 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Dear all,

Both the CoAP protocol module in Eclipse git ( see http://git.eclipse.org/c/)
and the conformance suite in github titan.misc have been updated according to the above.


Best regards
Elemer

Previous Topic:Eclipse Titan presence on software test conferences
Next Topic:Octetstring Manipulation
Goto Forum:
  


Current Time: Fri Apr 19 14:36:53 GMT 2024

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

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

Back to the top