major
minor
major
minor
It is already possible to generalize test scripts into templates and to call such templates in other scripts. However, it is not yet possible to call other scripts that are not templates.
Improvement
It should be possible to call other test scripts from within test scripts. This feature has been requested repeatedly over the years by various parties. Implementing it is relatively simple: a `tl:ApplicationAction` is required for this.
Usage
The tl:IncludeScriptActionOp class allows you to include another script: {{{#!xml <action class="com.top_logic.layout.scripting.runtime.action.IncludeScriptActionOp"> <script config:interface="com.top_logic.layout.scripting.recorder.ref.FileManagerDataValue" content-type="text/xml" name="WEB-INF/test/dataSetup/InitialDataSetup.script.xml" /> </action> }}}
If multiple scripts need to be included, a `tl:ActionChainOp` can be used to call multiple `tl:IncludeScriptAction` elements: {{{#!xml <?xml version="1.0" encoding="utf-8" ?>
<action class="com.top_logic.layout.scripting.runtime.action.ActionChainOp" xmlns:config="http://www.top-logic.com/ns/config/6.0" > <actions> <-- Example for "FileManagerDataValue" --> <action class="com.top_logic.layout.scripting.runtime.action.IncludeScriptActionOp"> <script config:interface="com.top_logic.layout.scripting.recorder.ref.FileManagerDataValue" content-type="text/xml" name="WEB-INF/test/dataSetup/InitialDataSetup.script.xml" /> </action>
<-- Example for "ExternalDataValue" --> <action class="com.top_logic.layout.scripting.runtime.action.IncludeScriptActionOp"> <script config:interface="com.top_logic.layout.scripting.recorder.ref.ExternalDataValue" content-type="text/xml" name="TestAttributeCreation.script.xml" url="file:src/test/java/test/com/top_logic/demo/scripted/TestAttributeCreation.script.xml" /> </action> </actions> </action> }}}
Test
No test. It’s not worth the effort. The ticket is too small.