<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2172/18/9/_/styles/combined.css?spaceKey=AST&amp;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/runtests+Configuration">runtests 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 (0)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>The <em>runtests</em> script has its own <em>test-config.yaml</em> configuration file.  This configuration file specifies global settings for the execution of the Asterisk Test Suite.</p>

<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>Many of the settings in the <em>runtests</em> script's <em>test-config.yaml</em> are for advanced execution of the Test Suite.  Often changing these values from the default will not be necessary.</td></tr></table></div>

<h2><a name="runtestsConfiguration-Specification"></a>Specification</h2>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>global-settings</td>
<td class='confluenceTd'> Defines settings that are applicable to all test configurations </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'> <em>Configuration Name</em> </td>
<td class='confluenceTd'> A test configuration that can be executed </td>
<td class='confluenceTd'> One or More </td>
</tr>
</tbody></table>
</div>


<h3><a name="runtestsConfiguration-globalsettings"></a>global-settings</h3>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>test-configuration</td>
<td class='confluenceTd'>Defines the test configuration to execute.  The value of this keyword must match a key defined at the same hierarchical level as the global-settings keyword</td>
<td class='confluenceTd'>Yes</td>
</tr>
<tr>
<td class='confluenceTd'>condition-definitions</td>
<td class='confluenceTd'>A sequence.  Defines the available Python modules for the Pre/Post Condition checking framework.</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>


<h4><a name="runtestsConfiguration-conditiondefinitions"></a>condition-definitions</h4>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'> name </td>
<td class='confluenceTd'> The alias name that a test uses to refer to this condition check pair </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'> pre </td>
<td class='confluenceTd'> The configuration information for the pre-test condition check object </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'> post </td>
<td class='confluenceTd'> The configuration information for the post-test condition check object </td>
<td class='confluenceTd'> Yes </td>
</tr>
</tbody></table>
</div>


<h5><a name="runtestsConfiguration-pre"></a>pre</h5>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'> typename </td>
<td class='confluenceTd'> The fully qualified name of the package.module.class to instantiate as a pre-condition </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>The python module search path is always appended with "lib/python"</td></tr></table></div>

<h5><a name="runtestsConfiguration-post"></a>post</h5>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'> typename </td>
<td class='confluenceTd'> The fully qualified name of the package.module.class to instantiate as a post-condition </td>
<td class='confluenceTd'> Yes </td>
</tr>
<tr>
<td class='confluenceTd'> related-type </td>
<td class='confluenceTd'> The fully qualified name of the package.module.class that specifies a pre-condition to inject into the instantiated post-condition object </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 python module search path is always appended with "lib/python"</td></tr></table></div>

<h3><a name="runtestsConfiguration-testconfiguration"></a>test-configuration</h3>

<p>A test-configuration entry can have any unique key name.  The value of <em>global-settings/test-configuration</em> must reference one of these unique key names.</p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>exclude-tests</td>
<td class='confluenceTd'>A sequence of test names to exclude from execution</td>
<td class='confluenceTd'>No</td>
</tr>
<tr>
<td class='confluenceTd'>properties</td>
<td class='confluenceTd'>Global properties that will be applied to all tests in the Test Suite</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>


<h4><a name="runtestsConfiguration-properties"></a>properties</h4>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>testconditions</td>
<td class='confluenceTd'>A sequence of key/value pairs, specifying the alias of a Pre/Post condition object to create for each test</td>
<td class='confluenceTd'>No</td>
</tr>
</tbody></table>
</div>


<h5><a name="runtestsConfiguration-testconditions"></a>testconditions</h5>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Keyword</th>
<th class='confluenceTh'>Value</th>
<th class='confluenceTh'>Required</th>
</tr>
<tr>
<td class='confluenceTd'>name</td>
<td class='confluenceTd'>The alias name of a Pre/Post condition pair to create for each test</td>
<td class='confluenceTd'>One or more</td>
</tr>
</tbody></table>
</div>


<h2><a name="runtestsConfiguration-Examples"></a>Examples</h2>

<h3><a name="runtestsConfiguration-SpecifyingaSubsetofTeststoExecute"></a>Specifying a Subset of Tests to Execute</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false"># Global settings
global-settings:
    # The active test configuration.  The value must match a subsequent key
    # in this file, which defines the global settings to apply to the test execution
    # run.
    test-configuration: config-fast

# Exclude all long-running tests (greater than one minute)
config-fast:
    exclude-tests:
        - 'authenticate_invalid_password'
        - 'check_voicemail_callback'
        - 'check_voicemail_delete'
        - 'check_voicemail_dialout'
        - 'check_voicemail_envelope'
        - 'check_voicemail_new_user'
        - 'check_voicemail_nominal'
        - 'check_voicemail_reply'
        - 'leave_voicemail_external_notification'
        - 'leave_voicemail_nominal'
        - 'gateway_g711_t38'
        - 'gateway_mix1'
        - 'gateway_mix2'
        - 'gateway_mix3'
        - 'gateway_mix4'
        - 'gateway_native_t38'
        - 'gateway_native_t38_ced'
        - 'gateway_no_t38'
        - 'gateway_t38_g711'
        - 'gateway_timeout1'
        - 'gateway_timeout2'
        - 'gateway_timeout3'
        - 'gateway_timeout4'
        - 'gateway_timeout5'

# Include all tests that can run under the installed version of Asterisk.
# It is included merely for completeness.
config-standard:</pre>
</div></div>

<h3><a name="runtestsConfiguration-SpecifyingPreandPostConditions"></a>Specifying Pre- and Post-Conditions</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false"># Global settings
global-settings:
    # The active test configuration.  The value must match a subsequent key
    # in this file, which defines the global settings to apply to the test execution
    # run.
    test-configuration: config-thread-checking

    # The following sequence defines for any test configuration the available pre-
    # and post-test conditions.  The 'name' field specifies how the test configurations
    # refer to the pre- and post-test conditions in order to activate them.
    condition-definitions:
            -
                name: 'threads'
                pre:
                    typename: 'asterisk.ThreadTestCondition.ThreadPreTestCondition'
                post:
                    typename: 'asterisk.ThreadTestCondition.ThreadPostTestCondition'
                    related-type: 'asterisk.ThreadTestCondition.ThreadPreTestCondition'

# This test enables the pre- and post-test condition for threads on all tests
# that support it.  Individual tests can override the behavior of a pre-
# and post-test condition check in their test-config.yaml files.
config-thread-checking:
    properties:
        testconditions:
            - name: 'threads'</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/runtests+Configuration">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=20185467&revisedVersion=7&originalVersion=6">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/AST/runtests+Configuration?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>