Saturday, December 29, 2007

Table Display Using DisplayTags & AjaxTags

The display tag library is an open source suite of custom tags that provide high-level web presentation patterns which will work in an MVC model.

Display tag can be downlaoded from

Actually the display tag library can just... display tables! Give it a list of objects and it will handle column display, sorting, paging, cropping, grouping, exporting, smart linking and decoration of a table in a customizable XHTML style

Exporting includes CSV,PDF,XML,Excel formats.

Pagination and sorting can be easily achieved.Sorting can be done per page or on the entire list based on the option given.Different css can be used for styling.

Table contents can be given as links by href options.Also dynamic links can be provided.Decorators can be used to display the contents of the table in desired formats.Decorators can be applied to tabel as a whole or per column basis.

The object to be displayed can be a Collection, an Enumeration, a Map (values are displayed in row), a Dictionary (values are displayed in row), an array, an Iterator, any Object with an iterator method.

The AJAX JSP Tag Library is a set of JSP tags that simplify the use of Asynchronous JavaScript and XML (AJAX) technology in JavaServer Pages.

It is a wrapper over display tag which allows only the part of the screen to be refreshed without the entire page being sent back to the server.Configeration is simple and all features of the display tag can be used.

Ajax Tags can be downloaded from

WorkFlow Using Enhydra Shark & Jawe

This Framework helps to maintain the workflow of an application seperate from its core implementation.The Enhydra Shark project delivers a workflow server It is an extendable and embeddable Java Open Source workflow engine framework including a standard implementation completely based on WfMC specifications using XPDL

Enhydra Shark and Jawe can be dowloadded from

This way Enhydra Shark can be used as a simple "Java library" in servlet or swing applications or running in a J2EE container supporting a session beans API, Corba ORB or accessed as a web service.The backend of the FameWork is a the databaase which allows to store each and evry state of the workflow and API s are provided which helps to acess and modify these values.

Along with this Jawe Editor is also available which allows to create workflows using Graphical user interface, most of them drag and drop features.The workflow created using the Editor is a xpdl(Xml Process Definitiomn Language) , which can be loaded and instanstiated using the given APIs , which stores each and every state of the workflow process.Seperate ToolAgents are also available which helps to connect external modules with the workflow.

Sample ToolAgents are available for many different common tasks in automated workflows.Storage of process and activity instances is done via a configurable persistence API.

In combination with WorkFlow Editor, the graphical XPDL workflow editor, this prject delivers a complete embeddable or standalone workflow solution.The default instance persistence API implementation uses Enhydra DODS for relational/object mapping, which allows it to be easily used across diffrent DataBases.Available ToolAgents include scheduler tool agent ,mail tool agent,BeanShell tool agent,JavaScript tool agent and Runtime application tool agent.

Enhydra Shark can be used as a simple java object(POJO), Web Service,Swing Client,Cobra ORB or running in a J2EE container supporting a session beans API.

Friday, December 28, 2007

Continous Integration With CruiseControl

Continuous integration is a hot topic in the software development world. Although often linked with Agile processes, such as eXtreme programming, the concept and practices are nothing new -- just a variation on well-known software development best practices. It includes a cycle of checking out the latest code from repository, build , deployment and testing.

CruiseControl is a framework for a continuous build process. It includes, but is not limited to, plugins for email notification, Ant, and various source control tools. A web interface is provided to view the details of the current and previous builds.

It has provisions for
Checking out for modifications in the code Repository (SVN or CVS)

Interval based bulding( Eg : per hour basis or day basis in a week )

Conditional building based on modifications in Repoistory

The home grown build and deployment tools(processes) can be called from it which gets executed

Corresponding unit test cases & covearge frameworks can be executed .

Results can be intimated through messenger or emails.

JMX controls are provided which help in controling the entire process through the Webpage.

Dashboard is provided which gives detailed information about builds success, failure details , point of failure, time taken , latest modifications in repository from last successful build, unit test results , coding standars followed etc.

Although the process for Building and Deployment of the product depends on the individual , Cruisecontrol helps to integrate all these under one platform .

The product is available under the free licence and can be dowloaded from the following URL

It has Plugins for several of the following Additonal Frameworks.When Pluggins are not provided the results can be displayed from a link provided in the CI home page.(As Jettty WebServer is emmbedded woth cuisecontrol )

PMD : - (Coding Standard Framework)

Emma: -( Java Unit Test Coverage FrameWork)

Clover : -(Alternative to PMD)

Junit : - (Java Unit Testing Framework)

Utplsql : (PlSql Unit Testing Framework)

Jutex : - (PlSql Unit Test Coverage Framework)

Code Collaborator : (Code Review Tool)

Friday, November 30, 2007

Automated Functional Testing using Watij

Watij is framework providing API's which help in automating functional tests of Web Applications. It supports only Internet explorer in Windows platform.

It can be downloaded at

Its simplicity makes it the first choice for simple web application functionality test automation.It also comes with a bean shell integrated which can execute the tests directly. For this to work replace the provided jniwrap.dll file in the windows installation directory.

Other frameworks line Sahi or Selenium also could be used for automated functional testing of web frameworks . More professional framework includes
Rational Robo – supporting visual basic like scripts
Rational Functional Tester(also supports scripting in java )

Both rational products are owned by IBM.

For simpler(non-professional) format, watij would be more useful because of its simplicity.Small load testing like hundred windows to be opened pointing at a particular URL,web applicationed being opened a few consecutive times could be easily achieved.

Since one cantnot purchase or spend much on these small activities Watij would server the purpose.A simple java code, as the following would open a Internet Explorer window and type the search string followed by a enter key hit.

IE ie = new IE();
ie.button("Google Search").click();

Also other supporting functionalities are provided on the IE object which could be easily used for simple applications.

Thursday, November 29, 2007

Junit,Emma & PMD with CruiseControl

Junit is a framework for java test cases .

The test cases have setup s teardown sections for initialization .Junit s can be executed using ant target junit fork .Individual classes can be executed or batch processing can be done.

Emma is open source code coverage generator.

Emma will instrument the jar , which are refereed by junit test cases for execution .

Instrumentation can be done by

java -cp emma.jar emma instr -m overwrite –cp abc.jar

This will produce a coverage file coverage.em(Also the size of the instrumented abc.jar will increase)

Exclude rmi classes(Stub and skeleton) by using –ix option while instrumenting the classes or jars.

Later the junit cases can be run with junit fork ant utility, pointing to the instrumented jar.

This will generate coverage information in the form of

Next reports can be generated using the coverage information obtained.

Java -cp emma.jar emma report -sp ${sourcecode} -r html -in coverage.em,"

Providing the {sourcecode} location will get the code in the result, which can be html , xml etc .

Coverage will be provided for any functionality which refers to the instrumented jar.

PMD is a framework for maintaining the coding standards in java files.

On proving the ruleset file(one which has the customised coding standards), the follwing command will generate the coding standards violations existing in the source code in the required format.

Cruisecontrol has pluggins for junit test cases and PMD execution .

In the configuration file , under the section is provided . On giving the xml logs obtained from the junit amd pmd executions ,gives a collaborated report for build and junit execution of the product code.

Wednesday, November 28, 2007

Utplsql ,Jutex(with resolved bug) and Ounit with CruiseControl

Utplsql,Ounit and Jutex are open source projects which can be configured easily for execution of utplsql test cases , and coverage of those tests in the junit report format along with cruisecontrol for continuous integration.

Utplsql is the frame work for execution of Plsql unit test cases.

Ounit is the user interface , enabling better representation of the unit tests cases run .(It uses utplsql for execution of test cases).

Note : Give sufficient privileges for creation of ut modules during installations . Also give execute privilege on dbms_pipe to the schema in which the tests execute.

Jutex is another source forge project which , uses

Jutex to install unit test cases

Utplsql to run the test cases

Dbms Profiler to get the coverage data

Sqlplus to connect to the database

JunitReport package for presentation of these results in the junit report format

Jutex provides a xml , with targets for each of these to be done

(it has a bug – coverage results are not shown for ut modules which are procedures or functions , but works fine with packages )

Solution : change the script install_jutex.sql in the jutex/Code/ folder .

UT_PACKAGE_SRC_PROFILING_V à add in the where clause
unit_type = 'PACKAGE BODY' or unit_type = 'PROCEDURE' or unit_type = 'FUNCTION')

make similar changes in


UT_PACKAGE_SRC_PROFILING_V to include procedure and function.
This is because the coverage results are filled in the dbms_profiler table , but not picked up during the xml creation for report generation .

The above change should give the detailed coverage for the executed test results.

Free Domain Names @!