Skip to content

Multiple keywords with same name error when using multiple generated libraries #96

@GautierFaraco

Description

@GautierFaraco

Hello,
I am currently trying the library generation tool in my project.

The library generation tool is great and is working fine when using 1 generated library in my test case.
However, I am facing an issue when I try to use 2 generated libraries in the same test case.

Here is a simple example of the error I am facing:

==============================================================================
Use 2 Libs
==============================================================================
Test 2 librairies                                                     Test Petstore
Test 2 librairies                                                     | FAIL |
Multiple keywords with name 'get_valid_url' found. Give the full name of the keyword you want to use:
    fakeRestApi.Get Valid Url
    petStore.Get Valid Url
------------------------------------------------------------------------------
Use 2 Libs                                                            | FAIL |
1 test, 0 passed, 1 failed
==============================================================================

Here is my robot file:

*** Settings ***
Library    petStore
...                 source=openapi_pet_store.yml
...                 origin=https://petstore3.swagger.io/api/v3
Library    fakeRestApi
...                 source=openapi_fake_rest_api.json
...                 origin=https://fakerestapi.azurewebsites.net

*** Test Cases ***
Test 2 librairies

    Log    Test Petstore   console=yes
    ${get_pet_resp}    Get Pet By Id    petId=1    validate_against_schema=False
    Log    Response Code: ${get_pet_resp.status_code}    console=yes
    Should Be Equal As Integers    ${get_pet_resp.status_code}    200
    Log    ${get_pet_resp.json()}    console=yes
    Log    Petstore tested    console=yes

    Log    Test Authors   console=yes
    ${get_authors_resp}    Get Api v1 Authors    validate_against_schema=False
    Log    Response Code: ${get_authors_resp.status_code}    console=yes
    Should Be Equal As Integers    ${get_authors_resp.status_code}    200
    Log    ${get_authors_resp.json()}    console=yes
    Log    Authors tested    console=yes

Am I doing something wrong / missing something here? Is this use case currently supported?
Thanks

Note:
Here are the 2 OpenAPI spec files that I used to generate librairies if needed
https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml
https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions