Skip to content

Commit

Permalink
Merge pull request #9 from philspokas/session-8
Browse files Browse the repository at this point in the history
session 8 updates
  • Loading branch information
philspokas authored Nov 7, 2024
2 parents 596ffc3 + ce719e4 commit ced0f70
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 20 deletions.
29 changes: 23 additions & 6 deletions exercises/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,34 @@ Exercises below will use a Coalesce gnerated app. What the app does is not impor

If you already have an application deployed that can be used you can save yourself some time. However, we do want to keep the solution small in order to focus on the testing topic.

## Unit Tests
## Unit Tests and Code Coverage
By default, executing tests with dotnet test will fail a build if a build fails. Unit tests can also be used to generate code coverage results. Unit tests are
- Small, fast, cheap to execute
- do not require a deployed environment
- Fail build if unit tests fail

1. E
Add code coverage to an existing dotnet project by following https://learn.microsoft.com/en-us/training/modules/run-quality-tests-build-pipeline/6-perform-code-coverage

- Exercise is dotnet, coverage can be generated for other stacks
- Once running locally, verify code coverage and results in Azure Pipelines

https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage

## Integration Tests
Hit api endpoints that exercise
Integration tests test 2 or more services of an application. This typically requires a deployment. Containers including service containers are an approach for executing integration tests without a deployment.
Integration tests can be written in any testing framework
API endpoints

1. Call api endpoints provided by the application
1. Containers to exeucte without deploying
1. Deployment environmnet

Be sure to fail a build if tests fail. If using "dotnet test" style exeuction this will happen by default.

## Automated Functional Tests
1. Add Playwright tests to existing web application

## Functional Tests
Playwright
Executing manual tests with Azure Tests
## Manual Functional Tests
1. Create and execute manual tests with Azure Test Plans


34 changes: 22 additions & 12 deletions notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ https://learn.microsoft.com/en-us/training/modules/monitor-app-performance/
* Using Azure App Configuration Feature Flags
* Requirements Traceability Matrix
* use KeyVault during deployment
* test executiong tren
* test execution trend
* SAFe and boards
* Remove large binary with git rebase and git push --force
* JMeter
Expand All @@ -210,7 +210,7 @@ https://learn.microsoft.com/en-us/training/modules/monitor-app-performance/
* PowerShell DSC sample configuration
* Pipeline retention policies and leases
* Deployment groups
* DevOps Service Hooks and notifications
* DevOps Service Hooks and notifications https://learn.microsoft.com/en-us/azure/devops/service-hooks/overview?view=azure-devops
* Bicep
* Azure Deployment Environments
* Azure Automation State Configuration
Expand Down Expand Up @@ -245,9 +245,11 @@ https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azur
- Ansible: https://www.ansible.com/how-ansible-works/
- az repos: https://learn.microsoft.com/en-us/cli/azure/repos/policy/approver-count?view=azure-cli-latest
- pipeline reports: https://learn.microsoft.com/en-us/azure/devops/pipelines/reports/pipelinereport?view=azure-devops
- test analytics: https://learn.microsoft.com/en-us/azure/devops/pipelines/test/test-analytics?view=azure-devops

- status checks: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks
- env locks in pipelines: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass#exclusive-lock


- snyk and dbot: https://janaka.dev/devsecops-aking-snyk-github-dependabot-test-drive/
- code scan: https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql
- static analyzers: https://dev.to/dbalikhin/a-quick-comparison-of-security-static-code-analyzers-for-c-2l5h
Expand All @@ -268,27 +270,24 @@ https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azur
- ghd auth: https://docs.github.com/en/desktop/installing-and-authenticating-to-github-desktop/authenticating-to-github-in-github-desktop
- log analytics workspace arch: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/workspace-design
- otel sampling: https://learn.microsoft.com/en-us/previous-versions/azure/azure-monitor/app/sampling
- owasp dependency chec: https://owasp.org/www-project-dependency-check/
- devops security: https://learn.microsoft.com/en-us/azure/defender-for-cloud/devops-support
- Microsoft Security DevOps Azure DevOps https://learn.microsoft.com/en-us/azure/defender-for-cloud/azure-devops-extension


- Cloud devosp security https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-devops-introduction
- release notes generator https://github.com/azure-samples/azure-devops-release-notes/tree/main
- remove a large binary: https://learn.microsoft.com/en-us/azure/devops/repos/git/remove-binaries?view=azure-devops
- SAFe and Boards: https://learn.microsoft.com/en-us/azure/devops/boards/plans/safe-concepts?view=azure-devops&tabs=agile-process
- test execution trend: https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-test-plans-execution-trend?view=azure-devops&tabs=powerbi
- test execution trend report: https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-test-plans-execution-trend?view=azure-devops&tabs=powerbi
- metric widgets: https://marketplace.visualstudio.com/items?itemName=solidify.devops-metrics
- keyvault secure deployment: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/key-vault-parameter?tabs=azure-cli
- Requirements Traceability Matrix: https://www.wrike.com/blog/what-is-requirements-traceability-matrix/
- ADO Requirements Traceability: https://learn.microsoft.com/en-us/azure/devops/pipelines/test/requirements-traceability?view=azure-devops

- feature flags: https://learn.microsoft.com/en-us/azure/azure-app-configuration/quickstart-feature-flag-dotnet-background-service
- app config feature flags: https://learn.microsoft.com/en-us/azure/azure-app-configuration/manage-feature-flags?tabs=azure-portal

- DevOps Task for Azure Data Explorer: https://learn.microsoft.com/en-us/azure/data-explorer/devops
- Rate and usage limits: https://learn.microsoft.com/en-us/azure/devops/integrate/concepts/rate-limits?view=azure-devops&source=docs
- Azure DevOps Task for Azure Data Explorer: https://learn.microsoft.com/en-us/azure/data-explorer/devops
- Locking and git-lfs: https://github.com/git-lfs/git-lfs/wiki/File-Locking
- runsettings for unit tests: https://learn.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2022
- flaky tests: https://learn.microsoft.com/en-us/azure/devops/pipelines/test/flaky-test-management?view=azure-devops
- mermaid

* add badges
Expand All @@ -307,10 +306,21 @@ https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azur
* Deployment groups

## tests
https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/Instructions/Labs/AZ400_M03_L09_Set_Up_and_Run_Functional_Tests.html
- https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/Instructions/Labs/AZ400_M03_L09_Set_Up_and_Run_Functional_Tests.html
- runsettings for unit tests: https://learn.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2022
- flaky tests: https://learn.microsoft.com/en-us/azure/devops/pipelines/test/flaky-test-management?view=azure-devops
- test execution trend: https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-test-plans-execution-trend?view=azure-devops&tabs=powerbi
- test execution trend report: https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-test-plans-execution-trend?view=azure-devops&tabs=powerbi
- test analytics: https://learn.microsoft.com/en-us/azure/devops/pipelines/test/test-analytics?view=azure-devops



## Security
https://learn.microsoft.com/en-us/training/paths/implement-security-through-pipeline-using-devops/
- https://learn.microsoft.com/en-us/training/paths/implement-security-through-pipeline-using-devops/
- owasp dependency chec: https://owasp.org/www-project-dependency-check/
- devops security: https://learn.microsoft.com/en-us/azure/defender-for-cloud/devops-support
- Microsoft Security DevOps Azure DevOps https://learn.microsoft.com/en-us/azure/defender-for-cloud/azure-devops-extension


## Monitoring and Metrics
https://learn.microsoft.com/en-us/training/modules/automate-inspection-health/
Expand Down
Binary file added presentations/containers-101.pdf
Binary file not shown.
Binary file added presentations/session-7.pdf
Binary file not shown.
Binary file added presentations/session-8.pdf
Binary file not shown.
9 changes: 7 additions & 2 deletions schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,27 +158,32 @@ You can take as many assessments as you'd like.

## Session 7, Containers and Testing in pipelines<p/>Oct 29, 2024

<b><i>draft</i></b>
<details>

1. Containers 101
1. Container Exercises

</details>

## Session 8, Package management<p/>Oct 22, 2024

<b><i>draft</i></b>

1. test pyramid
1. running unit tests
1. integration tests
1. end to end tests
1. Zaproxy

## Session 9, Infrastructure as Code<p/>Nov 12, 2024

## Session 10, Security and compliance<p/>Nov 19, 2024

<details>
https://learn.microsoft.com/en-us/credentials/applied-skills/implement-security-through-pipeline-using-devops/
1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-devops-introduction
1. connect ADO to Defender: https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-devops
1. GitHub Advanced Security
1. ZAProxy
</details>

## Session 11, Monitoring and metrics<p/>Nov 26, 2024
Expand Down

0 comments on commit ced0f70

Please sign in to comment.