TLDR;
ForEach Controller(testFragmentName) -> Switch Controller(testFragmentName) -> [IncludeController1(existingPath1),IncludeController2(existingPath2)]
Intro & my data
So... I've been researching the subject and didn't like any proposed solutions as I want to have full control of the project.
My idea is to have suites defined in json like:
{
"Suites": [
{
"name": "ExampleTest",
"testFragments": [
"Login",
"HomePage",
"Logout"
]
}
]
}
Having defined the test and it's modules I go to selected test plan.
Test plan elements, main points
Used HTTP Request with file protocol to get json file with data to extract:
Property/variable input: suites
Json Path: $.Suites[?(@.name in [${suites}])].testFragments.*
Now I prepare such test structure:
| ForEach
| - Switch
| - - Include1
| - - Include2
...
ForEach Controller
Switch Controller
Include Controllers
The only thing left to do is define every Include Controller with existing path name so error doesn't occure. I don't suggest using includecontroller.prefix
as it's pretty much useless.
The whole operation requires defining all external jmx test fragments within the switch controller as Include Controllers with correct names (switch controllers needs to know which controller to chose).
Conclusion
In my opinion it's worth as you can use external properties ('suites' or other as you would like) to run predefined suites.
It's not perfect but it allows complete modularization and external control via simple property input.
PS. Include Controller is obviously a strong contender for the worst design of functionality ever.
Login TestFragment.jmx
? – lojza