Groovy

Groovy (beta) code posted by PN
created at 21 Apr 14:07, updated at 21 Apr 14:08

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
//log.info( groovyUtils.projectPath );

// get request property
def requestHolder = groovyUtils.getXmlHolder( "Plan#Request" );
def x = requestHolder.getNodeValue("//q0:Plan/request/Description");

// Update with unique ID
def currentTime = System.currentTimeMillis();
requestHolder.setNodeValue("//q0:Plan/request/Description", "Test " + currentTime);
log.info( "Test " + currentTime );

// set the property
requestHolder.updateProperty();
528 Bytes in 2 ms with coderay