blob: 6dc57e75ada0568e5061fcf1bc61d3a261836cb5 [file] [log] [blame]
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TestON.core.teston.TestON</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="TestON-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>TestON</th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="TestON-module.html">Package&nbsp;TestON</a> ::
<a href="TestON.core-module.html">Package&nbsp;core</a> ::
<a href="TestON.core.teston-module.html">Module&nbsp;teston</a> ::
Class&nbsp;TestON
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="TestON.core.teston.TestON-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TestON</h1><p class="nomargin-top"><span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON">source&nbsp;code</a></span></p>
<p>TestON will initiate the specified test. The main tasks are : *
Initiate the required Component handles for the test. * Create Log file
Handles.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">options</span>)</span><br />
Initialise the component handles specified in the topology file of
the specified test.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="configparser"></a><span class="summary-sig-name">configparser</span>(<span class="summary-sig-arg">self</span>)</span><br />
It will parse the config file (teston.cfg) and return as dictionary</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.configparser">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="componentInit"></a><span class="summary-sig-name">componentInit</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">component</span>)</span><br />
This method will initialize specified component</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.componentInit">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="TestON.core.teston.TestON-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>)</span><br />
The Execution of the test script's cases listed in the Test params
file will be done here.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.run">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="runCase"></a><span class="summary-sig-name">runCase</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">testCaseNumber</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.runCase">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="runStep"></a><span class="summary-sig-name">runStep</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">stepList</span>,
<span class="summary-sig-arg">code</span>,
<span class="summary-sig-arg">testCaseNumber</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.runStep">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="addCaseHeader"></a><span class="summary-sig-name">addCaseHeader</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.addCaseHeader">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="addCaseFooter"></a><span class="summary-sig-name">addCaseFooter</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.addCaseFooter">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="TestON.core.teston.TestON-class.html#cleanup" class="summary-sig-name">cleanup</a>(<span class="summary-sig-arg">self</span>)</span><br />
Print a summary of the current test's results then attempt to release
all the component handles and the close opened file handles.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.cleanup">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="pause"></a><span class="summary-sig-name">pause</span>(<span class="summary-sig-arg">self</span>)</span><br />
This function will pause the test's execution, and will continue
after user provide 'resume' command.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.pause">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="onfail"></a><span class="summary-sig-name">onfail</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">*components</span>)</span><br />
When test step failed, calling all the components onfail.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.onfail">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="getDriverPath"></a><span class="summary-sig-name">getDriverPath</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">driverName</span>)</span><br />
Based on the component 'type' specified in the params , this method
will find the absolute path , by recursively searching the name of
the component.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.getDriverPath">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="step"></a><span class="summary-sig-name">step</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">stepDesc</span>)</span><br />
The step information of the test-case will append to the logs.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.step">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="case"></a><span class="summary-sig-name">case</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">testCaseName</span>)</span><br />
Test's each test-case information will append to the logs.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.case">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="testDesc"></a><span class="summary-sig-name">testDesc</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">description</span>)</span><br />
Test description will append to the logs.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.testDesc">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_getTest"></a><span class="summary-sig-name">_getTest</span>(<span class="summary-sig-arg">self</span>)</span><br />
This method will parse the test script to find required test
information.</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON._getTest">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="response_parser"></a><span class="summary-sig-name">response_parser</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">response</span>,
<span class="summary-sig-arg">return_format</span>)</span><br />
It will load the default response parser</td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.response_parser">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="response_to_dict"></a><span class="summary-sig-name">response_to_dict</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">response</span>,
<span class="summary-sig-arg">return_format</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.response_to_dict">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="dict_to_return_format"></a><span class="summary-sig-name">dict_to_return_format</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">response</span>,
<span class="summary-sig-arg">return_format</span>,
<span class="summary-sig-arg">response_dict</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.dict_to_return_format">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="get_random"></a><span class="summary-sig-name">get_random</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.get_random">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="exit"></a><span class="summary-sig-name">exit</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.exit">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.run">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The Execution of the test script's cases listed in the Test params
file will be done here. And Update each test case result. This method
will return TRUE if it executed all the test cases successfully, else
will retun FALSE</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="cleanup"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">cleanup</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="TestON.core.teston-pysrc.html#TestON.cleanup">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Print a summary of the current test's results then attempt to release
all the component handles and the close opened file handles.</p>
<p>This function shouldbe threadsafe such that cleanup will only be
executed once per test.</p>
<p>This will return TRUE if all the component handles and log handles
closed properly, else return FALSE.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="TestON-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>TestON</th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Mon Aug 10 11:12:35 2015
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>