jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 63064] If Controller evaluates to "False" if expression contains empty line
Date Mon, 07 Jan 2019 21:04:52 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=63064

Philippe Mouawad <p.mouawad@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #2 from Philippe Mouawad <p.mouawad@ubik-ingenierie.com> ---
(In reply to Felix Schumacher from comment #1)
> Created attachment 36368 [details]
> trim expression before evaluation
> 
> The attached patch fixes the reported behavior. The evaluated expression was
> "true\n" which got compared to "true" which resulted in false.
> 
> I haven't committed the patch yet, as I wanted to add a test case so that we
> would not stumble upon this bug again, but it seems that the expression
> (condition) is not evaluated at all with my setup. Is anyone willing to tell
> me, what is missing there?

You need to call ValueReplacer :
        JMeterContextService.getContext().setVariables(vars);
        JMeterContextService.getContext().setSamplingStarted(true);
        ValueReplacer replacer = new ValueReplacer();
        replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());


Still it doesn't work with function and variable.
Something to be investigated I guess.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message