Testopia:Documentation:XMLImport: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(Updates for 1.1.2.)
Line 4: Line 4:
==What's New!==
==What's New!==
{| border=1 cellpadding=4
{| border=1 cellpadding=4
| 2006-12-21 ||
* Updates for 1.1.2
|-
| 2006-11-14 ||  
| 2006-11-14 ||  
* Page created
* Page created
Line 11: Line 14:
==Known Issues==
==Known Issues==


*Tag <category> will error with "Cannot find product ' ' for category 'CATEGORY'".  Work around is to include the category with the <categoryname> tag under the <testcase> tag and the category will be created if it does not exist.
*Tags <attachment>, <build>, <testenvironment>, <testrun> and <testrunlog> are included in testopia.dtd but not yet implemented.
*Tags <attachment>, <build>, <testenvironment>, <testrun> and <testrunlog> are included in testopia.dtd but not yet implemented.
*Tag <requirement> is listed as required for a Test Case in testopia.dtd but should not be.
*Tag <alias> is listed as 0 or more times in testopia.dtd and should be 0 or 1.
*Tag <editor> is still included in testopia.dtd although there is no longer a Test Plan Editor.
*The testplan_reference type of Database_description is not yet implemented.
*The testplan_reference type of Database_description is not yet implemented.


Line 42: Line 41:
                 <product>TestProduct</product>
                 <product>TestProduct</product>
                 <productversion>1.0</productversion>
                 <productversion>1.0</productversion>
                <editor>editoremail@company.com</editor>
        </testplan>
        </testplan>
         <testcase author="youremail@company.com">
         <testcase author="youremail@company.com">
                 <summary>Test Case Summary</summary>
                 <summary>Test Case Summary</summary>
Line 63: Line 61:
                 <product>TestProduct</product>
                 <product>TestProduct</product>
                 <productversion>1.0</productversion>
                 <productversion>1.0</productversion>
                <editor>editoremail@company.com</editor>
                 <document>Test Plan HTML Document</document>
                 <document>Test Plan HTML Document</document>
         </testplan>
         </testplan>
Line 72: Line 69:
                 <defaulttester>testeremail@company.com</defaulttester>
                 <defaulttester>testeremail@company.com</defaulttester>
                 <categoryname>Category Name</categoryname>
                 <categoryname>Category Name</categoryname>
                 <component>TestComponent</component>
                 <component product="TestProduct">TestComponent</component>
                 <alias>Alias</alias>
                 <alias>Alias</alias>
                 <script>Script</script>
                 <script>Script</script>

Revision as of 22:50, 21 December 2006

Back to the Testopia Main Page

What's New!

2006-12-21
  • Updates for 1.1.2
2006-11-14
  • Page created

Known Issues

  • Tags <attachment>, <build>, <testenvironment>, <testrun> and <testrunlog> are included in testopia.dtd but not yet implemented.
  • The testplan_reference type of Database_description is not yet implemented.


Getting Started

Testopia imports must be run from your Bugzilla home directory using tr_importxml.pl

Types for testplan_reference

  • Database_id - The id supplied is the Test Plan number to use.
  • Database_description - Not implemented. The summary supplied is used to search for a Test Plan in Testopia with a matching summary.
  • Xml_description - The summary supplied is used to find a Test Plan in the current XML import file with a matching summary.

Samples

Minimum

Minimum XML to create a Test Plan with an associated Test Case.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE testopia SYSTEM "testopia.dtd">
<testopia version="1.1">
       <testplan author="youremail@company.com" type="System">
               <name>Test Plan Name</name>
               <product>TestProduct</product>
               <productversion>1.0</productversion>
        </testplan>
       <testcase author="youremail@company.com">
               <summary>Test Case Summary</summary>
               <testplan_reference type="Xml_description">Test Plan Name</testplan_reference>
               <defaulttester>testeremail@company.com</defaulttester>
               <action>Action HTML Text</action>
       </testcase>
</testopia>

Complete

Complete XML for Test Plan with Test Cases showing dependencies.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE testopia SYSTEM "testopia.dtd">
<testopia version="1.1">
       <testplan author="youremail@company.com" type="System">
               <name>Test Plan Name</name>
               <product>TestProduct</product>
               <productversion>1.0</productversion>
               <document>Test Plan HTML Document</document>
       </testplan>
       <testcase author="youremail@company.com" priority="P1" automated="Automatic" status="PROPOSED">
               <summary>Test Case Summary</summary>
               <testplan_reference type="Xml_description">Test Plan Name</testplan_reference>
               <requirement>Requirement Text</requirement>
               <defaulttester>testeremail@company.com</defaulttester>
               <categoryname>Category Name</categoryname>
               <component product="TestProduct">TestComponent</component>
               <alias>Alias</alias>
               <script>Script</script>
               <arguments>Arguments</arguments>
               <tag>Tag 1</tag>
               <tag>Tag 2</tag>
               <setup>Setup HTML Text</setup>
               <breakdown>Breakdown HTML Text</breakdown>
               <action>Action HTML Text</action>
               <expectedresults>Expected Results HTML Text</expectedresults>
               <dependson type="Xml_description">Dependson Test Case</dependson>
               <blocks type="Xml_description">Blocks Test Case</blocks>
       </testcase>
       <testcase author="youremail@company.com">
               <summary>Dependson Test Case</summary>
               <testplan_reference type="Xml_description">Test Plan Name</testplan_reference>
               <defaulttester>testeremail@company.com</defaulttester>
       </testcase>
       <testcase author="youremail@company.com">
               <summary>Blocks Test Case</summary>
               <testplan_reference type="Xml_description">Test Plan Name</testplan_reference>
               <defaulttester>testeremail@company.com</defaulttester>
       </testcase>
</testopia>

Referencing a existing Test Plan

Use a testplan_reference with a type of Database_id for the Test Case.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE testopia SYSTEM "testopia.dtd">
<testopia version="1.1">
       <testcase author="youremail@company.com">
               <summary>Test Case Summary</summary>
               <testplan_reference type="Database_id">5</testplan_reference>
               <defaulttester>testeremail@company.com</defaulttester>
               <action>Action HTML Text</action>
       </testcase>
</testopia>

Using HTML Tags

The Test Plan's document field and Test Case's setup, breakdown, action and expectedresults fields all support using HTML tags. The < and > of the HTML tag must be passed as entities using &testopia_lt; and &testopia_gt;

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE testopia SYSTEM "testopia.dtd" [
<!ENTITY testopia_lt "<">
<!ENTITY testopia_gt ">">
]>
<testopia version="1.1">
       <testplan author="youremail@company.com" type="System">
               <name>Test Plan Name using testopia_lt and testopia_gt entities.</name>
               <product>TestProduct</product>
               <productversion>1.0</productversion>
               <editor>editoremail@company.com</editor>
               <document>&testopia_lt;i&testopia_gt;Test Plan HTML Document in italics&testopia_lt;i&testopia_gt;</document>
       </testplan>
       <testcase author="youremail@company.com">
               <summary>Test Case Summary</summary>
               <testplan_reference type="Xml_description">Test Plan Name using testopia_lt and testopia_gt entities.</testplan_reference>
               <defaulttester>testeremail@company.com</defaulttester>
               <action>&testopia_lt;b&testopia_gt;Action HTML Text in bold&testopia_lt;/b&testopia_gt;</action>
       </testcase>
</testopia>


Back to the Testopia Main Page