robotframework/robotframework

Suppor aliases with resource imports

Open

#5609 aperta il 4 feb 2026

Vedi su GitHub
 (5 commenti) (1 reazione) (0 assegnatari)Python (2220 fork)batch import
effort: largegood first issuepriority: medium

Metriche repository

Star
 (8672 star)
Metriche merge PR
 (Merge medio 1g 3h) (1 PR mergiata in 30 g)

Descrizione

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.

Guida contributor