Generating invalid UTF-8 [message #1797533] |
Thu, 01 November 2018 06:23  |
Eclipse User |
|
|
|
Hello,
while implementing conformance test for MQTT, I discovered the need of generating invalid UTF-8 characters/strings.
This need originates from the MQTT specification. There, the conformance statements [MQTT-1.5.3-1] and [MQTT-1.5.3-2] state that invalid UTF-8 characters must be handled by the SUT by closing the network connection.
For this purpose, we have already a few defined and implemented test cases (e.g. f_TC_MQTT_BROKER_CONNECT_020 in MQTT_Testcase_Functions.ttcn). However, these TCs started to fail with a Dynamic test case error after updating Titan.
After an investigation on this issue, I figured out that the error is caused by the @update feature. The attached UTF8.ttcn file illustrates the error with a minimal example.
However, with regard to Titan's release notes and TTCN-3 Core Language specification the @update feature seems to be unofficial anyway.
Unfortunately, I don't see any "standard compliant" solution to this issue. Anyone out there with a proposal or handy tips?
Best regards,
Alexander
Attachment: UTF8.ttcn
(Size: 2.44KB, Downloaded 87 times)
|
|
|
|
|
|
|
|
Re: Generating invalid UTF-8 [message #1797842 is a reply to message #1797808] |
Wed, 07 November 2018 05:42  |
Eclipse User |
|
|
|
Hi Botond,
thank you for your investigation and explanation.
Disabling the error solved the issue. As I was setting the stringLength also via the '@update' feature as described in your example, ignoring this error should be an appropriate solution.
Now the encoded octetstrings look good, thanks again.
Best regards,
Alex
|
|
|
Powered by
FUDForum. Page generated in 0.31677 seconds