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.

How do I get the name of the datasource in Groovy?

jefftuckerbofa Posts: 227

What's the best way to get the name of the datasource associated with the responder in a Groovy script. Is there a reference to it in the context or do I need to put it there?




  • williammccusker
    williammccusker Posts: 640 ✭✭✭


    I found this method that might be what you are looking for, context.getDefaultDataSourceName()

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    Thanks works great. Is there some documentation available that shows this type of thing? I have been unable to find something like that. JT

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭

    "getDefaultDataSourceName" is not API. It is not part of the ScriptingContext interface which is documented. Instead, it is internal API that just happens to return what you asked.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    Thanks. I'll steer clear of that type of thing. JT