Search code examples
jmeter

Error 500 when running an inside system function on JMeter


Friends, I'm trying to collect some system time on JMeter.

There is a requisition like below: enter image description here

The StartDateTime is collected (into the system), using the following function: RoomBoardStartLogProcess()

And the EndDateTime using the following: RoomBoardEndLogProcess()

How can I execute them inside the JMeter? The syntax ${__func()} is showing error 500 into the HTTP Request

This time is different than the current UTC time. It's not the "${__javaScript((new Date()).toISOString())}"

enter image description here


Solution

  • If RoomBoardEndLogProcess() is a JavaScript function specific to your web application you cannot invoke this using JMeter Functions as it's simply not implemented.

    You need to inspect the function code and come up with the equivalent somewhere in JSR223 PreProcessor and better using Groovy language. Once you generate the value you can store it into a JMeter Variable and use the variable as the request parameter.