Dotnet test command throws Elevated Mocking exception for Unit tests in Azure Devops

2 Answers 352 Views
Integrations
Chandra
Top achievements
Rank 1
Chandra asked on 19 Oct 2021, 07:50 AM

Hi,

I am trying to run to  Dotnet Test command for .NetCore dll in Azure Devops and It throws exception for some tests saying elevated Mocking Exception.

 

Comand Used is

taskDotNetCoreCLI@2
  displayNamedotnet test - Unit Tests
  inputs:
    commandtest
    projects'**/*.UnitTest.csproj'
    arguments--no-build --configuration $(BuildConfiguration) --logger trx --collect "Code coverage" /p:CollectCoverage=true /p:Threshold=0 /p:ThresholdType=line /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage /p:ExcludeByAttribute="DebuggerNonUserCodeAttribute" /p:ExcludeByFile=\"**/obj/**/*.cs"
    testRunTitleUnit Tests

2 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 19 Oct 2021, 12:32 PM

Hello Chandra,

I hope this blog post could help you with this issue. If you are still having troubles, please let me know, I will be happy to assist you further.

Regards,
Ivo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Yanrafo
Top achievements
Rank 1
Iron
answered on 06 Jul 2022, 04:34 AM
Thank you ivo for the great blog post 1v1 lol unblocked

Tags
Integrations
Asked by
Chandra
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Yanrafo
Top achievements
Rank 1
Iron
Share this question
or