Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Is it possible to execute ttcn3 test cases via cli?
Is it possible to execute ttcn3 test cases via cli? [message #1735539] Tue, 21 June 2016 02:48 Go to next message
Raymund Galapate is currently offline Raymund GalapateFriend
Messages: 4
Registered: June 2016
Junior Member
Hello.

I would like to automate the execution of ttcn3 using jenkins.
Is it possible to execute ttcn3 test cases via cli and will generate xml for the results?
Re: Is it possible to execute ttcn3 test cases via cli? [message #1735615 is a reply to message #1735539] Tue, 21 June 2016 12:48 Go to previous messageGo to next message
Gergely Pilisi is currently offline Gergely PilisiFriend
Messages: 1
Registered: June 2016
Junior Member
Hi Raymund,

you can use your scripts or commands, just add an "Execute shell" build step in Jenkins to your project.
You can also use JUnitLogger to create plots or statistics from the created xml files under the workspace. You need to add "Publish JUnit test result report" as a Post-build action and add the path to your xml files.

BR,
Gergely Pilisi
Re: Is it possible to execute ttcn3 test cases via cli? [message #1735620 is a reply to message #1735539] Tue, 21 June 2016 12:51 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Raymund,

Titan has a core part that can be used via CLI; in fact this is the default usage;
The Eclipse plug-ins are merely a front-end to this core part.

Titan logs are produced in a proprietary text format, but it is possible to create logger plug-ins to generate any format, e.g. XML.

Some example logger plugins are published together with the Titan code, see https://github.com/eclipse/titan.core/tree/master/loggerplugins
Two of them are using sightly different JUnit XML formats , which Jenkins can process. Pls. take a look, these might be interesting for you.

For more info about logger plug-ins, see

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

and the reference guide.


In fact we ourselves are using Jenkins to run Titan daily/regression/performance etc. tests.

For execution via CLI, please take a look in this forum, I have published several examples of command line executable code.


Best regards

Elemer








[Updated on: Tue, 21 June 2016 12:53]

Report message to a moderator

Re: Is it possible to execute ttcn3 test cases via cli? [message #1735696 is a reply to message #1735620] Wed, 22 June 2016 05:12 Go to previous messageGo to next message
Raymund Galapate is currently offline Raymund GalapateFriend
Messages: 4
Registered: June 2016
Junior Member
Thank you for the help Elemer. Smile

[Updated on: Wed, 22 June 2016 05:13]

Report message to a moderator

Re: Is it possible to execute ttcn3 test cases via cli? [message #1736150 is a reply to message #1735620] Mon, 27 June 2016 07:28 Go to previous messageGo to next message
Raymund Galapate is currently offline Raymund GalapateFriend
Messages: 4
Registered: June 2016
Junior Member
I have tried the steps in this link you've given me:
https://www.eclipse.org/forums/index.php/t/1074250/

But I have this error message when executing makefilegen:
makefilegen: error: Generating Makefile with dynamic linking enabled is not supported on Windows platform.

What did I miss?
Re: Is it possible to execute ttcn3 test cases via cli? [message #1736168 is a reply to message #1736150] Mon, 27 June 2016 08:36 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Raymund,

well, exactly what it says;

Titan is primarily intended for Linux/Unix. Cygwin represents a compromise that is not always suitable.
Is there any reason you started with dynamic logger plug-ins?

In most cases dynamic linking is not needed, and the code will work seamlessly on Cygwin.


Best regards
Elemer





Re: Is it possible to execute ttcn3 test cases via cli? [message #1736171 is a reply to message #1736168] Mon, 27 June 2016 09:22 Go to previous messageGo to next message
Raymund Galapate is currently offline Raymund GalapateFriend
Messages: 4
Registered: June 2016
Junior Member
"Is there any reason you started with dynamic logger plug-ins?"
I just wanted my TTCN to generate XML result.

And from the link you've given me it executes:
makefilegen -fl hello.ttcn

I guess the -l flag caused the error.

Is there other way to generate XML file in Windows platform?
Re: Is it possible to execute ttcn3 test cases via cli? [message #1736172 is a reply to message #1736171] Mon, 27 June 2016 09:31 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Raymund,

sorry, of course you have started with dynamic logger plug-ins as I have pointed to that direction.

"Is there other way to generate XML file in Windows platform?"

Yes there is;

- you can use a virtual Linux machine in which you execute your Titan binary; this usually takes its toll on the memory usage, but if your Titan executable is not large , it may work; depends on your environment

-you can also to to solve your problem outside the logging subsystem:
-write directly to a file some user messages formatted as XML
-send the above XML through a test port


However all these are more contorsionate and complicated than using
Linux.


Best regards
Elemer









Previous Topic:Problem with JUnitLogger: unexpected AST node
Next Topic:Advanced TTCN-3 usage: busy wait vs. non-busy wait in altsteps
Goto Forum:
  


Current Time: Thu Apr 25 19:50:32 GMT 2024

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

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

Back to the top