Thank you. It works! I use if-controller with the JavaScript condition, failing dummy - requests and result status action handler.
-----Ursprüngliche Nachricht----- Von: sebb [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 25. April 2006 16:57 An: JMeter Users List Betreff: Re: simple output On 25/04/06, Ziemerle, Andreas <[EMAIL PROTECTED]> wrote: > OK. I can output the value.(true/false) > > Can't I use "${__log(${JMeterThread.last_sample_ok},OUT)}" == "true" in a if > condition and set a user parameter with the text I want in a child of the > if-condition? That is not a valid JavaScript condition. '${JMeterThread.last_sample_ok}' == 'true' should work better. However, you need to include a sampler in the If Controller or it won't do anything. Messy. You might find it easier to use the Regex Post-Processor - set the template to text1 and the default to text2, then refer to the Regex variable. > So it should be possible to output every text I want. > I tried but it didn't work. I can't see why not. > Any hints? You could try a JavaScript snippet of the form: condition ? text1 : text2 where the condition is as above, and then use it in the log function. But this is all going to be very convoluted. > Greetings > Andreas > > > -----Ursprüngliche Nachricht----- > Von: sebb [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 25. April 2006 15:47 > An: JMeter Users List > Betreff: Re: simple output > > The variable "JMeterThread.last_sample_ok" is set to "true" or "false" > after all assertions have been processed, so you could put > > ${__log(${JMeterThread.last_sample_ok},OUT)} > > If you want something other than "true" and "false", you will need to > use JavaScript or BeanShell. > > S. > On 25/04/06, Ziemerle, Andreas <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I want to do a simple action with jmeter but I can't find the way it > > works. > > My example looks like: > > > > http-request > > assertion > > > > If the assertion is failed I want to write 'text1' to std -Out > > ${__log(${text1},OUT)} > > > > In the other case I want to write 'text2' to std. out. > > > > Is there any way to do this? > > > > Greetings > > Andreas > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

