Adi Keller
Adi Keller

Reputation: 121

RIDE - some Library/Resource are RED

Some Library/Resource in my Robot Framework script are RED as shown below: bad script with red marks

While other one (which I copied from) is looks OK: good script

My working environment (tree) looks like this: working environment/tree

What I don't understand is why in one script everything looks good and in the other one (which looks almost the same) some Library/Resource are RED.

The main reason I ask is because my python script (stability_tests.py) is not getting the parameters I send (stability_args, see below).

my robot framework script

*** Settings ***
Force Tags        Critical    template    Conf=3    isTor=0    isSanity=0    

headless    rcmd
Library           BeAm.beacon.tests.BeaconTesting    WITH NAME    
BeaconTesting
Library           Collections
Library           BeAm.beacon.stability_tests
Library           BeAm.beacon.tests
Resource          ../../BeAm/beacon/settings.txt
Resource          ../../BeAm/settings.txt
Resource          ../../BeAm/local_settings.txt

*** Test Cases ***
Create Test Object
    [Tags]    must
    ${TEST} =    BeaconTesting.Get Beacon Test    3
    Set Suite Variable    ${TEST}    ${TEST}

Prepare Beacon Server
    [Tags]    prpr
    BeaconTesting.Change Mss Value    ${None}
    BeaconTesting.Prepare Server    ${TEST}

Beacon Stability
    [Tags]    stability
    ${stability_args} =    Create Dictionary
    Set To Dictionary    ${stability_args}    RANDOM_BEACON_TYPES    False
    Set To Dictionary    ${stability_args}    TIME_GAP    0.3
    Set To Dictionary    ${stability_args}    STRESS_TEST_NUM_OF_REQ    20
    Set To Dictionary    ${stability_args}    WORKERS    2
    stability workers    ${TEST}    &{stability_args}

BTW, the python script include stability_workers function.

def stability_workers(RANDOM_BEACON_TYPES=True, TIME_GAP=60, STRESS_TEST_NUM_OF_REQ=100000, WORKERS=25):
    s = NewStressTest(RANDOM_BEACON_TYPES, float(TIME_GAP), int(WORKERS), int(STRESS_TEST_NUM_OF_REQ)])

Upvotes: 3

Views: 892

Answers (1)

pankaj mishra
pankaj mishra

Reputation: 2615

You can try below approach

1)Give absolute path in environment variable till BeAm.beacon

2) If 1 is not successfull,Create a environment variable PYTHONPATH and provide the absolute path till BeAm.beacon

This should solve your issue

Upvotes: 1

Related Questions