Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Cannot access global properties from a script

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
Is it possible to access global properties such as database account information from a script?

Mark
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    It is not possible to access the global properties in a script. Why do you want to do this in a script? If you give more details, then I might be able to find another way to do it.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    If you wanted to write a script that made a database connection, built and then executed a SQL query it would be helpful to obtain the database account information from the global property so that it would not be hardcoded into the script.

    It seems to me that anything calling it self a "global property" ought to be accessible, well, globally (including from within a script).

    HTH,

    Mark
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Thanks for your feedkback. It is helpful when we have examples like this of how a new feature would benefit customers.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Could you clarify why you're using a script to make the database connection instead of the DB Tool? For instance, you could use the global properties in the DB Tool and use a script to make the SQL query. I've attached an example test suite. (Example requires SOAtest 4.5.1 SP2) If you used this method, then you would not need to access the global properties in the script.