Forum Discussion

Equinix_Inc_Sup's avatar
Equinix_Inc_Sup
Occasional Contributor
15 years ago

JDBC connection parameters externalization

I dont find any where an example to externalize the JDBC connection parameteres.If you can provide the example assuming that my data base connection properties are at test suite level that will help me a lot.
I failed in doing so.

3 Replies

  • Equinix_Inc_Sup's avatar
    Equinix_Inc_Sup
    Occasional Contributor
    The point below was we can externaize the complete connection string URL by selecting none in connection combo box.
  • Hello,

    I'm not sure I've understood your question well, but I think you can use property expansion here.
    So you need to define property on test suite level (e.g. db_conn_url) and give it some default value
    (e.g. jdbc:mysql://127.0.0.1:3306/test_db?user=root) and in data source for connection string
    you should type: ${#TestSuite#db_conn_url}. You can do something similar for 'Driver:' field.

    Now you can change test suite property between requests to connect to different db servers.

    Hope this helps. If this is not what you've meant please explain in more details what exactly you
    need to do.

    regards!
    Predrag
    /eviware.com