tag:help.appveyor.com,2012-11-13:/discussions/questions/3469-any-way-to-skip-unit-tests-for-certain-build-configsAppVeyor: Discussion 2018-10-19T08:18:15Ztag:help.appveyor.com,2012-11-13:Comment/421635302017-03-15T18:11:27Z2017-03-15T18:11:27ZAny way to skip unit tests for certain build configs?<div><p>You can switch from auto discovery to test script and call tests for specific configuration. YAML part might look like this:<br></p>
<pre>
<code>test_script:
- ps: IF ($envCONFIGURATION -eq "Release") {<test_command_appveyor_calls>}</code>
</pre>
<p><code><test_command_appveyor_calls></code> is what AppVeyor is calling when tests are auto-discovered. Or you can create <code>.ps1</code> test script and call it here.</p>
<p>Also if you decide to switch to test script, you will be needed to upload test results to AppVeyor, according to <a href="https://www.appveyor.com/docs/running-tests/#uploading-xml-test-results">documentation</a></p>
<p>Thanks!<br>
Ilya.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/421635302017-03-16T11:46:47Z2017-03-16T11:46:47ZAny way to skip unit tests for certain build configs?<div><p>why do the following test scripts produce no output?</p>
<p>test_script:<br>
- ps: write-host $envCONFIGURATION</p>
<p>test_script:<br>
- ps: write-host $CONFIGURATION</p>
<p>Liam</p></div>liam.kennedytag:help.appveyor.com,2012-11-13:Comment/421635302017-03-16T11:51:54Z2017-03-16T11:51:54ZAny way to skip unit tests for certain build configs?<div><p>ah, got it: $env:CONFIGURATION</p></div>liam.kennedytag:help.appveyor.com,2012-11-13:Comment/421635302017-03-16T12:02:09Z2017-03-16T12:02:09ZAny way to skip unit tests for certain build configs?<div><p>Working fine now.</p>
<p>Thanks!</p></div>liam.kennedy