Modify a Property on JMeter -


I have created a test plan with two thread groups. Each thread group has a SOAP / XML-RPC request sample. There is also a regular expression extractor in Thread Group A, in which:

  Reference Name: ABC Regular Expression:  
  Name: Remove Value script: $ {__setproperty (ABC, $ {ABC}} )};   

I have to modify the ABC variable and then pass it on the SOAP sample of the second thread group.

So, if the ABC 1000 (response tag has got an integer) I want to divide that value by two and then pass it to another sample:

 < Code> & lt; AbcValue & gt; $ {__ p (revised ABC)}   

Any ideas?

Edit:

I have tried preprocessors (on the other thread group) and postprocess (first thread group) but whatever I tried I like the errors returned:

  error - jmeter.util.BeanShellInterpreter: Error in starting bsh method: eval source file: inline evaluation: `` string value = integer. Tosting (integer. PRIIN (722 9/2) / 2); Prospect ("Modified ABC", v. '': Typed variable declaration: error in method allocation: static method 'java' in lang.Integer '' is not found in the parseint (int)    

  1. If your response includes anything other than '', '', or 0-9 , The rigax extractor can be better to set the match group (. +), So it collects whatever in the reaction, and checks for different regex It uses the claim that what you expect. In this way you will get a sample when the subsequent results are poor, despite the subsequent failure, when your next sample becomes badly prepared through poor input

  2. An argument in the thread group, you have some "

    $ {__ setProperty (" ABC "," $ {ABC} "}} < / P>

    It sets the value of the variable named ABC to ABC, which I think is your intention

    1. The easy way to split your price is with the __ javaScript () function.

      $ {__javaScript ($ {ABC} / 2)}

      You can use it anywhere in jmeter and it will replace the expected value for you. Ensure that you have retrieved the property at the beginning of Thread Group B, because the variable (ABC) is in a different scope.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

Matlab: Transfer variable from GUI to Base Workspace and new Variables (Static Workspace, Script, Creating new Variables) -