Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Code coverage showing partial coverage(Code coverage showing partial coverage in eclipse luna using eclemma)
Code coverage showing partial coverage [message #1713483] Wed, 04 November 2015 13:50 Go to next message
Sonam Sharma is currently offline Sonam SharmaFriend
Messages: 2
Registered: October 2015
Junior Member
Hello,

I have written test using SWTBOT in eclipse luna (e4 code). When i use eclemma for the code coverage i am getting yellow lines mostly. For example : I have used one dialog box which gets triggered while executing test but the composite of dialog gets partial coverage(below code) in some unusual manner.

@Override
protected CompositeLayer createCompositeLayer(ILayer sortHeaderLayer,
ILayer filterRowHeaderLayer, ILayer colGrBodyLayer) {
CompositeLayer compositeLayer = new CompositeLayer(1, 2);
compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER, sortHeaderLayer,
0, 0);
compositeLayer.setChildLayer(GridRegion.BODY, colGrBodyLayer, 0, 1);
compositeLayer.addConfiguration(new DefaultGridLayerConfiguration(
compositeLayer));

composite
.registerCommandHandler(new AutoResizeColumnCommandHandler
(compositeLayer, colGrBodyLayer));
return compositeLayer;
}

Orange color is actually yellow color showing partial coverage and green color shows full coverage i suppose.

Thanks for the help in advance. Smile
Re: Code coverage showing partial coverage [message #1714019 is a reply to message #1713483] Mon, 09 November 2015 12:40 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1751
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 04/11/2015 14:50, Sonam Sharma wrote:
> Hello,
>
> I have written test using SWTBOT in eclipse luna (e4 code). When i use
> eclemma for the code coverage i am getting yellow lines mostly. For
> example : I have used one dialog box which gets triggered while
> executing test but the composite of dialog gets partial coverage(below
> code) in some unusual manner.
> @Override
> protected CompositeLayer createCompositeLayer(ILayer sortHeaderLayer,
> ILayer filterRowHeaderLayer, ILayer colGrBodyLayer) {
> CompositeLayer compositeLayer = new CompositeLayer(1, 2);
> compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER,
> sortHeaderLayer,0, 0);
> compositeLayer.setChildLayer(GridRegion.BODY, colGrBodyLayer, 0, 1);
> compositeLayer.addConfiguration(new DefaultGridLayerConfiguration(
> compositeLayer));
> composite
> registerCommandHandler(new AutoResizeColumnCommandHandler
> (compositeLayer, colGrBodyLayer));
> return compositeLayer;
> }
>
> Orange color is actually yellow color showing partial coverage and green
> color shows full coverage i suppose.
>
> Thanks for the help in advance. :)

Hi

which lines are not covered?

Does your code throw exceptions at some points? Thrown exceptions
cannot be covered by Eclemma/Jacoco.

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:auto compile plugin
Next Topic:Testing Nebula's Nat Table functionality through SWTBot.
Goto Forum:
  


Current Time: Thu Sep 20 03:29:36 GMT 2018

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

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

Back to the top