Fight your technical debt with Jenkins, Jacoco and Sonar

10,993 views

Published on

EclipseCon 2012 slides from Xavier Seignard ( http://twitter.com/xavier_seignard ) and Mickael Istria

http://www.eclipsecon.org/2012/sessions/get-ready-fight-your-technical-debt-tycho-sonar-and-jacoco

Published in: Technology, Economy & Finance
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
10,993
On SlideShare
0
From Embeds
0
Number of Embeds
5,084
Actions
Shares
0
Downloads
57
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Fight your technical debt with Jenkins, Jacoco and Sonar

  1. 1. Get ready to fightyour technical debt! Tycho, Sonar and Jacoco
  2. 2. Xavier Seignard Mickael Istriawww.podbox.com Jboss, by Redhat@xavier_seignard @mickaelistria
  3. 3. … StandardsThe goal: Code Coverage Complexity Code quality! Design Comments Duplications Tests ...
  4. 4. Why is it important? Maintain. Use. Rely. Understand. Test. Change. Learn. Adapt. Replace. And so on.
  5. 5. Problem?How to analyze it? With so many bundles
  6. 6. Tools are there, but...… reports are scattered checkstyle, pmd, findbugs, etc.
  7. 7. Solution?Unify and aggregate these reports Sonar! The last step towards code quality analysis
  8. 8. Hands-on!From a successful Tycho build
  9. 9. Hands-on!Put this build on Jenkins/Hudson
  10. 10. Achievement #1 unlocked!You have a reproducible build!
  11. 11. Hands-on! Install Sonar plugin on Jenkins/Hudon. Configure it.Put Sonar at work Configure your build.
  12. 12. Hands-on (ad)!Or use Dev@cloud from Cloudbees Pain free Jenkins and Sonar. No maintenance. Ready to use. And more!
  13. 13. Achievement #2 unlocked!Your tech debt is under control!
  14. 14. The missing pieceCode coverage Is that part of code tested or not?
  15. 15. So what?On the fly instrumentation Jacoco! The beloved jacoco agent
  16. 16. Jacoco?As easy as setting an arg to the JVM -Djavaagent=jacoco.jar=[option1=value1[,optionN=valueN]*]Maven pluginSets ${tycho.testArgLine} to -Djavaagent=jacoco.jar...Pro tip: Use <appArgLine> to set other JVM args in Tycho Surefire plugin.
  17. 17. Hands-on...... top level pom
  18. 18. Achievement #3 unlocked!Youre ready to fight your tech debt!
  19. 19. ThanksTo Nicolas De loof (@ndeloof) and Cloudbees for providing us a st1 class Dev@cloud instance for this demo.
  20. 20. Resources- The base project we used: http://www.eclipse.org/recommenders/- Jenkins: https://eclipsecon2012.ci.cloudbees.com/- Sonar: https://eclipsecon2012.sonar.cloudbees.com/- The maven profile: https://gist.github.com/2212435Some bugs you should follow- Sonar@eclipse.org: http://bugs.eclipse.org/360935- Jacoco@jenkins: https://issues.jenkins-ci.org/browse/JENKINS-10835
  21. 21. Questions? Dont forget to give your feedback:http://www.eclipsecon.org/2012/sessions/get-ready-fight-your-technical-debt-tycho-sonar-and-jacoco

×