Home > Back-end >  Error generating variable with 44 characters in Jmeter
Error generating variable with 44 characters in Jmeter

Time:03-25

hello!

I have the following problem in Jmeter:

I want to add a code to my BeanShell Tester that generates a 44-character barcode. But so far, without success.

So I went to plan "B": I added a Random Variable with 44 characters, but it doesn't get created. It does not display any errors.

Could someone help me and tell me what I can do to make it work?

Below are the variables:

Output format: 0000000000000000000000000000000000000000
Minimum value: 1000000000000000000000000000000000000000
Maximum value: 9999999999999999999999999999999999999999

Print below: enter image description here

As for the code, I didn't share it here, but if anyone knows and has a code that generates barcodes, I'd appreciate it!

Anyway, that's it folks!

Thank you very much in advance!

CodePudding user response:

If you're doing Beanshell scripting (however enter image description here

CodePudding user response:

You can use JMeter function __RandomString (last parameter is the variable name)

${__RandomString(44,0123456789,CodeBarra)}

returns a random String of length using characters in chars to use

  • Related