Skip to main content

Launches/test items attributes

For more convenient and effective use of our test report dashboard, we recommend paying attention to attributes.

Attributes are specific data points that can be included at all levels in ReportPortal:

Launch

Suite

Test

Step

The purposes of attributes are:

  1. Attributes allow you to categorize, group, or classify tests, making them easier to manage in the future.
  2. Attributes are used for filtering.
  3. You can create a filter based on the attribute and then build widgets using this filter.

Parameters of attributes

  • Format – Key : Value
  • Key – any string value, optional field
  • Value – any string value, mandatory field
  • The maximum limit is 512 symbols each for both key and value.
note

The key and value are separated by a colon, but the colon cannot be part of the key or value.

Multiple values can be associated with a single key. For example, if we have a jira_id key, the value can differ based on the Jira ticket.

Adding attributes

Attributes can be added in the following ways:

  1. Via test reporting.

You can initiate (launch, suite, test, or step) with one set of attributes and finish with a different set.

Importantly, the new attributes do not overwrite the old ones; instead, they are added.

  1. Via UI (manually).

To add or edit attributes, click on the pencil icon next to the desired launch/test item. Then click on the Add new link or click on the existing attribute to edit the key and value.

Best practices for using attributes

  1. Avoid having too many attributes on a single item.

When there are too many attributes, they can become unreadable.

Use attributes that will assist you in grouping tests, debugging them, or constructing widgets.

  1. The attribute name should be informative.

Avoid making the attribute name excessively long, even though the field allows up to 512 characters. The name should be understandable and clearly indicate what the attribute refers to.

For instance, in the example below, the attribute v5: beta5_24.1 could have been divided into two separate attributes: version and environment.

  1. Examples of categorizing tests using attributes.

Below you can find some examples of how attributes can describe launch/test item characteristics:

  • feature: Quality Gates
  • feature: login
  • feature: notifications
  • Epic: @F1_functionality
  • Story: @F11_functionality
  • Use case: @F11_use_case_111
  • browser: Chrome
  • configuration: Chrome desktop
  • team: Sirius
  • squad: 1
  • run.id: 12345
  • run.type: scheduled
  • entity.id: 56789
  • Region: Canada
  • test.type: UI
  • branch: develop
  • build: 3.24.16.17.5
  • priority: critical

Use Case: using attributes for filtering

Let's consider the following example. In the launch below, there are 31 Failed tests.

It is difficult to identify the most problematic area, so we can use filtering by attribute, for example, by different controller types.

As a result of the investigation, we found that the least number of failures occurred with tests using controller type contr_test_item (1), and the most failures occurred with tests using controller type contr_launch (12).

Thus, we understand that we need to focus on tests with controller type contr_launch.

Use Case: using attributes for creating widgets

Widgets allow you to visually track metrics for launches. We can define these metrics using filters that can be created based on attributes. For example, to determine the growth trend of summary statistics of launches with the same attribute key, let's construct a Cumulative trend chart widget.

There are some launches with the smoke attribute.

You can create a filter based on this attribute.

Afterwards, create a Cumulative trend chart widget using this filter.

On the screenshot below, we can observe a growth in statistics on the platforms from one build to the next.

Therefore, properly using attributes in ReportPortal can greatly optimize test management and assist in providing clearer visualizations of trends through widgets.

There are also system attributes that allow to extend the functionality of ReportPortal.