yoyo1
March 31, 2025, 5:58pm
1
Hi,
Is there a way where I can have a tapplan which direct to a specific tapplan I need to run by giving its path. For example below:
Thanks!
<?xml version="1.0" encoding="utf-8"?>
*
<TestStep type="OpenTAP.Plugins.BasicSteps.TestPlanStep">*
<Enabled>true</Enabled>*
<Name>my_test</Name>*
<PlanPath>C:folder\test.TapPlan</PlanPath>*
<ExternalParameters>*
</ExternalParameters>*
</TestStep>*
<TestStep type="OpenTAP.Plugins.BasicSteps.TestPlanStep">*
<Enabled>true</Enabled>*
<Name>my_second_test</Name>*
<PlanPath>C:folder\second_test.TapPlan</PlanPath>*
<ExternalParameters>*
</ExternalParameters>*
</TestStep>*
*
Welcome!
You can use a Test Plan reference to call another test plan:
Flow Control --> Test Plan Reference
yoyo1
April 2, 2025, 3:59pm
3
Hi Thanks for the Reply.
I am using:
<?xml version="1.0" encoding="utf-8"?>
But I keep getting this error:
Serializer XML Line 4: Unable to deserialize test step
Kindly advise.
Where should my testplans be relative to tap.exe or Editor.exe? Can it be anywhere?
I created a simple .TestPlan in the KS8400 Editor and this is what its source looks like:
<?xml version="1.0" encoding="utf-8"?>
<TestPlan type="OpenTap.TestPlan">
<Steps>
<TestStep type="emb:ref@OpenTap.Plugins.BasicSteps.TestPlanReference" Id="a7daa5c5-b393-4f39-b254-b18b138543db">
<Parameters_x0020__x005C__x0020_Time_x0020_Delay>0.1</Parameters_x0020__x005C__x0020_Time_x0020_Delay>
<Filepath>C:\Users\acopelan\Desktop\delayed a bit.TapPlan</Filepath>
<Hash>D5ADDDCA3CD7CC85</Hash>
<StepMapping />
<Name Metadata="Step Name">Test Plan Reference</Name>
</TestStep>
</Steps>
<Package.Dependencies>
<Package Name="OpenTAP" Version="^9.27.1+49587562" />
</Package.Dependencies>
</TestPlan>
1 Like
yoyo1
April 2, 2025, 11:11pm
5
Thank you it works! Is there a way to put a base_path and then concat it with the name of the tapplan as shown below?
<?xml version="1.0" encoding="utf-8"?>
<TestPlan type="OpenTap.TestPlan">
<!-- Define the base directory as a parameter -->
<Parameters>
<Parameter Name="BasePath" Value="C:\Users\yoyo\new_folder\another_folder\sub_folder\"/>
</Parameters>
<Steps>
<!-- Template -->
<TestStep type="OpenTap.Plugins.BasicSteps.TestPlanReference">
<Filepath>{BasePath}my_test.TapPlan</Filepath>
<Name Metadata="Step Name">Example_Test</Name>
</TestStep>
</Steps>
<Package.Dependencies>
<Package Name="OpenTAP"/>
</Package.Dependencies>
</TestPlan>
Hi @yoyo1 , I bet you could create a new test step which inherits OpenTap.Plugins.BasicSteps.TestPlanReference, and create separate properties for the base path and tapplan name, whose setters will set Filepath.