Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Getting coverage information using Junit plugin
Getting coverage information using Junit plugin [message #1836619] Sat, 09 January 2021 15:35 Go to next message
Kieran Thompson is currently offline Kieran ThompsonFriend
Messages: 7
Registered: January 2021
Junior Member
Hello

I am looking at examples.eunit.juint project from the example section of the git repository. I was wondering how the profiler tool can be intergrated into this, to get coverage of the ETL transformation, that is run via test? Or is there another approach that is needed, to get this coverage?

If someone could point me in the right direct that would be very helpful.

Thanks for the help.

Kieran

(New user)
Re: Getting coverage information using Junit plugin [message #1836628 is a reply to message #1836619] Sun, 10 January 2021 08:46 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Kieran,

I'm not aware of any tooling that calculates test coverage for ETL transformations out of the box I'm afraid.

Thanks,
Dimitris
Re: Getting coverage information using Junit plugin [message #1836631 is a reply to message #1836628] Sun, 10 January 2021 12:42 Go to previous messageGo to next message
Kieran Thompson is currently offline Kieran ThompsonFriend
Messages: 7
Registered: January 2021
Junior Member
Hi Dimitris,

Thank you for the reply.

How would you suggest I go about building a tool that could get test execution coverage/information, from the ETL?

Thank you for the help.

Kieran


Re: Getting coverage information using Junit plugin [message #1836632 is a reply to message #1836631] Sun, 10 January 2021 12:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Kieran,

You can hook into the execution of Epsilon programs as shown below (for ETL you should replace EolModule with EtlModule). That should give you all the information you need to implement such a tool.

public static void main(String[] args) throws Exception {
	
	EolModule module = new EolModule();
	module.parse("for (i in 1.to(10)) { i.println(); }");
	module.getContext().getExecutorFactory().addExecutionListener(new IExecutionListener() {
		
		@Override
		public void finishedExecutingWithException(ModuleElement me, EolRuntimeException exception, IEolContext context) {}
		
		@Override
		public void finishedExecuting(ModuleElement me, Object result, IEolContext context) {
			System.out.println(me);
		}
		
		@Override
		public void aboutToExecute(ModuleElement me, IEolContext context) {}
	});
	module.execute();
}


Thanks,
Dimitris

[Updated on: Sun, 10 January 2021 17:29]

Report message to a moderator

Re: Getting coverage information using Junit plugin [message #1836635 is a reply to message #1836632] Sun, 10 January 2021 17:27 Go to previous message
Kieran Thompson is currently offline Kieran ThompsonFriend
Messages: 7
Registered: January 2021
Junior Member
Hi Dimitris

Thank you very for your help and fast reponses, with this. It is very much appreciated. I will try this approach out soon.

Thanks again
Kieran
Previous Topic:EVL not creating markers
Next Topic:Running Epsilon Server-Side
Goto Forum:
  


Current Time: Sat Apr 27 12:20:37 GMT 2024

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

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

Back to the top