Forum Discussion

joeybear's avatar
joeybear
Contributor
15 years ago

Using Testcase Variables in Datasource SQL Query - HOW??

Here's an extremely simplified example of what I'm talking about:


Select name From auth_userprofile Where id = ${new_user_id};


I need to be able to use the variable from my testcase properties, "new_user_id" in this query.

Is there a way? Has anyone else done something like this?

Warm regards,
- Joe

2 Replies

  • Hi!

    TestCase properties are expanded as follows:

    SELECT name FROM auth_userprofile WHERE id = ${#TestCase#new_user_id};


    To get this Property Expansion automatically generated for you, just right click in the SQL Query textarea and chose Get Data..., then click on your TestCase Property.

    Read more about Property Expansion here.


    Regards

    /Henrik
    eviware support