<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+Test+Configuration">Runtests Test Configuration</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>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 will not be necessary.</td></tr></table></div>

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

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

<h3><a name="RuntestsTestConfiguration-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="RuntestsTestConfiguration-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+Test+Configuration">View Online</a>
              |
       <a href="https://wiki.asterisk.org/wiki/display/AST/Runtests+Test+Configuration?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>