Category Archives: JUnit

Analyze your Unit test coverage with Cobertura…

Writing Unit test cases is now mandatory for every developers in the Companies. But at the same time it is very important that we need to analyze the Unit test coverage that is done by that developer. Just writing some test cases will not make sense. Here comes the job of Cobertura.

Cobertura is an open source tool used to analyze the Coverage of Unit tests. It will give Percentage values for the Line coverage as well as Branch coverage.

Some features  are listed below.

  • Can be executed from ant or from the command line.
  • In maven case we have Corbertura Maven plugins.
  • Instruments Java bytecode after it has been compiled.
  • Can generate reports in HTML or XML.
  • Shows the percentage of lines and branches covered for each class, each package, and for the overall project.
  • Shows the McCabe cyclomatic code complexity of each class, and the average cyclomatic code complexity for each package, and for the overall product.
  • Can sort HTML results by class name, percent of lines covered, percent of branches covered, etc. And can sort in ascending or decending order.




Test your Spring – Hibernate Applications using Unitils

Unitils is an open source library aimed at making unit testing easy and maintainable. Unitils builds further on existing libraries like DBUnit and EasyMock and integrates with JUnit and TestNG. This article will help you to test Spring- hibernate applications easily using unitles.

Technorati: spring, hibernate, unitils

Some new releases…

Spring 2.0.1 : This is the first maintenance release for Spring 2.0, including fixes for most bugs that have been reported since 2.0 final as well as many minor enhancements. This release also introduces OpenJPA support and GlassFish weaving support.

JUnit 4.2 : JUnit is a regression testing framework used for implementing unit tests in Java. Its new version JUnit 4.2 have released . This is a bug fix release. JUnit 4 takes advantage of Java 5 features like annotations, varargs, and generics to simplify unit testing still further.

JOOConverter 2.1.0: This is an Open Source Java/OpenOffice Document Converter, ie a tool to perform conversions between different office document formats. Its 2.1.0 version is released.

Technorati tags: Spring Framework, JUnit, JooConverter