Skip to content

Add attribute from framework #53

@prince-inbaraj-sky

Description

@prince-inbaraj-sky

Is your feature request related to a problem? Please describe.
I have a requirement to add attribute of assignee from test framework, so that I can filter the test cases based on assignee attribute.
I have checked the document it provides adding attribute only for javascript and .net - https://reportportal.io/docs/log-data-in-reportportal/HowToReportAttributesToReportPortal/#adding-attributes-via-test-framework-integration

Describe the solution you'd like
I expect something like this in java https://github.com/reportportal/examples-js/blob/main/example-playwright/tests/rp-features/attributes-and-description.spec.ts
ReportingApi.addAttributes([
{
key: 'browser',
value: browserName,
},
{
value: 'demo',
},
]);

Describe alternatives you've considered
tried below on trial and error basis but not helping
ListenerParameters result = new ListenerParameters();
Set attributes = new HashSet<>();
ItemAttributesRQ assignee = new ItemAttributesRQ("assignee", "tester");
attributes.add(assignee);
result.setAttributes(attributes);
ReportPortalClient client = mock(ReportPortalClient.class);
ExecutorService executorService = Executors.newSingleThreadExecutor();
TestScenarioReporter.RP.set(ReportPortal.create(client,result,executorService));

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions