Forum Discussion

pricedgp's avatar
pricedgp
Contributor
8 years ago
Solved

Make all Data Source properties available to another called test case

Using groovy, I know that I can run another test case from the current test case, and pass context properties from the current test case into it, like so:     // get reference to that case and run...
  • TanyaYatskovska's avatar
    8 years ago

    Hi Pricedgp,

     

    I suppose that you can use the put method to add values of DataSource properties to your contextMap. For example, here is how the code looks on my computer:

    def contextMap = new StringToObjectMap( context )
    def from = context.expand( '${JDBC Data#From}' )
    contextMap.put("datasourceFrom", from)

    Here is an article containing a description of the method:

    http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html#put(K, V)