copyright vincent massol 2006 all rights reserved panorama of quality features in maven2 vincent...
DESCRIPTION
Copyright Vincent Massol 2006 – All rights reserved Active quality = before the factTRANSCRIPT
Copyright Vincent Massol 2006 – All rights reserved
Panorama of Quality Features in Maven2
Vincent Massol, 11 July 2006http://massol.net
Copyright Vincent Massol 2006 – All rights reserved
Active Quality vs Passive Quality
Copyright Vincent Massol 2006 – All rights reserved
Active quality = before the fact
Copyright Vincent Massol 2006 – All rights reserved
Passive quality = after the fact
Copyright Vincent Massol 2006 – All rights reserved
Both are required…… but moving to active is the
direction to take
Copyright Vincent Massol 2006 – All rights reserved
… and Maven can do both٭!
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
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
Copyright Vincent Massol 2006 – All rights reserved
Common testing infrastructure for testing frameworks (JUnit,
TestNG, etc)
Copyright Vincent Massol 2006 – All rights reserved
New forking strategies: once, never, always
Copyright Vincent Massol 2006 – All rights reserved
New integration test phase and Cargo plugin for automating
J2EE application testing
Copyright Vincent Massol 2006 – All rights reserved
Strategy for active checks
● Strategy– Fail the build upon test failure
Copyright Vincent Massol 2006 – All rights reserved
Demo …
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
Copyright Vincent Massol 2006 – All rights reserved
Checkstyle, PMD, Findbugs can fail the build (active) or
generate a report (passive)
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
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
Copyright Vincent Massol 2006 – All rights reserved
Demo …
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
Copyright Vincent Massol 2006 – All rights reserved
Clover, Cobertura plugins can fail the build (active) or
generate reports (passive)
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
Copyright Vincent Massol 2006 – All rights reserved
… and aggregates reports at each parent POM level
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
Copyright Vincent Massol 2006 – All rights reserved
Demo …
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
Copyright Vincent Massol 2006 – All rights reserved
Clirr performs comparisons between releases to detect
binary compatibility changes
Copyright Vincent Massol 2006 – All rights reserved
Can fail the build upon errror (active) or generate reports
(passive)
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
Copyright Vincent Massol 2006 – All rights reserved
Demo …
Copyright Vincent Massol 2006 – All rights reserved
What’s missing? What’s the future?
Copyright Vincent Massol 2006 – All rights reserved
Quality Dashboard
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
Questions
Me