Created
October 2, 2023 21:22
-
-
Save Sweekriti91/f18d49faddf5a66ba0afa1357ddce719 to your computer and use it in GitHub Desktop.
AzDO dotnetTest rerun VSTest@3 Task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger: | |
- main | |
pool: | |
vmImage: 'windows-2022' | |
demands: | |
- MSBuild | |
steps: | |
- task: DotNetCoreCLI@2 | |
displayName: Restore NuGet Packages | |
inputs: | |
command: 'restore' | |
projects: 'SweekyApp.sln' | |
- task: DotNetCoreCLI@2 | |
displayName: Build Test Project | |
inputs: | |
command: 'build' | |
projects: 'SweekyxTest\SweekyxTest.csproj' | |
arguments: '--configuration Debug' | |
- task: VSTest@3 | |
inputs: | |
testSelector: 'testAssemblies' | |
testAssemblyVer2: | | |
**\bin\Debug\net7.0\**\*test*.dll | |
**\bin\Debug\net7.0\**\*Test*.dll | |
!**\obj\** | |
!**\ref\** | |
!**\xunit.runner.visualstudio.testadapter.dll | |
!**\xunit.runner.visualstudio.dotnetcore.testadapter.dll | |
!**\xunit.runner.reporters.netcoreapp10.dll* | |
!**\xunit.runner.utility.netcoreapp10.dll* | |
!**\xunit.runner.visualstudio.dotnetcore.testadapter.dll* | |
searchFolder: '$(System.DefaultWorkingDirectory)' | |
codeCoverageEnabled: true | |
rerunFailedTests: true | |
rerunType: 'basedOnTestFailureCount' | |
rerunFailedTestCasesMaxLimit: '10' | |
rerunMaxAttempts: '2' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment