Bug 56630

Summary: Module Controller does not work properly in included script
Product: JMeter - Now in Github Reporter: Alexei <pics>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: normal CC: p.mouawad
Priority: P2    
Version: 2.11   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Main test plan
Included script with Test Fragment
Included script without Test Fragment

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
Comment 11 The ASF infrastructure team 2022-09-24 20:37:57 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3386