boeschenstein / testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing

Continuous Delivery (CD) Pipeline

From 'Continuous delivery and continuous deployment': https://youtu.be/bTGj4PeRPjs

  1. Source Control Management
  2. CI - Continuous Integration
    • Integration tests
    • Unit tests
  3. System Integration Tests (SIT)
  4. Operational Acceptance Tests (OAT)
  5. Security Tests (Pen)
  6. Compliance Tests
  7. Deploy
  8. Delivery

Azure Pipelines see: https://github.com/boeschenstein/AzureDevOps/blob/main/README.md

Seven Software Testing Principles

From: https://www.guru99.com/software-testing-seven-principles.html

  • Principle 1 Testing shows presence of defects
  • Principle 2 Exhaustive testing is impossible
  • Principle 3 Early Testing
  • Principle 4 Defect Clustering
  • Principle 5 Pesticide Paradox
  • Principle 6 Testing is context dependent
  • Principle 7 Absence of errors - fallacy

Continuous Integration (CI)

https://youtu.be/RcTFpNlkiUs

Unit Testing

image

TDD - Test driven Developmenet

what why how
unit functional autmated
integration acceptance semi-automated
component smoke manual
service exploratory
UI

Book: Succeeding with agile

costs Type number of tests
++++ Manual tests +
+++ UI tests ++
++ Service tests +++
+ Unit tests ++++

Acceptance Tests

  • Verify functionality
  • Language of business
  • Criteria of completeness
  • Full tests are problematic

How

  • Eliminate UI
  • Use In-Memory DB
  • Mock Infrastructure
  • Mock Cross-Cutting concernes

What

  • Focus on essential
  • Minimize coded UI-Test
  • Smoke tests instead
  • Minimize manual tests
  • Exploratory tests instead

xUnit

https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test

Fake: Stub vs Mock

Speak the same Language: https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-best-practices#lets-speak-the-same-language

Best Practices

https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-best-practices

Unit Test Helpers

Examples: https://github.com/boeschenstein/aspnetefcore5-specification/blob/main/README.md#unit-test-helpers

  • FluentAssertions
  • Moq
  • AutoMoqer/AutoMoqCore
  • Bogus, AutoBogus
  • AutoBogus / AutoFaker
  • AutoFixture

Unit Testing Tools

Advanced Testing

Information

About