Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attribute from framework #53

Open
prince-inbaraj-sky opened this issue Jan 30, 2025 · 0 comments
Open

Add attribute from framework #53

prince-inbaraj-sky opened this issue Jan 30, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@prince-inbaraj-sky
Copy link

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));

@prince-inbaraj-sky prince-inbaraj-sky added the enhancement New feature or request label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant