copyright vincent massol 2006 all rights reserved panorama of quality features in maven2 vincent...

33
Copyright Vincent Massol 2006 – All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006 http://massol.net

Upload: edward-hunter

Post on 18-Jan-2018

216 views

Category:

Documents


0 download

DESCRIPTION

Copyright Vincent Massol 2006 – All rights reserved Active quality = before the fact

TRANSCRIPT

Page 1: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Panorama of Quality Features in Maven2

Vincent Massol, 11 July 2006http://massol.net

Page 2: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Active Quality vs Passive Quality

Page 3: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Active quality = before the fact

Page 4: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Passive quality = after the fact

Page 5: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Both are required…… but moving to active is the

direction to take

Page 6: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

… and Maven can do both٭!

Page 7: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Quality plugins

● Surefire– JUnit and TestNG– Cargo and other

container plugins● PMD● Checkstyle● Verifier● Clover

● Clirr● Cobertura● Jalopy● JDepend● JavaNCSS● JDiff

In Maven In Mojo

● DBUnit● Jardiff● JCoverage● FindBugs● Simian

In Mojo sandbox

Page 8: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Let’s review some plugins for…● Tests (unit, integration and

functional)● Best practices (Checkstyle, PMD,

etc)● Test Percentage Coverage● Binary compatibility

Page 9: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Common testing infrastructure for testing frameworks (JUnit,

TestNG, etc)

Page 10: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

New forking strategies: once, never, always

Page 11: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

New integration test phase and Cargo plugin for automating

J2EE application testing

Page 12: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Strategy for active checks

● Strategy– Fail the build upon test failure

Page 13: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Demo …

Page 14: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Let’s review some plugins for…● Tests (unit, integration and

functional)● Best practices (Checkstyle, PMD,

etc)● Test Percentage Coverage● Binary compatibility

Page 15: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Checkstyle, PMD, Findbugs can fail the build (active) or

generate a report (passive)

Page 16: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Local Repo

Build ToolsModule

Module to be checked

build-tools.jar Depends onbuild-tools.jar

Best practices concept

Page 17: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Strategy for active checks

● Strategy 1– Turn on all agreed checks at beginning of project

● Strategy 2– Activate some checks– Increase # of checks at each release

Page 18: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Demo …

Page 19: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Let’s review some plugins for…● Tests (unit, integration and

functional)● Best practices (Checkstyle, PMD,

etc)● Test Percentage Coverage● Binary compatibility

Page 20: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Clover, Cobertura plugins can fail the build (active) or

generate reports (passive)

Page 21: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Module 1

Module 2

Module 3

Depends on

Local Repository

module1-clover.jar

module2-clover.jar

module3-clover.jar

Build

Dependency

Clover plugin for Functional testing

Page 22: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

… and aggregates reports at each parent POM level

Page 23: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Strategy for active checks

● Strategy– Check TPC at release– Set threshold to be this TPC– Fail the build when under this threshold– Repeat

Page 24: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Demo …

Page 25: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Let’s review some plugins for…● Tests (unit, integration and

functional)● Best practices (Checkstyle, PMD,

etc)● Test Percentage Coverage● Binary compatibility

Page 26: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Clirr performs comparisons between releases to detect

binary compatibility changes

Page 27: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Can fail the build upon errror (active) or generate reports

(passive)

Page 28: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Strategy for active checks

● Strategy– Fail the build upon violation– Add to exclude file when incompatibility wanted– Publish exclude file as part of release notes

● Warning: Currently missing fine-grained exclusions

Page 29: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Demo …

Page 30: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

What’s missing? What’s the future?

Page 31: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

Quality Dashboard

Page 32: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Copyright Vincent Massol 2006 – All rights reserved

● Commits per day, who’s doing commits?● Who’s working on tests?● Who’s answering mailing lists?● Who’s applying patches?● Who’s writing documentation, blogging about it,

etc?=> Ability to jauge activity on the projects

Project Health DashboardProject Activity Dashboard

Page 33: Copyright Vincent Massol 2006  All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006

Questions

Me