BIRT reporting

Results reporting is one of the key stages in the testing phase where the interested project participants or the stakeholders are presented with information on the test progress. Although many of the test automation tools have inbuilt reporting capability, the information may either be too low-level or technical, or it may not be fully relevant for management. As part of test process improvement, I’m working on a requirement to present the test results in an efficient way, so the management can visualise the current status of testing or the overall status for a test cycle, and make decisions accordingly.

Although many custom tools in the market will integrate with most of the test automation tools to create customised reports, an open-source tool is an obvious choice to begin with. For our requirement, a business intelligence and reporting tool (BIRT) is the best fit as it is an open-source Eclipse product, it doesn’t need advanced web application development skills and anyone with HTML, JavaScript or Java knowledge can build the reports and deploy them to an application server to be able to access the data via a browser. With BIRT, you can create a variety of reports such as lists (with relevant data grouped), documents, charts and so on.

BIRT architecture has two main components – report designer and a runtime component. The latter facilitates the design’s deployment on to an application server such as Apache Tomcat. An additional chart engine component exists for integrating charts into the application (I haven’t still explored this feature yet). For proof of concept, I have downloaded Eclipse Mars 4.5 that comes with BIRT designer. If you have already installed Eclipse, you can download the BIRT plugin. Depending on your data visualization needs, you can either design a report with the sample templates or start with a blank page and add items from the palette in the designer via drag and drop. Also, you can create a library for reusable custom templates.

In a nutshell, there are three main design steps. First, create a data source for report. I have to connect to an Oracle database (which is where our automation test tool publishes the results) although BIRT supports multiple data sources such as web service, an xml file, a flat file or even another application that can provide you with relevant information. Second, create a data set such as a query to get the required information from the data source. Third, create the page design to present the information in an efficient way. You can also create HTML links to navigate between multiple reports or add filter/sort criteria on the data to be viewed. I have created a web page that will present a form to the user (containing list boxes and a calendar widget to select the dates) to help them to select certain criteria based on what information will be gathered or grouped in the background. The best part of the tool is the support for JavaScript /Java. You can customise the page, for example by adding event handlers on the user operations or add any validations or calculations to be performed, before presenting it. Eclipse enables you to preview the report using an HTML browser.

There are different packages available to download BIRT runtime. I chose to download the BIRT sample viewer WAR file from the BIRT site and deploy it on the Tomcat server. The sample viewer adds web-based viewing capability for BIRT designs, which means it takes care of basic functionality such as a table of contents, pagination, exporting the results to PDF and so on. If you wish to enhance the existing viewer, you can download a suitable runtime package. Since I’m working on a very basic requirement, I have added sample viewer to my Tomcat server and copied my report design to the Tomcat’s webapps directory. Once the Tomcat server is restarted, the report can be accessed via a browser. These are a few initial basic steps, and many features of the product can be leveraged based on the requirement.

BIRT reporting can be very useful, especially in continuous integration scenarios such as when multiple regression test packs have to be run before releasing the software to next level. It enables the management team to make informed decisions quickly based on the current test status. However, BIRT is not just limited to reporting, it can also be utilised across various SDLC phases where data visualisation is vital.

The following two tabs change content below.

Sailaja Kotamraju

Sailaja works as an Integration Consultant on the test side at Sandhata. With close to 10 years of experience covering Business Analysis, development and test on multiple integration platforms. She is currently working as a Test Lead on a Payments re-engineering projects covering both IBM and Tibco technologies using IBM Green Hat. Sailaja has recently passed her ISTQB Test manager exam and brings a wealth of experience to any project as she understands all roles across the SDLC and also has in depth banking experience both on the Investment and retail side.

Latest posts by Sailaja Kotamraju (see all)