Skip to content

When running multiple test case files, get_keyword_names is not called for all Remote Libraries #3249

Closed

Description

@senft

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?

Thanks in advance!

Activity

  1. 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
  2. pekkaklarck commented on Aug 14, 2019

    @pekkaklarck
    Member

    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.

  3. senft commented on Aug 15, 2019

    @senft
    Author

    You are absolutely correct. Changing the URL the way you propsed solves the issue.

  4. pekkaklarck commented on Aug 15, 2019

    @pekkaklarck
    Member

    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.

  5. senft commented on Aug 15, 2019

    @senft
    Author

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions