All Downloads are FREE. Search and download functionalities are using the official Maven repository.

robotframework-2.7.7.atest.robot.keywords.keyword_namespaces.txt Maven / Gradle / Ivy

The newest version!
*** Settings ***
Documentation   Testing that keyword namespaces -- test case file user keywords, resource user keywords, base keywords -- work correctly and have correct priorities. Situations where more than one keyword with same name exists are tested also. Non-existing keywords are tested in keyword_not_found.html.
Suite Setup     Run Tests  ${EMPTY}  keywords/keyword_namespaces.txt
Force Tags      regression  jybot  pybot
Resource        atest_resource.txt

*** Test Cases ***
Keywords With Unique Name Are Ok
    Check Test Case  Keywords With Unique Name Are Ok

Full Name Works With Non Unique Keyword Names
    Check Test Case  Full Name Works With Non Unique Keyword Names

Non Unique Keywords Without Full Name Fails
    Check Test Case  Non Unique Keywords Without Full Name Fails 1
    Check Test Case  Non Unique Keywords Without Full Name Fails 2
    Check Test Case  Non Unique Keywords Without Full Name Fails 3

Keyword From Test Case File Overrides Keywords From Resources And Libraries
    Check Test Case  Keyword From Test Case File Overrides Keywords From Resources And Libraries

Keyword From Resource Overrides Keywords From Libraries
    Check Test Case  Keyword From Resource Overrides Keywords From Libraries

Keyword From User Library Overrides Keywords From Standard Library
    Check Test Case  Keyword From User Library Overrides Keywords From Standard Library
    Verify Override Message  ${ERRORS.msgs[0]}  Comment  BuiltIn
    Verify Override Message  ${ERRORS.msgs[1]}  Copy Directory  OperatingSystem

Keyword From User Library Overrides Keywords From Standard Library Even When Std Lib Imported With Different Name
    Check Test Case  Keyword From User Library Overrides Keywords From Standard Library Even When Std lib imported with Different Name
    Verify Override Message  ${ERRORS.msgs[2]}  Replace String  String  Std Lib With Custom Name

No Warning When User Library Keyword Is Registered As RunKeyword Variant And It Has Same Name As Std Keyword
    Check Test Case  No Warning when User Library Keyword Is Registered As RunKeyword Variant And It Has Same Name As Std Keyword
    ${stderr} =  Get Stderr
    Should Not Contain  ${stderr}  Run Keyword If

Keyword In More Than One User Library And Standard Library
    Check Test Case  Keyword in More than one user library and standard library
    Check Syslog does Not Contain  BuiltIn.Noop


***Keywords***
Verify override message  [Arguments]  ${msg}  ${kw}  ${stdlib}  ${custom}=
    ${stdlib2} =  Set Variable If  "${custom}"  ${custom}  ${stdlib}
    ${expected} =  Catenate 
    ...  Keyword '${kw}' found both from a user created test library 
    ...  'MyLibrary1' and Robot Framework standard library '${stdlib}'.
    ...  The user created keyword is used. To select explicitly, and to get rid
    ...  of this warning, use either 'MyLibrary1.${kw}' or '${stdlib2}.${kw}'.
    Check Log Message  ${msg}  ${expected}  WARN




© 2015 - 2024 Weber Informatics LLC | Privacy Policy