Arcade: Helix: Unable to use xunit test runner provided

Created on 13 Feb 2020  路  7Comments  路  Source: dotnet/arcade

  • Is this issue blocking no
  • Is this issue causing unreasonable pain no

I used following yml file in AzDo pipeline to run tests in helix. It is using the template coming from arcade send-to-helix.yml
https://github.com/dotnet/efcore/blob/3bb820d22911a1cbd911e13ddf366b317b43e78e/azure-pipelines.yml
Notice, I am using netcoreapp3.1
It failed with error message that
The application to execute does not exist: 'C:\h\w\AAD00963\p/xunit-runner/tools/netcoreapp3.1/xunit.console.dll'
https://helix.dot.net/api/2019-06-17/jobs/6494ff66-71fe-40c9-9dd6-2c8936e1a6a8/workitems/Microsoft.EntityFrameworkCore.Tests.dll/console

I tried using netcoreapp3.0 also it failed with same error. Is there any missing configuration causing the error?

First Responder

All 7 comments

@jonfortescue - any chance maybe you could lend a hand?

Looking into this!

Ah, yeah, I know the issue here. There is no xunit runner for netcoreapp3.0+. You'll need to define those variables separately: XUnitPublishTargetFramework needs to be netcoreapp3.1 and XUnitRuntimeTargetFramework needs to be netcoreapp2.0. The old xunit runner should still work for your tests.

@jonfortescue - That indeed worked. Thank you.

glad it's working!

Sorry for commenting on closed issue but it is related.
As said earlier, the yaml file worked. So I attempted to convert to using a proj file as per documentation.

This is the yaml file I am using in pipeline. https://github.com/dotnet/efcore/blob/52c3032473fd936fcaca9a0f2936b1642c8031cf/azure-pipelines.yml
and the added helix.proj file https://github.com/dotnet/efcore/blob/52c3032473fd936fcaca9a0f2936b1642c8031cf/eng/helix.proj

Based on documentation I thought both the above configuration would yield same results. Though using helix.proj approach, I am hitting error in helix work-item
The specified runtimeconfig.json [Microsoft.EntityFrameworkCore.Tests.runtimeconfig.json] does not exist
https://helix.dot.net/api/2019-06-17/jobs/72ddf4b4-671b-4e62-840b-d1c9f85ec955/workitems/Microsoft.EntityFrameworkCore.Tests.dll/console

If I run it locally from command line, it is working fine. (Also the missing file is available in payloaddirectory). It is failing in azure pipeline only. https://dev.azure.com/dnceng/public/_build/results?buildId=520730&view=logs&j=bb592630-4b9d-53ad-3960-d954a70a95cf&t=64f3f9f9-abe3-5a84-ba26-121caf6b0108

Where did I make mistake?

Your MSBuild command is missing the /restore /t:Test parameters. We add those in the template to ensure all the files are there in the published output. I have a working build here.

Was this page helpful?
0 / 5 - 0 ratings