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
- Define a custom attribute.
- 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
- Write down the name and type of the attribute. For example,
create a test case attribute called Stakeholder Contact.
- Run the data collection jobs.
- Launch the Rational Reporting
for Development Intelligence tools.
- 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:
- Select the check box beside the report.
- Click the Copy button on the
toolbar.
- 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.
- In the Actions column for the report, click the Open
with Report Studio icon.
- 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.
- 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.
- In the Name field of the Properties
- Data Item view, rename the dragged Value attribute to reflect the
custom attribute name.
- 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.
- 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:
- Click the ... button in the Expression
field to open the Data Item Expression window.
- 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 ('')
- Click OK.
- If your query is used in joins, ensure that you drag your
new attributes into those joins and all of its parents as well.
- Drag the new attribute from your modified query into your
report.
- Run the report to verify the custom attribute values.