How to specify wildcards to match test assemblies in appveyor.yml

James Skimming's Avatar

James Skimming

29 Aug, 2014 10:10 AM

I'm trying to specify a wildcard to match on the test assemblies in appveyor.yml, using the following:

test:
  assemblies:
    - *\*.UnitTests.dll

When the build runs it fails immediately with the following error:

Error parsing appveyor.yml: (Lin: 52, Col: 6, Chr: 1452) - (Lin: 52, Col: 7, Chr: 1453): While scanning an anchor or alias, did not find expected alphabetic or numeric character.

I can work around this by specifying the tests to execute directly, but I want to have them picked up automatically. I can't use the default settings as that also fails, because it's trying to load a common assembly that references xUnit, but it then fails because it's referencing an old version of xUnit and it errs when resolving assemblies.

  1. Support Staff 1 Posted by Feodor Fitsner on 29 Aug, 2014 08:19 PM

    Feodor Fitsner's Avatar

    Surrounding the value with single quotes should do the trick:

    test:
      assemblies:
        - '*\*.UnitTests.dll'
    
  2. 2 Posted by James Skimming on 01 Sep, 2014 06:59 PM

    James Skimming's Avatar

    That's work in so far as the Error parsing appveyor.yml issue, but now no test assemblies are found.

    Previously I has this configuration:

    test:
      assemblies:
        - Test.Assembly1.UnitTests.dll
        - Test.Assembly.SomeNamespace2.UnitTests.dll
        - Test.Assembly.SomeNamespace3.UnitTests.dll
        - Test.Assembly.SomeNamespace4.UnitTests.dll
    

    And all the tests from those 4 assemblies were executed, but now with this configuration:

    test:
      assemblies:
        - '*\*.UnitTests.dll'
    

    No assemblies are discovered.

    I've also tried '*UnitTests.dll' but to no avail.

  3. Support Staff 3 Posted by Feodor Fitsner on 01 Sep, 2014 07:16 PM

    Feodor Fitsner's Avatar

    Try '**\*.UnitTests.dll'

    -Feodor

  4. 4 Posted by James Skimming on 01 Sep, 2014 08:17 PM

    James Skimming's Avatar

    That fixed it. Could you update the Running tests documentation as it gives '*\*.tests.dll' as the example.

  5. Support Staff 5 Posted by Feodor Fitsner on 01 Sep, 2014 08:22 PM

    Feodor Fitsner's Avatar

    Sure, fixed. Thanks!

  6. 6 Posted by James Skimming on 01 Sep, 2014 09:08 PM

    James Skimming's Avatar

    Great thanks.

  7. James Skimming closed this discussion on 01 Sep, 2014 09:09 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

03 Oct, 2024 07:07 PM
01 Oct, 2024 05:06 PM
01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM