Open Source Testing Tools for Java Applications


Overview

Open Source testing tools are being used aggressively and there are many tools over the web for Java Applications. These tools are great asset to the development teams and provides many features / services over the quality of applications under development. We can use this as the starting point and focus more efforts on the uncovered areas for better quality.

It’s very important to know the context of development and the right tools for quick benefits. However, heavy usages of these tools lead to misleading data and metrics too. So think twice on what is required for the project and which tools might provide the required data / services.

Services Offered

The following services / features are offered from most of the open source tools

  • Continuous Integration for the builds
  • Unit Testing
  • Code Coverage
  • Source Code Metrics (like size, Complexity, design, dependency)
  • Static Analysis for various bug patterns
  • Test Automation
  • Performance Testing

List of Open Source Tools

Quick Benefits from Static Analysis

It’s very easy to integrate static analysis tool(s) with builds and there quick benefits. The following issues can be uncovered

  • Null Pointer Exceptions
  • Other un handled exceptions
  • Infinite Loops
  • Dead code
  • Compliance with Java Coding standards
  • Code Coverage data
  • Trends  / history on the above checks against previous builds
  • Validations against Java coding guidelines from Sun

The following Metrics can be captured

  • Source Code Metrics
  • Coverage Metrics
  • Dependencies with the Design
  • Code complexity metrics

The Resources listed below helps in implementing the same.

CRAP4J for Java Code Quality


I have been talking about Code Quality through Static Analysis for a while here, here & here. The quality for any application development must begin from it’s gross roots and the Application Code is one of it’s starting point to begin with.Static Analysis techniques help us to identify some metrics over the application code base

  • Cyclomatic Complexity
  • Application Design & Dependency Metrics
  • Exception Handling
  • Infinite Loops
  • Dead Code
  • Performance Issues
  • Programming Language guidelines & best practices in their context

The above information will be useful and it’s easy to get the same via Test Framework with a single click.

Code Coverage along with a bunch of unit tests is one widely used technique to help regression testing for the dev & test teams.

Now it’s good to see that Agitar combines Code Coverage & Cyclomatic Complexity to derive risk metrics for Java Code Base. They call it as a code Change Risk Analyzer and Predictor (i.e. CRAP) for Java.

Though it’s a prototype and see how the industry receives the same, i see it as a good initiative on the code quality front and might be a metric going forward for white box testing.

Some useful links for CRAP4J

Update on Oct 23rd

Now we have a dedicated site for CRAP4J. This contains latest news, forum discussions and many more. I would say that this a good resource for Code Quality lovers & the good news is that they are designed to be open source tools.

Crap4j is a Java implementation of the CRAP (Change Risk Analysis and Predictions) software metric – a mildly offensive metric name to help protect you from truly offensive code.

The CRAP metric combines cyclomatic complexity and code coverage from automated tests (e.g. JUnit tests) to help you identify code that might be particularly difficult to understand, test, or maintain – the kind of code that makes developers say: “This is crap!” or, if they are stuck maintaining it, “Oh, crap!”.

The best way to learn more about CRAP and Crap4j is to check the various articles, newsgroups and blogs about them.

(more…)

What Jar – Solution to NoClassDefFoundError


As a Tester & Developer, it’s pretty common to see NoClassDefFoundError. It’s not that easy always to figureout the required jars for the application.

Whatjar comes with a lot of search capabilities to identify and download the required jars.

Whatjar is a high-performance, search engine written using Java and MySQL to index and search Java JAR contents. Its primary goal is to provide a tool to help the developer find the JAR file required when faced with a class not found exception. In addtion to act as searchable resource of open source java jars.

Whatjar is free, there is no cost to upload a jar or to search our existing database of JARS.


Open Source Test Management Tools


 

In this post, i will share my views & findings with Open Source Test Management Tools. Usage of tools in the Test Management is becoming the basic need & It will be tough to manage the activities associated there with out any support from the tools.

 

The commercial tools in this segment are costly and may not fit into upcoming organizations budget. So i have been looking at Open Source Test Management tools. In the last week, I have evaluated some open source test management tools.

 

The following are my requirements for Test Management Tool

  1. Capture the Requirements

  2. Design Test Cases

  3. Map Test Cases with Requirements

  4. Link Bug reports with Test Case ID after the test execution

  5. Test Execution Reports

  6. Version Management for the Test Cases

  7. Search Feature

The following tools are evaluated after the initial screening.

The above tools work with Apache, MySQL & PHP. Both the tools looks promising and the Test Link has some additional benefits in-terms of better reports and linking with popular issue trackers.

 

Twitter Updates

Recent Trackbacks

Google Search