You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When running multiple test case files, get_keyword_names is not called for all Remote Libraries #3249
Hi,
we have two test case files that basically look like this:
test1.robot
*** Settings ***
Suite Setup SuiteSetup
[...]
*** Test Cases ***
[...]
*** Keywords ***
SuiteSetup
AGENT.start test1.xml
Import Library Remote http://localhost:9999 WITH NAME LIB1
test2.robot
*** Settings ***
Suite Setup SuiteSetup
Library Agent WITH NAME AGENT
[...]
*** Test Cases ***
[...]
*** Keywords ***
SuiteSetup
AGENT.start test2.xml
Import Library Remote http://localhost:9999 WITH NAME LIB2
They both start an "Agent Library" which in turn is responsible for starting different Remote Libraries. The Remote Libraries are imported in test1.robot and test2.robot.
The available keywords of the Remote Libraries only seem to be fetched once per URL. So if test1.robot starts a different Remote Library on the same URL than test2.robot, most calls to the Remote Library in test2.robot will fail, because only the keyword names of the Remote Library of test1.robot are known.
Is this the desired behaviour? Is there any way to control this other than running different Remote Libraries on different ports?
changed the title [-]When running multiple test case files, get_keyword_names is not called for Remote Library all libraries[/-][+]When running multiple test case files, get_keyword_names is not called for all Remote Libraries[/+]on Jul 29, 2019
This is most likely caused by imported libraries being cached. If a library is imported again with same exact arguments, its got from the cache and not re-imported. I makes some sense with normal libraries but doesn't work at all in cases like this. There are also other problems caused by caching and we have issue #2106 about not doing it.
To validate my expectation, you could try changing the URL in the second example slightly. For example, 127.0.0.1 or perhaps even localHOST instead of localhost could work. If I'm right, this makes it more important to actually get #2106 done.
Thanks for update. I increased the priority of #2106 and added it to RF 3.2 scope. Cannot promise it will be fixed then but I'll at least look how big task it would be. I'll close this issue as a duplicate of #2106.
Activity
[-]When running multiple test case files, get_keyword_names is not called for Remote Library all libraries[/-][+]When running multiple test case files, get_keyword_names is not called for all Remote Libraries[/+]pekkaklarck commentedon Aug 14, 2019
This is most likely caused by imported libraries being cached. If a library is imported again with same exact arguments, its got from the cache and not re-imported. I makes some sense with normal libraries but doesn't work at all in cases like this. There are also other problems caused by caching and we have issue #2106 about not doing it.
To validate my expectation, you could try changing the URL in the second example slightly. For example,
127.0.0.1or perhaps evenlocalHOSTinstead oflocalhostcould work. If I'm right, this makes it more important to actually get #2106 done.senft commentedon Aug 15, 2019
You are absolutely correct. Changing the URL the way you propsed solves the issue.
pekkaklarck commentedon Aug 15, 2019
Thanks for update. I increased the priority of #2106 and added it to RF 3.2 scope. Cannot promise it will be fixed then but I'll at least look how big task it would be. I'll close this issue as a duplicate of #2106.
senft commentedon Aug 15, 2019
Thank you!