Explore the Testability aspect for Java Code


The Testability Explorer is an open source project that lets you measure the testability of Java code. This is an interesting idea: a metric not of direct quality, or of testing, or of test coverage, but of ease of testing. Presumably code that is easy to test will get tested, and will therefore be of higher quality, other things being equal.

The following information over Testability Explorer is useful

Trends in Static Analysis Tools and Code Quality Metrics


Interesting trends are happening around Static Analysis and Code Quality. The tools vendors closely looking at each of the code quality metrics and merging them to have a better metric. We can see the pattern from Agitar by coming up with CRAP4J. Here is one more vendor coming up with the tools on Code Quality and Static Analysis.

The AppPerfect comes with a suite of products around code quality metrics and improvements. DevTest4J is a suite of products designed to help you build and test high-performance applications during the development phase of the product life-cycle.

Trends in Static Analysis – ENERGY for better java code



I have come across yet another static analysis tool for Java programs. ENERGY is a free static analysis tool to measure code quality & presents overall status on the health of source code. Energy comes with a code quality metric by combining the bug patterns on the source code and rates it between 1 to 10.   The tool tries to identify the symptoms via static analysis and then publish a rating. How it works is an interesting insight.


Check the following video to learn more about the tool.

Video thumbnail. Click to play


Technorati Tags: , , ,

My quest towards Code Quality Metrics


 

The term quality might mean different things to different people based on their context of operation and it’s tough to have universal definition for the same.My experiments with software development started over a decade ago & exploring the ways the helps to build & deliver good quality code.The quest towards Code Quality Metrics started with the above objectives.

The discussion around Useful Code Quality Metrics at Linkedin started two months ago. I am excited over the response around the internet to this thread & there are some excellent articles around subject.

In the recent past Agitar comes up with CRAP4J as a code quality metric by combining Cyclomatic Complexity and Code Coverage.

In the process, we do use Static Analysis and Dynamic Analysis to derive the above mentioned metrics. Some more good articles around Code Quality are here

I wish that the info around Code Quality is helpful for my blog readers

Happy Testing…

(more…)

Applying Static Analysis for Software Testing


In this post, I will be sharing my views on Static Analysis and how the same is useful for Software Testing. Using Static Analysis in Testing will also be called or simulated as Static Testing.  Static analysis / testing a method to validate the software without executing the same.

The generic definition for Static Testing is that

Testing of an Application at the specification or implementation level without execution of that Application.

Static Analysis helps a lot for better Code Quality and we can perform the following set activities against the source code.

  1. Identify the bug patterns in the source code
  2. Capture Metrics
  3. Complexity of the System (eg. Cyclomatic Complexity)
  4. Compliance against Standards (eg. check for the Java Coding Guidelines)
  5. Exception Handling (Captures the code that contains Unhandled exceptions)
  6. Infinite Loops
  7. Copy Paste Dectors (Most of the developers used to reuse the code via a copy paste and introduce some issues in the process)
  8. Duplicate Code
  9. Dead Code

We should be able to restrict most of the above said issues at very early stage of SDLC by applying Static Testing techniques and make these part of the build process.

Twitter Updates

Recent Trackbacks

Google Search