Code coverage showing partial coverage [message #1713483] |
Wed, 04 November 2015 13:50 |
Sonam Sharma 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.
|
|
|
Re: Code coverage showing partial coverage [message #1714019 is a reply to message #1713483] |
Mon, 09 November 2015 12:40 |
|
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
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Powered by
FUDForum. Page generated in 0.24776 seconds