Bug 56630 - Module Controller does not work properly in included script
Summary: Module Controller does not work properly in included script
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.11
Hardware: PC All
: P2 normal with 2 votes (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-16 13:37 UTC by Alexei
Modified: 2015-05-13 15:52 UTC (History)
1 user (show)



Attachments
Main test plan (4.55 KB, text/plain)
2014-07-06 21:18 UTC, Alexei
Details
Included script with Test Fragment (2.10 KB, text/plain)
2014-07-06 21:19 UTC, Alexei
Details
Included script without Test Fragment (2.15 KB, text/plain)
2014-07-06 21:19 UTC, Alexei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei 2014-06-16 13:37:52 UTC
Module Controller does not work when it's used in a script that included with Include Controller.

Steps to reproduce:
1. Create two scripts:
Main script

TestPlan
|--Thread-Group
|    |--Debug Sampler1
|    |--Include Controller <Second script>
|    |--Debug Sampler2
|--View Results Tree

Second script
TestPlan
|--Test Fragment
     |--Simple Controller
     |    |--Debug Sampler3
     |--Module Controller <TestPlan > Test Fragment > Simple Controller>
2. Run Main script
3. See Results Tree for results

Actual Results:
Debug Sampler1
Debug Sampler3
Debug Sampler2

Expected Results:
Debug Sampler1
Debug Sampler3
Debug Sampler3
Debug Sampler2



BR,
Alexei
Comment 1 Philippe Mouawad 2014-07-05 13:49:41 UTC
As per new documentation of trunk:
jmeter/docs/usermanual/component_reference.html#Test_Fragment

"When using Test Fragment with Module Controller , ensure you disable the Test Fragment to avoid the execution of Test Fragment itself. "


So this is by feature and result is fine.

*** This bug has been marked as a duplicate of bug 55740 ***
Comment 2 Alexei 2014-07-06 19:00:57 UTC
The issue is not in "Test Fragment". As per jmeter/docs/usermanual/component_reference.html#Include_Controller i have to use it:
The include controller is designed to use an external jmx file. To use it, create a Test Fragment 
underneath the Test Plan and add any desired samplers, controllers etc. below it.
Then save the Test Plan.  The file is now ready to be included as part of other Test Plans.

You may also want to modify "Second script" to avoid using "Test Fragment":

Second script
TestPlan
|--Simple Controller1
     |--Simple Controller2
     |    |--Debug Sampler3
     |--Module Controller <TestPlan > Test Fragment > Simple Controller2>

But actual result is the same.

The issue makes using Module Controller in script included with Include Controller impossible.
Comment 3 Philippe Mouawad 2014-07-06 19:24:24 UTC
Can you attach the 2 sample test plans using Debug Sampler ?

Thank you
Comment 4 Alexei 2014-07-06 21:18:19 UTC
Created attachment 31795 [details]
Main test plan
Comment 5 Alexei 2014-07-06 21:19:30 UTC
Created attachment 31796 [details]
Included script with Test Fragment
Comment 6 Alexei 2014-07-06 21:19:58 UTC
Created attachment 31797 [details]
Included script without Test Fragment
Comment 7 Alexei 2014-08-20 09:45:53 UTC
Hi Philippe,

Have you had a chance to look into test plans?

BR,
Alexei
Comment 8 Philippe Mouawad 2014-08-22 21:22:53 UTC
Yes, I reproduced issue.
Still looking at fix.
Comment 9 Philippe Mouawad 2014-09-06 07:25:55 UTC
Issue is located in IncludeController#loadIncludedElements.
JMeter does not find reference as it has a root the includer not the included.
Comment 10 Alexei 2015-05-13 15:52:43 UTC
Hi Philippe,

The issue has not been updated for a long time. Is there any possibility to fix the it?

BR,
Alexei