Reporting on data with custom attributes

Custom attributes can be used to help group, sort, and filter your test artifacts. You can customize your reports in Rational® Reporting to include custom attributes.

Before you begin

  1. Define a custom attribute.
  2. Enter data for the custom attribute in your test artifacts. Custom attributes display in the Attributes section of the Summary in a test artifact.

About this task

This topic assumes that you are familiar with authoring reports in Report Studio.

Procedure

  1. Write down the name and type of the attribute. For example, create a test case attribute called Stakeholder Contact.
    Test case attribute
  2. Run the data collection jobs.
  3. Launch the Rational Reporting for Development Intelligence tools.
  4. In the Cognos® web application, copy the report that you want to add the custom attribute to, for example the quality management test case report:
    1. Select the check box beside the report.
    2. Click the Copy button on the toolbar.
    3. Go to the required location for the new report and click the Paste button on the toolbar. Ensure that you store the modified report in a different folder than the Sample Report Definitions folder.
  5. In the Actions column for the report, click the Open with Report Studio icon.
    Test case report
  6. Add custom attributes from the Operation Data Store folder to the queries for your report. For example, find the test case custom attributes in the Test Case Area subfolder. There are specific query subjects for each possible custom attribute datatype such as Test Case String Extension or Test Case Integer Extension.
    1. Add the Value attribute of the query subject which represents your custom attribute type (for example Test Case String Extension which is called Text (Small) in quality management) to a query in which you want to expose this data for your report.
      Value attribute
  7. In the Name field of the Properties - Data Item view, rename the dragged Value attribute to reflect the custom attribute name.
    Renaming attribute
  8. Drag the Name attribute of the same query subject from the Insertable Objects view to the Data Items view and rename it to Custom Attribute Name.
    Custom attribute Name
  9. Select the custom attribute (former Value attribute renamed to Stakeholder Contact in this example) and edit its expression to filter out all values if the Custom Attribute Name does not match (Stakeholder Contact). For example:
    1. Click the ... button in the Expression field to open the Data Item Expression window.
    2. In the Expression Definition text area enter an expression, for example:
      if ([Custom Attribute Name] = 'Stakeholder Contact')  THEN
        ([Business View].[Test Case String Extension].[Value])
      ELSE ('')
      editing an expression
    3. Click OK.
  10. If your query is used in joins, ensure that you drag your new attributes into those joins and all of its parents as well.
  11. Drag the new attribute from your modified query into your report.
    custom attribute in report
  12. Run the report to verify the custom attribute values.
    Report Output


Have a problem or a question? Post it in the Jazz.net forum.