<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+Hierarchy">Test Hierarchy</a></h2>
<h4>Page <b>added</b> by <a href="https://wiki.asterisk.org/wiki/display/~mjordan">Matt Jordan</a>
</h4>
<br/>
<div class="notificationGreySide">
<p>Tests are 'discovered' by the <em>runtests.py</em> script during run time of the Asterisk Test Suite. The <em>runtests.py</em> script discovers tests by parsing <em>tests.yaml</em> files. The first <em>tests.yaml</em> file searched is always <em>tests/tests.yaml</em>.</p>
<p>A <em>tests.yaml</em> file always contains the the keyword <b>tests</b>, which contains a sequence of either directories to search for more tests in, or test directories to execute.</p>
<h2><a name="TestHierarchy-Specification"></a>Specification</h2>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
</tr>
<tr>
<td class='confluenceTd'> tests </td>
<td class='confluenceTd'> A sequence of 'test' or 'dir' key/value pairs </td>
</tr>
<tr>
<td class='confluenceTd'> test </td>
<td class='confluenceTd'> Child of 'tests'. Specifies a test directory to execute </td>
</tr>
<tr>
<td class='confluenceTd'> dir </td>
<td class='confluenceTd'> Child of 'tests'. Specifies a directory to search for more tests </td>
</tr>
</tbody></table>
</div>
<h2><a name="TestHierarchy-Example"></a>Example</h2>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">tests:
- test: 'example'
- test: 'dynamic-modules'
- dir: 'manager'
- test: 'rfc2833_dtmf_detect'
- dir: 'iax2'
- dir: 'cdr'</pre>
</div></div>
</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+Hierarchy">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Test+Hierarchy?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>