Reader small image

You're reading from  Mastering Unit Testing Using Mockito and JUnit

Product typeBook
Published inJul 2014
Publisher
ISBN-139781783982509
Edition1st Edition
Tools
Right arrow
Author (1)
Sujoy Acharya
Sujoy Acharya
author image
Sujoy Acharya

Sujoy Acharya works as a Principal Engineer with Cerner. While growing up, he pursued his interests in the fields of computer science and engineering. His hobbies are watching movies and sitcoms, playing outdoor sports, and reading books. Sujoy likes to research upcoming technologies. His major contributions are in the fields of TDD, building scalable applications, cloud services, and the Spring Framework. He has authored four books for Packt, namely, Test-Driven Development with Mockito, Mastering Unit Testing using Mockito and JUnit, Mockito Essentials, and Mockito for Spring.
Read more about Sujoy Acharya

Right arrow

Working with the PMD plugin


PMD can find duplicate code, dead code, empty if/while statements, empty try/catch blocks, complicated expressions, cyclomatic complexity, and so on.

The following is the update site URL for Eclipse: http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/. You can also install it through Eclipse Marketplace.

After installation, right-click on the CodeQualityChapter06 project and select the Toggle PMD Nature menu item. It will enable the project for PMD analysis. The following screenshot demonstrates the PMD pop-up menu options:

PMD shows the errors in the Problems tab. The following screenshot shows the PMD violations in the Problems tab:

The next section will describe the SonarQube dashboard and analyze projects using the SonarQube runner, Ant, Gradle, and Maven.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Unit Testing Using Mockito and JUnit
Published in: Jul 2014Publisher: ISBN-13: 9781783982509

Author (1)

author image
Sujoy Acharya

Sujoy Acharya works as a Principal Engineer with Cerner. While growing up, he pursued his interests in the fields of computer science and engineering. His hobbies are watching movies and sitcoms, playing outdoor sports, and reading books. Sujoy likes to research upcoming technologies. His major contributions are in the fields of TDD, building scalable applications, cloud services, and the Spring Framework. He has authored four books for Packt, namely, Test-Driven Development with Mockito, Mastering Unit Testing using Mockito and JUnit, Mockito Essentials, and Mockito for Spring.
Read more about Sujoy Acharya