You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Nicola Ambrosetti Brolin <am...@gmail.com> on 2013/10/10 14:58:55 UTC

Adding an assertion after a Module/Include Controller

Hi,

I've got a module controller running a test fragment in an include
controller and I would like to add some assertions to verify the results. I
tried adding an assertion both as a child to the module controller or as a
sibling and in both cases the assertion doesn't seem to be run at all.
In the Tree View Listener I can see the results of the test fragment run
via the include controller, but I don't see how I can get to those results
in any way.

The only workaround I found is saving the result in a variable already in
the included test fragment.

Any thoughts?

Nicola

Re: Adding an assertion after a Module/Include Controller

Posted by Nicola Ambrosetti Brolin <am...@gmail.com>.
>
>  You have to set the assertion as a child of the sampler, if you want to
> verify the result of that sampler.
> So, the assertion must go into the fragment.
>

that kills the reusability of the included test fragment. Mine is a generic
test fragment to get a piece of a log file. I don't want to add an
assertion there.

My question in the end is how can I retrieve the response of the sampler in
the included test fragment from the "parent" test plan.

I don't like that a parent test plan must know what variable name was used
by the included test fragment. It's like if in a programming language, the
calling function would have access to the local variables (and not the
result) of the called function.

Sergio: a volte mi dico che forse dovrei provare con un altro programma...