Sonar Code Quality Testing Essentials
Sonar is an open source platform used by development teams to manage source code quality. Sonar has been developed with this main objective in mind: make code quality management accessible to everyone with minimal effort. As such, Sonar provides code analyzers, reporting tools, manual reviews, defect-hunting modules, and TimeMachine as core functionalities. It also comes with a plugin mechanism enabling the community to extend the functionality, making Sonar the one-stop-shop for source code quality by addressing not only the developer’s requirements, but also the manager’s needs.
The “Sonar Code Quality Testing Essentials” book will help you understand the different factors that define code quality and how to improve your own or your team’s code using Sonar.
You will learn to use Sonar effectively and explore the quality of your source code in the following axes:
- Coding Standards
- Documentation and Comments
- Potential Bugs and Defects
- Unit Testing Coverage
- Design and Complexity
Through practical examples, you will customize Sonar components and widgets to identify areas where your source code is lacking. The book goes down to proposing good practices and common solutions that you can put to use to improve such code.
You will start with installing and setting up a Sonar server and performing your first project analysis. Then you will go through the process of creating a custom and balanced quality profile exploring all Sonar components through practical examples. After reading the book, you will be able to analyze any project using Sonar and know how to read and evaluate quality metrics.
Hunting potential bugs and eliminating complexity are the hottest topics regarding code quality. The book will guide you through the process of finding such problematic areas, leveraging and customizing the most appropriate components. Knowing the best tool for each task is essential.
While you improve code and design through the book, you will notice that metrics go high and alerts turn green. You will use the Time Machine and the Timeline to examine how your changes affected the quality.
“Sonar Code Quality Testing Essentials” will enable you to perform custom quality analysis on any Java project and quickly gain insight on even large code bases, as well as provide possible solutions to code defects and complexity matters.
What you will learn from this book
- Understand the different perspectives of quality in software projects
- Manage code quality and get historical visual feedback directly from your browser with Sonar
- Drill down your code and easily hunt for potential bugs and defects using Sonar components
- Take full advantage of custom quality profiles to refine your documentation and apply coding standards
- Locate duplicate and useless code and assess testing coverage across your projects
- Analyze design and understand code complexity using Sonar and advanced metrics
- Learn to configure dashboards and maintain the Sonar platform to match different needs
- Integrate Sonar with a build server according to the continuous inspection paradigm
This is a step-by-step tutorial enriched with practical examples and the necessary screenshots for easy and quick learning.
Who this book is for
This book is for you if you are a Java developer or a Team Manager familiar with Java and want to ensure the quality of your code using Sonar.
You should have a background with Java and unit testing in general.
- Paperback: 318 pages
- Publisher: Packt Publishing (August 2012)
- Language: English
- ISBN-10: 184951786X
- ISBN-13: 978-1849517867