Skip to content
Published on

OpenTAP Test Plan Creation

Test Plans

The OpenTAP test automation platform, and Keysight PathWave Test Automation products built with it, consume and interpret Test Plans. The OpenTAP User Guide defines a Test Plan as follows:

test plan is a sequence of test steps and their associated data. They are stored as XML files, and use the ".TapPlan" file extension.

Let's peek inside an actual OpenTAP test plan:

<?xml version="1.0" encoding="utf-8"?>
<TestPlan type="OpenTap.TestPlan">
  <Steps>
    <TestStep type="OpenTap.Plugins.BasicSteps.LogStep" Id="a5d8babd-6d13-4b6d-bb1c-f0da9eaf99e0">
      <LogMessage>Starting IoT Test</LogMessage>
      <Severity>Info</Severity>
      <Name Metadata="Step Name">Log Output</Name>
      <ChildTestSteps />
    </TestStep>
    <TestStep type="OpenTap.Plugins.BasicSteps.DialogStep" Id="fa570016-be72-4986-8290-d374f72fa143">
      <Message>Starting Test - Continue?</Message>
      <Title>Title</Title>
      <Buttons>OkCancel</Buttons>
      <PositiveAnswer>NotSet</PositiveAnswer>
      <NegativeAnswer>NotSet</NegativeAnswer>
      <UseTimeout>false</UseTimeout>
      <Timeout>5</Timeout>
      <DefaultAnswer>NotSet</DefaultAnswer>
      <ShowPicture>false</ShowPicture>
      <PictureSource />
      <PictureDescription />
      <Name Metadata="Step Name">Dialog</Name>
      <ChildTestSteps />
    </TestStep>

Test Steps

OpenTAP executes Test Steps in a Test Plan from top to bottom. Each Test Step can run child Test Steps, either sequentially or in parallel, and entire Test Plans can be embedded within a single Test Step. This hierarchy is recursive: