Forum Discussion

Seema_Gupta's avatar
Seema_Gupta
New Contributor
16 years ago

Cannot access Project Property through command line in 2.5.1

Hi I am using a switch with testrunner.bat -P xyz=abc and then I am using this name in the request that I am sending using

${#Project#xyz}

But this gets replaced by null when we run the testrunner.bat file. Is it a bug.

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    I'm not able to reproduce. Could you try nightly build and if you still have problem let us know.

    robert
  • I am using nightly build for today and I still cannot access this value, please clarify the usage e.g. the project property name is xyz and it's value should be replaced by http://128.34.23.23:53450 now I am giving this string in the groovy script as ${#Project#xyz}

    and in my command prompt I am using testrunner.bat -P xyz=http://128.34.23.23:53450

    But when I run my testcase using this command prompt it fails as the string in my groovy script ${#Project#xyz} does not get replaced by http://128.34.23.23:53450

    Please advise
  • Got exactly the same problem.

    I define a "custom property" on Project level, say "prop". I enter a "default-value", say "abc".
    Then I rightklick on the Project and launch the TestRunner (before that I've saved the project). There I switch to the tab "Custom Args" and there type: -Pprop=123 or -P"prop=123" or -Pprop='123'

    in the load script of the project I do a "log.info(context.expand( '${#Project#aenderndeTests}' ))". There's always and still the value "abc" set. How can I change this value via the Command-line execution only for the current testrun?

    Can anyone help me out?

    P.S.: I've already updated to Version 3.0, too. The problem still exists...