Skip to content

Feature request: being able to 'import' a resource file with an alias (same as WITH NAME when 'importing' libraries) #5609

@vtpeters

Description

@vtpeters

Hello,

It seems that it is possible to ‘import’ libraries with an alias, as demonstrated here.

I think it would be a nice feature if the same could be done when ‘importing’ resource files.

Sometimes it's necessary to put the name of the resource in front of the keyword if a keyword with the same name (but with a different implementation) exists in two different resources and both keywords need to be used in the same testcase of test suite.

So, instead of…

*** Settings ***
Resource    ${CURDIR}/../resources/database-db2.robot
Resource    ${CURDIR}/../resources/database-teradata.robot

*** Testcases ***
Test Something
    database-db2.Get Customer
    database-teradata.Get Customer

I’d like to be able to…

*** Settings ***
Resource    ${CURDIR}/../resources/database-db2.robot    WITH NAME    DB2
Resource    ${CURDIR}/../resources/database-teradata.robot    WITH NAME    TD

*** Testcases ***
Test Something
    DB2.Get Customer
    TD.Get Customer

It would be very helpful if such a feature would exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions