If you'll look into Debug Sampler output, you'll see that VALUES
will be a prefix.
Like
- VALUES=...
- VALUES_g=...
- VALUES_g0=...
- VALUES_g1=...
etc.
You can use ForEach Controller to iterate over them.
If you want to proceed with Beanshell - you'll need to iterate through all variables like:
import java.io.FileOutputStream;
import java.util.Map;
import java.util.Set;
FileOutputStream out = new FileOutputStream("c:\\downloads\\results.txt", true);
String newline = System.getProperty("line.separator");
Set variables = vars.entrySet();
for (Map.Entry entry : variables) {
if (entry.getKey().startsWith("VALUES")) {
out.write(entry.getValue().toString().getBytes("UTF-8"));
out.write(newline.getBytes("UTF-8"));
out.flush();
}
}
out.close();