Customizing Templates

NOTE: This page contains information on standalone ReadyAPI that has been replaced with ReadyAPI.
To try enhanced reporting functionality, feel free to download a ReadyAPI trial from our website.

ReadyAPI allows for a high degree of report customization. You can create as many report and subreport templates as you would like. These can contain data exposed by the internal DataSets and from any external source (databases etc...) - just like any JasperReport. Let's look at how you can create a simple custom report at the project level and how you can use the different customization mechanisms available.

1. Creating Custom Templates








Better! But we're not entirely happy with this, are we...

  1. We'll start by adding a totally new report at the project level; press the Add Report Template button in the Available Reports toolbar:
  2. Set the name to "Properties" and the type to COMMON (meaning it will be available at all levels). Pressing OK gives us:
  3. Here we can select which subreports we want to have automatically included in the report. Select the PropertiesReport subreport and press OK. The generated template can be seen in the editor:
  4. If we now go to the Project Overview tab and add a property:
  5. Press the Create Report button in the toolbar:
  6. Selecting our newly created Properties and clicking OK gives us the following report:
  7. Oops! The string "null-properties" isn't exactly what we want here. Let's have a look at the Properties SubReport that adds this, a bit down in the template we can see the following:


  8. It seems the Type is passed as a parameter to the report. Let's just add a hard-coded value for this:
  9. If we now recreate the report we get:

2. Adding Parameters



generating the report now gives us:




  1. Let's add a parameter for setting the report title (instead of the "Sample Project"). Back to the template and add:
  2. Now add the parameter to the Parameters tab with a default value:
  3. Great! This parameter can be overridden at any level in ReadyAPI, and since this is a Common report we can generate it wherever we want, for example; for a TestCase we can set the ReportTitle (here with property-expansion thrown in!):
  4. And generating a new report gives us...
  5. oops... the parameter didn't fit... hmm... now what? Either change the formatting in the template or read on:

3. Configuration Properties




Read the Configuration Parameter Reference to see all available types and options for these parameters.

  1. Another way to customize the contents of a report is by adding configuration properties which will be prompted in the UI when creating the report. Back to the template again and now add the following:
  2. This creates an "interactive" configuration parameter which will be shown in the UI when creating the report:
  3. Make sure that you remove the ReportTitle parameter we created in the previous section. It will otherwise override this one. The created report will be: