0
votes

I have UUID value converted from String:

String SessionUUID1= "8B6FA50D-59D0-4582-9396-C4A376EBBC7E";
UUID finaluid = UUID.fromString(SessionUUID1.toString());

but unable to assign it to Jmeter variable and also unable to pass it as Json data in body data.

I should assign finaluid as json data to send the request.

Iam using Beanshell Preprocessor to populate the above.

1

1 Answers

1
votes

You can use vars.putObject method to store non-String variable value like:

vars.putObject("finaluid", finaluid);

Not sure what do you mean by I should assign finaluid as json data, if you sending JSON via HTTP Request Sampler - it won't accept UUID, you'll have to convert it back to string.

Check out How to Use BeanShell: JMeter's Favorite Built-in Component article for some Beanshell examples and explanation of pre-defined variables.