Using jmeter, I have a variable that is obtained by xpath expression. I have then used beanshell post processor to then get a substring (last 4 characters) which will be used in another request. However, I keep getting an method invocation error for the script below.
import org.apache.jmeter.util.JMeterUtils;
import java.lang.*;
import java.io.*;
String numb = String.valueOf(vars.get("num"));
String last4 = num.Substring(num.length()-4, num.length());
log.info("num");
Any ideas as to what I'm doing wrong?