Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 21061

Using nested property values in a Groovy script

$
0
0

In my TestSuite properties, I have some properties that look like

 

StreamdumpBaseDir            c:/tmp/foo

StreamdumpDir                    ${#TestSuite#StreamdumpBaseDir}/bar

 

I can pass ${#TestSuite#StreamDumpDir} to a RESTful call in the JSON payload and the two levels of interpolation get processed just fine, so that the target web server receives "c:/tmp/foo/bar" as I expect.

 

I would like to use the value of StreamdumpDir in a Groovy script.

I have the following code:

def destDir = testRunner.testCase.testSuite.getPropertyValue( "StreamDumpDir" )

log.info "destDir = $destDir"

 

The result that gets logged is

...destDir = ${#TestSuite#StreamdumpBaseDir}/bar

 

In other words, the embedded property reference doesn't get dereferenced.

Is there a way to fix this, or do I just have to stop using such nested values?

 

Thanks!


Viewing all articles
Browse latest Browse all 21061

Trending Articles