Vctest.exe can't find tests in an assembly

Vassili Voronkov's Avatar

Vassili Voronkov

24 Apr, 2019 08:05 PM

HI!
I am trying to run tests using the following command line:
vstest.console /logger:Appveyor <assembly>

I am receiving the following message:
Warning: No test is available in ...Dyalect.UnitTests.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.

The same command runs fine locally. Is there is something I forgot to configure?

Thanks in advance.

  1. Support Staff 1 Posted by Owen McDonnell on 24 Apr, 2019 11:10 PM

    Owen McDonnell's Avatar

    Can you please link to the build and share your configuration in yaml format.

  2. 2 Posted by Vassili Voronko... on 25 Apr, 2019 05:29 AM

    Vassili Voronkov's Avatar

    This is my last build:
    https://ci.appveyor.com/project/vorov2/dyalect

    And I am not using yml configuration file.

    Thanks!

  3. Support Staff 3 Posted by Owen McDonnell on 25 Apr, 2019 08:17 PM

    Owen McDonnell's Avatar

    You can go to Project settings -> Export Yaml tab to export a .yml config file.

  4. 4 Posted by Vassili Voronko... on 26 Apr, 2019 09:52 AM

    Vassili Voronkov's Avatar

    This is my complete Yaml at the moment:

    version: 1.0.{build}
    image: Visual Studio 2017
    build_script:
    - cmd: dotnet build c:\projects\dyalect\Dyalect.sln

    No tests are being discovered.

  5. Support Staff 5 Posted by Owen McDonnell on 26 Apr, 2019 02:19 PM

    Owen McDonnell's Avatar

    Try to run this locally with the same command that AppVeyor generates nunit3-console c:\projects\dyalect\Dyalect.UnitTests\bin\Debug\Dyalect.UnitTests.dll --result=myresults.xml;format=AppVeyor and let us know the result.

  6. 6 Posted by Vassili Voronko... on 27 Apr, 2019 07:29 AM

    Vassili Voronkov's Avatar

    It all works fine for me locally (if I remove format=AppVeyor). I thought that may be the reason of this problem that I am using a manual command for build and not MSBuild. So I tried to switch to MSBuild and now see errors like:

    C:\Program Files\dotnet\sdk\2.2.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(208,5): error NETSDK1004: Assets file 'C:\projects\dyalect\Dyalect\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\projects\dyalect\Dyalect\Dyalect.csproj]

    The strange thing is that assets.json is clearly available in obj folder when I build locally.

  7. Support Staff 7 Posted by Owen McDonnell on 28 Apr, 2019 05:21 AM

    Owen McDonnell's Avatar

    It's quite difficult to understand your project history with changes to UI commands, changes to csproj files, changes in testing frameworks etc.

    Please point to a single build for which you think the build VM is failing and explain what you think expected behaviour should be. Also, post what your configuration was for that specific build.

  8. Ilya Finkelshteyn closed this discussion on 28 Jun, 2019 09:01 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

 

22 Aug, 2019 08:13 PM
21 Aug, 2019 11:06 PM
21 Aug, 2019 02:08 PM
21 Aug, 2019 01:37 PM
21 Aug, 2019 10:21 AM
21 Aug, 2019 05:56 AM