You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Liao, Avian" <al...@enporion.com> on 2004/12/02 19:16:07 UTC

RE: nesting constants/variables between two groups in template

To display a variable value while a test plan is running, follow these steps.
1.	Add a Java Request element (a Sampler) to the test plan after the point in the test plan where the variable is defined by an element or a function.
2.	In the Java Request, do the following:
a.	Set the Label parameter to display the variable name and variable value. For example:
	MyVariable: ${MyVariable}
b.	Set the Status parameter to "OK" or "FAIL".
	"OK" allows the test plan execution to continue.
	"FAIL" forces test plan execution to stop.

>>>>> for the following, I did not get any result from the View Result in the table, listener

3	Add a View Results in Table element (a Listener) to the test plan.
4.	Run the test plan.
	The View Results in Table element displays the Java Request response with the variable name and variable value.
>>>>.>>.>

AL


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: nesting constants/variables between two groups in template

Posted by sebb <se...@gmail.com>.
On Thu, 2 Dec 2004 13:16:07 -0500, Liao, Avian <al...@enporion.com> wrote:
> To display a variable value while a test plan is running, follow these steps.
> 1.      Add a Java Request element (a Sampler) to the test plan after the point in the test plan where the variable is defined by an element or a function.
> 2.      In the Java Request, do the following:
> a.      Set the Label parameter to display the variable name and variable value. For example:
>         MyVariable: ${MyVariable}

You can use multiple variables here - e.g. 

VAR1=${VAR1} VAR2=${VAR2) ...

but (if I recall correctly) if any of the variables cannot be found,
none of the values will be substitued - the text will remain as above.

> b.      Set the Status parameter to "OK" or "FAIL".
>         "OK" allows the test plan execution to continue.
>         "FAIL" forces test plan execution to stop.
> 
> >>>>> for the following, I did not get any result from the View Result in the table, listener
> 
> 3       Add a View Results in Table element (a Listener) to the test plan.
> 4.      Run the test plan.
>         The View Results in Table element displays the Java Request response with the variable name and variable value.
> >>>>.>>.>
> 

You can also use the __log() function to log the value of a variable
in the jmeter.log file, e.g. instead of using ${VAR} in the sampler
(or wherever), use ${__log(${VAR})}.

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org