<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2172/18/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Test+Configuration">Test Configuration</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~mjordan">Matt Jordan</a>
</h4>
<br/>
<h4>Changes (9)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" > <br>||Keyword||Description||Required|| <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">|minversion|<span class="diff-added-chars"style="background-color: #dfd;">The minimum version of Asterisk necessary to run the test|Yes|</span></span> <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">|maxversion|<span class="diff-added-chars"style="background-color: #dfd;">The maximum version of Asterisk that this test can exeucte under|No|</span></span> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">|features|A sequence of feature specifies that the version of Asterisk under test must support.|No| <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">|dependencies|<span class="diff-added-chars"style="background-color: #dfd;">The Asterisk modules and third party applications/libraries necessary to run the test|No|</span></span> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">|expectedResult|The expected result of the test. Setting this to False will cause the test to pass if the test returns failure|No| <br>|testconditions|Settings that override the _runtests_ script's _test-config.yaml_ pre/post condition test settings|No| <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">|tags|<span class="diff-added-chars"style="background-color: #dfd;">A sequence of tags that categorize the test into groups of similar functionality|No|</span></span> <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h4. dependencies <br> <br>{note} <br>Any of the keywords listed below can occur multiple times <br>{note} <br> <br>||Keyword||Description||Required|| <br>|app|An external application that must be present for the test to execute|No| <br>|asterisk|An asterisk module that must be installed for the test to execute|No| <br>|buildoption|An option that must be enabled in the Asterisk build for the test to execute|No| <br>|pcap|If present, import the yappcap library as a dependency for test execution|No| <br>|python|A python module that must be available. Note that an attempt will be made to import the module (using __import__) specified by the value of this keyword|No| <br>|sipp|Specifies attributes of SIPp that must be present for this test to execute|No| <br>|custom|Execute a custom dependency function. The function must be defined in the Dependency class in the TestConfig module, and must be declared as "depend_%s", where %s is the value specified by the custom keyword|No| <br> <br>h5. sipp <br> <br>||Keyword||Description||Required|| <br>|version|The minimum version of SIPp needed to execute the test| <br>|feature|A feature that SIPp must be compiled with in order to execute the test| <br> <br>h4. testconditions <br> <br>||Keyword||Description||Required|| <br>|name|The alias name for the pre/post condition test object whose settings should be overridden|Yes| <br> <br>{note} <br>Each pre/post test condition pair defines their own configuration, and are not documented here. <br>{note} <br> <br></td></tr>
<tr><td class="diff-unchanged" >h3. test-modules <br> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">||Keyword||Description||Required|| <br>|test-object|Defines the primary object that orchestrates test execution|Yes| <br>|modules|A sequence that defines optional pluggable modules to inject into the test object|No| <br> <br>h4. test-object <br> <br>||Keyword||Description||Required|| <br>|config-section|The keyword in the _test-config.yaml_ file that provides the configuration for the test object|Yes| <br>|typename|The fully qualified package.module.class to instantiate as the test object|Yes| <br> <br>h4. modules <br> <br>||Keyword||Description||Required|| <br>|config-section|The keyword in the _test-config.yaml_ file that provides the configuration for the module|Yes| <br>|typename|The fully qualified package.module.class to instantiate as the module|Yes| <br>|load-from-path|Optionally, specify the path where the pluggable module should be imported from|No| <br>|load-from-test|Optionally, if true, load from the test directory|No| <br> <br>{note} <br>The options load-from-path and load-from-test are mutually exclusive. <br>{note} <br> <br></td></tr>
<tr><td class="diff-unchanged" >h2. Examples <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;"> <br>h3. Simple Test <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<p>Every test has a <em>test-config.yaml</em> file that serves four purposes:</p>
<ul>
        <li>It describes and documents the test</li>
        <li>It determines what necessary attributes an installation of Asterisk must have in order to run the test</li>
        <li>It determines what software must exist on a test system to run the test</li>
        <li>It configures attributes of the test</li>
</ul>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Some modules are configured via a test's <em>test-config.yaml</em> file. As those modules determine their own configuration, those configuration options are documented elsewhere.</td></tr></table></div>
<h2><a name="TestConfiguration-Specification"></a>Specification</h2>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'> test-info </td>
<td class='confluenceTd'> Section that describes basic information about the test </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'> properties </td>
<td class='confluenceTd'> Contains properties that define how the test executes </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'> test-modules </td>
<td class='confluenceTd'> Modules to load for tests that use the Test Suite's pluggable framework </td>
<td class='confluenceTd'> No </td>
</tr>
</tbody></table>
</div>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>If using the Test Suite's pluggable framework, the test-modules block is required.</td></tr></table></div>
<h3><a name="TestConfiguration-testinfo"></a>test-info </h3>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>summary</td>
<td class='confluenceTd'>A summary of what the test does</td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'>description</td>
<td class='confluenceTd'>A detailed description of what functionality is covered by the test </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'>skip</td>
<td class='confluenceTd'>If true, skip execution of this test</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>issues</td>
<td class='confluenceTd'>A sequence of key/value pairs specifying issues in an issue tracker related to this test</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>
<h4><a name="TestConfiguration-issues"></a>issues</h4>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>mantis</td>
<td class='confluenceTd'>A mantis issue identifier</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>jira</td>
<td class='confluenceTd'>A JIRA issue identifier</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>
<h3><a name="TestConfiguration-properties"></a>properties</h3>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>minversion</td>
<td class='confluenceTd'>The minimum version of Asterisk necessary to run the test</td>
<td class='confluenceTd'>Yes</td>
</tr>
<tr>
<td class='confluenceTd'>maxversion</td>
<td class='confluenceTd'>The maximum version of Asterisk that this test can exeucte under</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>features</td>
<td class='confluenceTd'>A sequence of feature specifies that the version of Asterisk under test must support.</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>dependencies</td>
<td class='confluenceTd'>The Asterisk modules and third party applications/libraries necessary to run the test</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>expectedResult</td>
<td class='confluenceTd'>The expected result of the test. Setting this to False will cause the test to pass if the test returns failure</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>testconditions</td>
<td class='confluenceTd'>Settings that override the <em>runtests</em> script's <em>test-config.yaml</em> pre/post condition test settings</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>tags</td>
<td class='confluenceTd'>A sequence of tags that categorize the test into groups of similar functionality</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>
<h4><a name="TestConfiguration-dependencies"></a>dependencies</h4>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Any of the keywords listed below can occur multiple times</td></tr></table></div>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>app</td>
<td class='confluenceTd'>An external application that must be present for the test to execute</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>asterisk</td>
<td class='confluenceTd'>An asterisk module that must be installed for the test to execute</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>buildoption</td>
<td class='confluenceTd'>An option that must be enabled in the Asterisk build for the test to execute</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>pcap</td>
<td class='confluenceTd'>If present, import the yappcap library as a dependency for test execution</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>python</td>
<td class='confluenceTd'>A python module that must be available. Note that an attempt will be made to import the module (using _<em>import</em>_) specified by the value of this keyword</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>sipp</td>
<td class='confluenceTd'>Specifies attributes of SIPp that must be present for this test to execute</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>custom</td>
<td class='confluenceTd'>Execute a custom dependency function. The function must be defined in the Dependency class in the TestConfig module, and must be declared as "depend_%s", where %s is the value specified by the custom keyword</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>
<h5><a name="TestConfiguration-sipp"></a>sipp</h5>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>version</td>
<td class='confluenceTd'>The minimum version of SIPp needed to execute the test</td>
</tr>
<tr>
<td class='confluenceTd'>feature</td>
<td class='confluenceTd'>A feature that SIPp must be compiled with in order to execute the test</td>
</tr>
</tbody></table>
</div>
<h4><a name="TestConfiguration-testconditions"></a>testconditions</h4>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>name</td>
<td class='confluenceTd'>The alias name for the pre/post condition test object whose settings should be overridden</td>
<td class='confluenceTd'>Yes</td>
</tr>
</tbody></table>
</div>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Each pre/post test condition pair defines their own configuration, and are not documented here.</td></tr></table></div>
<h3><a name="TestConfiguration-testmodules"></a>test-modules</h3>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>test-object</td>
<td class='confluenceTd'>Defines the primary object that orchestrates test execution</td>
<td class='confluenceTd'>Yes</td>
</tr>
<tr>
<td class='confluenceTd'>modules</td>
<td class='confluenceTd'>A sequence that defines optional pluggable modules to inject into the test object</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>
<h4><a name="TestConfiguration-testobject"></a>test-object</h4>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>config-section</td>
<td class='confluenceTd'>The keyword in the <em>test-config.yaml</em> file that provides the configuration for the test object</td>
<td class='confluenceTd'>Yes</td>
</tr>
<tr>
<td class='confluenceTd'>typename</td>
<td class='confluenceTd'>The fully qualified package.module.class to instantiate as the test object</td>
<td class='confluenceTd'>Yes</td>
</tr>
</tbody></table>
</div>
<h4><a name="TestConfiguration-modules"></a>modules</h4>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Description</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>config-section</td>
<td class='confluenceTd'>The keyword in the <em>test-config.yaml</em> file that provides the configuration for the module</td>
<td class='confluenceTd'>Yes</td>
</tr>
<tr>
<td class='confluenceTd'>typename</td>
<td class='confluenceTd'>The fully qualified package.module.class to instantiate as the module</td>
<td class='confluenceTd'>Yes</td>
</tr>
<tr>
<td class='confluenceTd'>load-from-path</td>
<td class='confluenceTd'>Optionally, specify the path where the pluggable module should be imported from</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>load-from-test</td>
<td class='confluenceTd'>Optionally, if true, load from the test directory</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The options load-from-path and load-from-test are mutually exclusive.</td></tr></table></div>
<h2><a name="TestConfiguration-Examples"></a>Examples</h2>
<h3><a name="TestConfiguration-SimpleTest"></a>Simple Test</h3>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Test+Configuration">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=20185507&revisedVersion=3&originalVersion=2">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Test+Configuration?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>