Testing Blog Sponsored By     AgileLoad techexcel



Top Unit Testing Tools For Java


Written by  Shreya Jain | 07 August 2011
E-mail PDF

Unit testing is an approach which tests individual units of source code and verifies if it is fit for purpose. A unit is the smallest testable part of an application. Unit testing allows the programmer to modify and maintain existing code and still ensure sure that the module works correctly and meets the expected functional and nonfunctional requirements. It also helps to reduce the uncertainty in the units themselves and is particularly useful in a bottom-up testing style approach.

Below is the list of unit testing tools for java:

 

JUnit

Visit Website
JUnit is a simple, open source framework to write and run repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit features include assertions for testing expected results, test fixtures for sharing common test data, test runners for running tests etc.

Cactus
Visit Website

Cactus is a simple test framework for unit testing server-side java code from the Jakarta project. The intent of cactus is to lower the cost of writing tests for server-side code. It uses JUnit and extends it. Cactus implements an in-container strategy, meaning that tests are executed inside the container. It provides a reasonable middle ground in terms of test granularity, helps write better code and do code refactoring, supports internationalization, provides a JUnit test setup etc.

TestNG 
Visit Website
TestNG is a testing framework with functionalities that make it powerful and easy to use. Its provides features such as a flexible test configuration, support for data-driven testing, support for multiple instances of the same test class, support for parameters, distribution of tests on slave machines, powerful execution model, embedded beanshell for further flexibility, default JDK functions for runtime and logging, dependent methods for application server testing etc.
Jtest
Visit Website
Jtest is an automated java testing and static code analysis product that is made by Parasoft. It aims to improve java code reliability, functionality, security, performance, and maintainability. DBasic functionality includes unit test-case generation, static analysis, regression testing, runtime error detection, and code review. Its provides features such as automatic correction of over 50 (and more) coding standard violations, new Jtest configuration, generation of an HTML file that lists all enabled rules and links, ability for users to customize the maximum number of errors reported per rule, quick fix forcing the error into view before displaying the list of repair options etc.
MockIto 
Visit Website

Mockito is a mocking framework that tastes really good. It lets the coder write beautiful tests with a clean & simple API. Mockito does not give the user a hangover because the tests are very readable and they produce clean verification error. It allows flexible verification in order, supports exact-number-of-times and at-least-once verification, flexible verification or stubbing using argument matchers, allows creating custom argument matchers or using existing hamcrest matchers etc.

JBehave
Visit Website
JBehave is a framework for Behaviour-Driven Development (BDD). BDD is the result of evolution of test-driven development (TDD) and acceptance-test driven design and is intended to make these practices more accessible and intuitive to newcomers and experts alike. It allows users to specify and run text-based user stories, concurrent execution of user stories, specifying the number of concurrent threads, annotation-based configuration and steps class specifications, localisation of user stories, multi-language support etc.
Concutest
Visit Website
Concutest is a collection of tools designed to make the development and testing of concurrent java programs easier and reliable. Its features are high usability, web browser user interface, drag & drop techniques, intuitive web site editing, comfortable system configuration through the central system settings, online help and user's manual, status information, search of tasks, deadline notification, inter dependencies between tasks, categorization of tasks, creation of resources for categories etc.
Apica

Visit Website
Sonar is an open source quality management platform for Java, dedicated to continuously analyze and measure source code quality from the project portfolio to the class method. Sonar leverages existing best of breed tools like checkstyle, PMD, findbugs, clover, cobertura and transparently orchestrates all those tools.
 
Unitils
Visit Website

Unitils is an open source library aimed at making unit testing easy and maintainable. It builds further on existing libraries like DBUnit and EasyMock and integrates with JUnit and TestNG. Its features are mock objects support, persistence layer testing support, easyMock integration support, spring integration etc.

 

sprystone
Visit Website

SpryTest is an automated unit testing solution for java. It enables developers to test java methods for business logic, validations, exceptions and much more. Its features are easy adoption, test automation, coverage analysis, continuous integration support, recommended system configuration etc.

JMock

Visit Website

JMock is a library that supports the test-driven development of java code with mock objects. Mock objects help the coder design and test the interactions between the objects in your programs.

JDave
Visit Website
JDave is a framework which provides an easy way to specify the behaviour of your classes. It is very easy to learn, and the specifications that are written through it are very complete and expressive.

 


RSS  Subscribe To Our Feeds       Stumble upon  Subscribe By Email


Shreya Jain

Shreya Jain

Shreya is an aspiring student and comes with an interest in Jouranlism on Software Tools and Technologies. She writes for us on a regular basis within our Testing blog and Tools lists. 

blog comments powered by Disqus