GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - idubnori/ParallelTestingSample-dotnet-core: Sample for running dotnet core tests in parallel across multiple agents in Azure DevOps

BranchesTags
Open more actions menu

Latest commit

 

History

90 Commits
90 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
SliceTests
SliceTests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
ParallelTestingSample-dotnet.sln
ParallelTestingSample-dotnet.sln
 
 
README.md
README.md
 
 
azure-pipelines.yml
azure-pipelines.yml
 
 
create_slicing_filter_condition.sh
create_slicing_filter_condition.sh
 
 
global.json
global.json
 
 

Repository files navigation

ParallelTestingSample-dotnet-core

GitHub license Build Status Parallel Testing CI

This .NET 10 parallel testing sample uses --list-tests and --filter parameters of dotnet test to slice the tests. The tests are run using the NUnit.

This sample has the 100 tests, and slices them to 20 tests in 5 jobs. You can see the pipeline behavior result by clicking the build status badge above.

For the GitHub Actions equivalent, see the GitHub Actions overview.

Overview of azure-pipelines.yml

Setting up parallel count

jobs:
- job: 'ParallelTesting'
  pool:
    vmImage: 'ubuntu-latest'
  strategy:
    parallel: 5
  displayName: Run tests in parallel

Make slicing condition

  • Get test name list of all tests by using --list-tests parameter and grep Test_
  • create_slicing_filter_condition.sh makes filter condition to slice the tests, and set into $(targetTestsFilter)
  - bash: |
      tests=($(dotnet test . --no-build --list-tests | grep Test_))
      . 'create_slicing_filter_condition.sh' $tests
    displayName: 'Create slicing filter condition'

Run tests using slicing condition

 - task: DotNetCoreCLI@2
   displayName: Test
   inputs:
     command: test
     projects: '**/*Tests/*Tests.csproj'
     arguments: '--no-build --filter "$(targetTestsFilter)"'

References

  • Speed up testing by running tests in parallel - Azure Pipelines & TFS | Microsoft Docs

About

Sample for running dotnet core tests in parallel across multiple agents in Azure DevOps

Topics

azure-devopsazure-pipelinesdotnetdotnet-corenunit

Resources

Readme
MIT license
Activity

Stars

27 stars

Watchers

1 watching

Forks

30 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.