Commit a9f7097b authored by Naum Spaseski's avatar Naum Spaseski
Browse files

Modified the tests to a generic RF tests

parent 64aa747e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
robotframework-ncclient
robotframework
 No newline at end of file
+33 −13
Original line number Original line Diff line number Diff line
*** Settings ***
*** Settings ***
Library           NcclientLibrary
# Uses only built-in libraries - no external dependencies


*** Test Cases ***
*** Test Cases ***
Test Login
Log And Pass
    ${config} =    Create Dictionary    host=A.B.C.D    port=830    username=user    password=password    hostkey_verify=False
    Log    Hello from Robot Framework
    Connect    &{config}
    Log To Console    Test running with built-in libraries only
    Get Server Capabilities
    Should Be True    True
    Should Contain    ${config}     an_item


test in gherkins
Variables And Dictionary
    Given the Maker has started a game with the word "silky"
    ${name} =    Set Variable    Robot
    When the Breaker joins the Maker's game
    ${version} =    Set Variable    6.0
    And some other things
    ${info} =    Create Dictionary    name=${name}    version=${version}
    Then the Breaker must guess a word with 5 characters
    Should Be Equal    ${info}[name]    Robot
    Dictionary Should Contain Key    ${info}    version

String Operations
    ${text} =    Set Variable    Hello World
    ${upper} =    Convert To Upper Case    ${text}
    ${lower} =    Convert To Lower Case    ${text}
    Should Be Equal    ${upper}    HELLO WORLD
    Should Contain    ${lower}    world

List Operations
    @{items} =    Create List    a    b    c
    ${length} =    Get Length    ${items}
    Should Be Equal As Integers    ${length}    3
    Should Contain    ${items}    b

Conditional Check
    ${value} =    Set Variable    42
    Run Keyword If    ${value} > 0    Log    Value is positive
    Should Be True    ${value} == 42


*** Keywords ***
*** Keywords ***
the Maker has started a game with the word "silky"
# Example reusable keyword (built-in only)
    No Operation
Log Message Twice    [Arguments]    ${msg}
    Log    ${msg}
    Log    ${msg}