String c = ${__timeShift(yyyy-MM-dd,,P10D,)}
log.info("Today date " + "${c}")
vars.put("DATE_PLUS_10", "${c}")
System.out.println("${c}"); ---- This is printing 2007
def response = prev.getResponseDataAsString()
log.info('Response Initial: ' + response)
def request = response.replaceAll('""', ${DATE_PLUS_10})
log.info('Response Massaged: ' + request)
vars.put('request', request)
//vars.putObject('request', 'request');
System.out.println(${request});
I need to add 10 days to current date and replace the null value with DATE_PLUS_10
2020-02-29 20:20:15,548 ERROR o.a.j.e.JSR223PostProcessor: Problem in JSR223 script, RESPONSE_STORE javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.$() is applicable for argument types: (Script2$_run_closure1) values: [Script2$_run_closure1@76fcaee5] Possible solutions: is(java.lang.Object), any(), get(java.lang.String), any(groovy.lang.Closure), use([Ljava.lang.Object;), wait() at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) ~[groovy-all-2.4.13.jar:2.4.13] at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:72) ~[groovy-all-2.4.13.jar:2.4.13] at javax.script.CompiledScript.eval(CompiledScript.java:92) ~[?:1.8.0_181]
Can someone pls tell me what is the issue in the line :
def request = response.replaceAll('""', ${DATE_PLUS_10})
String c = ${__timeShift(yyyy-MM-dd,,P10D,)} -
DATE_PLUS_10=2007 - this is what debug sampler displays..

