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

Option in the settings to alter the behaviour to report the keyword name #154

Closed
Anker101 opened this issue Jun 19, 2023 · 4 comments
Closed
Assignees
Labels
Agent Issue Affects the Agent enhancement New feature or request Manager Issue Affects the Manager
Milestone

Comments

@Anker101
Copy link

Hi
In report the name of keyword documentation appear , and not the name of the Keyword
For example in my test case i used those keywords :
1) Given the user sends get on endpoint "/api/v1/"
2) Given the user sends POST on endpoint "/api/v1/" and body "{"label":"Temperature"}"
The report will show documentation keywords :
1) Send GET request to the given endpoint. Use this keyword when no headers nor query parameters needed.
2) Send POST request to the given endpoint. Use this keyword when no headers needed. Enable to write directly the body parameter in the keyword title.

If possible to add an option in the settings to alter the behaviour to report the keyword name.
I think it would be better as a scenario wide setting, sowe can set the setting for the complete rfs

@Anker101 Anker101 added the enhancement New feature or request label Jun 19, 2023
@damies13
Copy link
Owner

Transcript from the discord chat, in case it helps someone else with the potential work around and for the background to this issue.


Anker01 — Today at 00:06


Also i have another question
In report the name of keyword documentation appear , and not the name of the Keyword
For example in my test case i used those keywords :
1) Given the user sends get on endpoint "/api/v1/"
2) Given the user sends POST on endpoint "/api/v1/" and body "{"label":"Temperature"}"
The report will show documentation keywords :
1) Send GET request to the given endpoint. Use this keyword when no headers nor query parameters needed.
2) Send POST request to the given endpoint. Use this keyword when no headers needed. Enable to write directly the body parameter in the keyword title.

is there any workaround to have the initial keyword in results , not documentation infos , because it is very confusing ? (edited)


damies13 — Today at 00:23


Yes there is sort of a work around, but only for custom keywords:
https://github.com/damies13/rfswarm/blob/master/Doc/Preparing_for_perf.md#keywords

I had actually thought about changing the behaviour at one stage to something similar to what you mentioned but it would have broken the ability to control the name the way it is now. Thinking about you example, I could probably add an option in the settings to alter the behaviour to report the keyword name.
Actually requests library was why I was thinking about it but when I investigated further I found requests library actually behaves differently to most other Robot framework libraries, so I kept the behaviour that works best for the majority of Robot framework libraries
If you want you can raise a feature request to add an option in the settings to alter the behaviour to report the keyword name. I guess if you do you can indicate if you think this would be better as a scenario wide setting or per script setting (I'm initially thinking it would be probably better as per script)

@damies13
Copy link
Owner

Note to self: Notes below for the changes need on the agent, this will need to be wrapped in an IF based on the setting in the manager gui, so this will need an RFS_ variable to pass the setting from the manager through the agent to the listener.


Anker01 — Today at 18:08


ok i was thiking to change : fd.append(" ResultName = attrs['doc']") to fd.append(" ResultName = name")
[18:08]
it will not temporarily do the job ? (edited)


damies13 — Today at 22:19


If you replace these 4 lines:
fd.append(" if self.msg is not None and 'message' in self.msg and not istrace:")
fd.append(" ResultName = self.msg['message']")
fd.append(" elif 'doc' in attrs and len(attrs['doc'])>0:")
fd.append(" ResultName = attrs['doc']")

With just
fd.append(" ResultName = name")

Yes that would do what you want and just report the keyword, after making that change make sure to delete RFSListener2.py as well to ensure it's recreated with the change

@damies13 damies13 added Manager Issue Affects the Manager Agent Issue Affects the Agent labels Aug 12, 2023
@damies13 damies13 added this to the v1.4.0 milestone Jul 20, 2024
damies13 added a commit that referenced this issue Jul 21, 2024
damies13 added a commit that referenced this issue Jul 21, 2024
@damies13 damies13 self-assigned this Jul 21, 2024
damies13 added a commit that referenced this issue Jul 21, 2024
Some should fail
damies13 added a commit that referenced this issue Jul 21, 2024
damies13 added a commit that referenced this issue Aug 6, 2024
damies13 added a commit that referenced this issue Aug 6, 2024
damies13 added a commit that referenced this issue Aug 6, 2024
damies13 added a commit that referenced this issue Aug 6, 2024
damies13 added a commit that referenced this issue Aug 6, 2024
damies13 added a commit that referenced this issue Aug 6, 2024
damies13 added a commit that referenced this issue Aug 6, 2024
damies13 added a commit that referenced this issue Aug 7, 2024
damies13 added a commit that referenced this issue Aug 7, 2024
damies13 added a commit that referenced this issue Aug 7, 2024
damies13 added a commit that referenced this issue Aug 8, 2024
damies13 added a commit that referenced this issue Aug 8, 2024
damies13 added a commit that referenced this issue Aug 9, 2024
damies13 added a commit that referenced this issue Aug 10, 2024
I tuned the reading of the csv file and also copied the agent dir to the test folder in each tests to try and catch the cause of the intermittent failure and then couldn't get it to happen again
Issue #154
damies13 added a commit that referenced this issue Aug 11, 2024
path issue for windows in CSV to List
Run scenario a little longer for Ubuntu (I think it was going to stopping before the 1st robot ran?
Issue #154
@damies13
Copy link
Owner

Work in progress

image image
Scenario Settings Test Row Settings

damies13 added a commit that referenced this issue Aug 13, 2024
- windows and ubuntu iamges done
- still waiting on macos images
Issue #154
damies13 added a commit that referenced this issue Aug 13, 2024
and remove bug in Select Option
Issue #154
damies13 added a commit that referenced this issue Aug 14, 2024
damies13 added a commit that referenced this issue Aug 15, 2024
damies13 added a commit that referenced this issue Aug 16, 2024
damies13 added a commit that referenced this issue Aug 16, 2024
@damies13
Copy link
Owner

Merged into v1.4.0 branch

@damies13 damies13 added bug Something isn't working and removed bug Something isn't working labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agent Issue Affects the Agent enhancement New feature or request Manager Issue Affects the Manager
Projects
None yet
Development

No branches or pull requests

2 participants