Skip to content

A repository to support FJ's Friday fundamentals talk on DevOps practices

Notifications You must be signed in to change notification settings

garrardkitchen/friday-fundamentals-cicd

Repository files navigation

Purpose

This codebase has been created to demonstrate good DevOps practices such as CI, CD and test automation practices.

This project consists of:

  • Azure DevOps Pipelines (/.azdo/pipelines) - PR, CI & CD
  • Application Code (/src) - Web and API
  • Test code (/test) - Integration (L3), E2E (L4) and unit testing (L0, L1)

These test, and code coverage, are included as pipeline artefacts.

I use (docker-compose) to orchestrate the hosting of the API HTTP Listener so I can assert Integration tests.

Getting started

Inner loop

Run .\winterm to open Windows Terminal with pre-configured sln tabs

Testing

Unit

Api:

cd UnitTesting
dotnet test --filter "TestCategory=L0" -v 4 
dotnet test --filter "TestCategory=L1" -v 4 
dotnet test --filter "TestCategory=L0|TestCategory=L1" -v 4

Web:

```powershell
cd UnitTesting_Web
dotnet test --filter "TestCategory=L0" -v 4 

Integration

cd UnitTestingTesting
dotnet test --filter "TestCategory=L3" -v 4

E2E

cd End2EndTesting
bin/Debug/net6.0/playwright.ps1 install --with-deps
dotnet test --filter "Category=L4" 

Code Coverage

dotnet test --collect "XPlat Code Coverage" --settings .runsettings.xml --logger trx --results-directory ./TestResults /p:Exclude="[*]*Startup%2c[*]*Program"
reportgenerator "-reports:TestResults/**/*.xml" "-targetdir:TestResults\Coverage" -reporttypes:Html --settings .\.runsettings.xml

https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md

About

A repository to support FJ's Friday fundamentals talk on DevOps practices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published