0
votes

I need the date with 10 positions but when I call the above function.

Got the error:

2020-08-13 12:10:12,460 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in JSR223 script JSR223 Sampler, message: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.call() is applicable for argument types: (java.lang.Integer) values: [813121012]
Possible solutions: wait(), any(), abs(), wait(long), wait(long, int), max(int, int)
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.call() is applicable for argument types: (java.lang.Integer) values: [813121012]
Possible solutions: wait(), any(), abs(), wait(long), wait(long, int), max(int, int)
1
It may be helpful if you reproduce the error in a code snipit and include it here. - Waltzy

1 Answers

2
votes

Don't inline JMeter Functions or Variables into Groovy scripts, you have 2 options:

  1. Either use "Parameters" tab of the JSR223 test element

    enter image description here

  2. Or go for generating the date purely in Groovy like:

    vars.put('variable',new Date().format('MddHHmmss'))
    

More information: Apache Groovy - Why and How You Should Use It