Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Test and Validation(Adapt workbench and titan)
Test and Validation [message #1732183] Fri, 13 May 2016 10:17 Go to next message
Boubacar Diallo is currently offline Boubacar DialloFriend
Messages: 11
Registered: April 2016
Junior Member
Hello I try to adapt a test and validation which was made on workbench on the compiler Titan? Think you that there is a compatibility with both compilers workbench and Titan?
Re: Test and Validation [message #1732186 is a reply to message #1732183] Fri, 13 May 2016 10:27 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 760
Registered: January 2015
Senior Member
Hi Boubacar,

for sure there will be compatibility issues.
Three of such areas are granted: codecs, test ports/test adapters and external functions, as these are not standardized but implementation -dependent.
Besides these, there might be smaller ones arising from different degrees of adherence of the two tools to the standard etc.

But overall, the exercise is doable. For reference pls. look into this topic:

https://www.eclipse.org/forums/index.php/t/1074256/

where have converted a large-ish test suite to Titan. ( ETSI test suites are validated with TT Workbench , but not with Titan-at least this was the practice so far - so ETSI test suites are closer to Workbench; 3GPP test suites are validated both with Workbench and Titan so those present less conversion problems).

If you encounter any problems doing conversion, we'll be glad to help.

Best regards
Elemer







Re: Test and Validation [message #1732189 is a reply to message #1732186] Fri, 13 May 2016 11:17 Go to previous messageGo to next message
Boubacar Diallo is currently offline Boubacar DialloFriend
Messages: 11
Registered: April 2016
Junior Member
thank Elemer i am going look at the link . if have other question i come-back.
Re: Test and Validation [message #1732273 is a reply to message #1732189] Sat, 14 May 2016 11:26 Go to previous messageGo to next message
Alexandre Moine is currently offline Alexandre MoineFriend
Messages: 9
Registered: April 2016
Junior Member
Hi Elemer
Is there any way to compile the files parsed by TTWorkBench (the .ttcn3view files) with Titan? Or do I need to rewrite them in other syntax and format?
Re: Test and Validation [message #1732280 is a reply to message #1732273] Sat, 14 May 2016 13:44 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 760
Registered: January 2015
Senior Member
Hi Alexandre,

as far as I know, .ttcn3view files are TTCN-3 files representing the explicit conversion of an XSD or ASN.1 file.
(BTW Titan imports ASN.1 implicitly, without generating intermediate artifacts as the .ttcn3view files, and imports XSDs explicitly ,
converting the XML schemas into TTCN-3 files, which are in a way equivalent to the .ttcn3view files).
As such , these .ttcn3view files should be compileable directly with Titan.

However, this should be avoided.
in the light of the above,
1)instead of .ttcn3view files for ASN.1 it is preferred to import the ASN.1 files directly
2) instead of .ttcn3 view files for XSDs it is preferred to generate the intermediate
.ttcn files with xsd2ttcn

(see https://www.eclipse.org/forums/index.php/t/1077272/ for XML conversion and codecs)

The main reason for this is that the xsd2ttcn converter will also generate the encoding instructions needed for Titan to automatically generate the codec functions.

For instance , the following file, oma_xml_xdm_common_policy.ttcn3view
(downloaded from http://forge.etsi.org/websvn/filedetails.php?repname=LIBS.LibSip&path=%2FLibSip%2Ftrunk%2Fxsd%2Foma_xml_xdm_common_policy.ttcn3view&peg=426)

module oma_xml_xdm_common_policy {
  import from XSDAUX language "TTCN-3:2009" all; 

  type record EmptyType {
  }

  type record AnchorType {
    XSDAUX.anyURI anc optional,
    record of record {
      charstring name,
      anytype value_
    } anyAttributes optional
  }

  type record External_list {
    record of AnchorType entry optional
  }

}
with {
  encode "SupplementaryServices";
}


was generated from oma-common-policy.xsd ( you can google it up if interested in details)


The same XSD file converted with xsd2ttcn will result in:

/*******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/5 R5A                       
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
//
//  File:          urn_oma_xml_xdm_common_policy.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Sat May 14 15:25:53 2016
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- oma-common-policy.xsd
//			/* xml version = "1.0" encoding = "UTF-8" */
//			/* targetnamespace = "urn:oma:xml:xdm:common-policy" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module urn_oma_xml_xdm_common_policy {


import from XSD all;


/* OMA specific "conditions" child elements */


type EmptyType Other_identity
with {
  variant "name as 'other-identity'";
  variant "element";
};


type record External_list
{
	record of AnchorType entry_list
}
with {
  variant "name as 'external-list'";
  variant "element";
  variant (entry_list) "untagged";
  variant (entry_list[-]) "name as 'entry'";
};


type EmptyType Anonymous_request
with {
  variant "name as 'anonymous-request'";
  variant "element";
};


type record AnchorType
{
	XSD.AnyURI anc optional,
	record of XSD.String attr optional
}
with {
  variant "name as uncapitalized";
  variant (anc) "attribute";
  variant (attr) "anyAttributes";
};


type record EmptyType
{

}
with {
  variant "name as uncapitalized";
};



In the first case, the codec is hidden behind the
with {
  encode "SupplementaryServices";
}

expression, which will invoke the codec code;
in the second case, encoding appears explicitly in form of encoding variants which will be used by Titan to generate the codec code.

Similarly, Titan will generate BER codec for ASN.1 , but not for the equivalent .ttcn3view.

In conclusion , the answer to your question is that it is possible, but you should avoid it. .ttcn3view files are intermediate artifacts specific to the way of working of TT Workbench and have little meaning for Titan.

I hope it makes sense

Best regards

Elemer





[Updated on: Sat, 14 May 2016 17:55]

Report message to a moderator

Re: Test and Validation [message #1732310 is a reply to message #1732280] Sun, 15 May 2016 14:43 Go to previous messageGo to next message
Alexandre Moine is currently offline Alexandre MoineFriend
Messages: 9
Registered: April 2016
Junior Member
Hi
That sounds clear to me, thank you. I have an other question, how do you import .jar files into eclipse titan project? I didn't find any option in properties to add path(s) or whatever.
Re: Test and Validation [message #1732422 is a reply to message #1732310] Tue, 17 May 2016 07:59 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 760
Registered: January 2015
Senior Member
Hi Alexandre,

creating hybrid TTCN-3 - Java code as shown previously is an experimental feature, we don't have an established workflow for it and
the plug-ins have no support for it.

You will probably have to tweak the Makefile manually for a basic level of support.

Best regards

Elemer







Re: Test and Validation [message #1732534 is a reply to message #1732422] Wed, 18 May 2016 03:05 Go to previous messageGo to next message
Boubacar Diallo is currently offline Boubacar DialloFriend
Messages: 11
Registered: April 2016
Junior Member
Hi Elemer
Is it necessary to build manual makefile? What is what the adaptation of the file workbench in Titan obliges to have a file .cfg necessary for compilation?
Best regards
Re: Test and Validation [message #1732799 is a reply to message #1732534] Fri, 20 May 2016 10:09 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 760
Registered: January 2015
Senior Member
HI Boubacar,

no , in general the Makefile should be generated by utilities supplied with Titan;
on command line you have the makefilegen utility (see par 3.2.1 of userguide); the Designer also presents a similar option.

My comment was referring to the particular situation of mixing TTCN-3 and Java code.

You will have to assemble a config file manually though; that will not be used for compilation, but during execution; here you will have to define module parameters (see https://www.eclipse.org/forums/index.php/t/1077635/), test port parameters, logging parameters etc.

I assume workbench has a similar config file (maybe not in the form of a file, but graphical options). Certainly there is no automatic conversion option, so one cannot escape assembling the Titan config file manually.

I hope this clarifies the issue.


Best regards

Elemer


Re: Test and Validation [message #1732843 is a reply to message #1732799] Fri, 20 May 2016 17:29 Go to previous messageGo to next message
Boubacar Diallo is currently offline Boubacar DialloFriend
Messages: 11
Registered: April 2016
Junior Member
Hi Elemer
is it possible to make a communication between program Titan and a program Java according to this scenario : the program Java send a message to the program Titan who the recive and send an answer an other one program Java or the same program Java?

Best regards
Re: Test and Validation [message #1732852 is a reply to message #1732843] Sat, 21 May 2016 05:45 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 760
Registered: January 2015
Senior Member
Hi Boubacar,

yes, it is possible. However, if you want such a complex hybrid architecture, I'd recommend you to use language-agnostic APIs , based on for instance JSON;
please check previous posts

https://www.eclipse.org/forums/index.php/t/1070141/
https://www.eclipse.org/forums/index.php/t/1070600/


for examples and hints.

Best regards
Elemer
Re: Test and Validation [message #1732956 is a reply to message #1732852] Mon, 23 May 2016 12:01 Go to previous messageGo to next message
Boubacar Diallo is currently offline Boubacar DialloFriend
Messages: 11
Registered: April 2016
Junior Member
Hi Elemer
I want to make an example as on this link; https://www.eclipse.org/forums/index.php/t/1076977/ except when Titan executes the program, he send the verdict to the program Java which posts him.
Please help me.
Best regards

[Updated on: Mon, 23 May 2016 12:07]

Report message to a moderator

Re: Test and Validation [message #1732964 is a reply to message #1732956] Mon, 23 May 2016 13:22 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 760
Registered: January 2015
Senior Member
Hi Boubacar,

could you please describe more in detail what exactly the problem you encounter is?


BR Elemer


Re: Test and Validation [message #1732978 is a reply to message #1732964] Mon, 23 May 2016 14:09 Go to previous messageGo to next message
Boubacar Diallo is currently offline Boubacar DialloFriend
Messages: 11
Registered: April 2016
Junior Member
Hi Elemer
I have no idea how to write this program. It is just an idea which I want to test if it is possible. Thus I shall want to know if it is possible how we can make him ? Especially how to recuperate and send the verdict to the program Java.
Best Regards
Re: Test and Validation [message #1732983 is a reply to message #1732978] Mon, 23 May 2016 14:31 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 760
Registered: January 2015
Senior Member
Hi Boubacar,

to build it , please read through the original post; all information should be there.
In the use case described there, TTCN-3 invokes a Java function which returns a result, so communication is more or less unidirectional.

As I mentioned, this is only a proof of concept, we don't have extensive experience with TTCN-3/Java hybrids, so we cannot offer a lot more help.
As these hybrids are rather complex, one should really consider whether they are really worth the effort.


Best regards
Elemer






Previous Topic:How to work with optional fields
Next Topic:XML encoding in TTCN-3 and Titan part II: example
Goto Forum:
  


Current Time: Sat Jun 23 08:44:05 GMT 2018

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

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

Back to the top