## Why test? - [[The purpose of testing software systems]] - [[Objections to testing]] ## Other testing concepts - [[Testing identifies the symptoms, not necessarily the cause of software defects]]. - [[Defects should be identified as close to source as possible]] - The [[System under test]] - [[Test fixture]] - [[Production-fidelity testing]] - [[Shift left]] ## Designing a testing strategy for a software system - Traditional [[Testing pyramid]] (prioritise unit tests) vs [[Testing honeycomb]] (prioritise integration tests) - [[Exhaustive testing of a software product is not feasible]] - [[Testing trade-off triangle]] ## Testing levels Individual automated tests can be broadly categorised into the following buckets based on the *scope* of the [[System under test]]: - [[Unit testing]] - [[Integration testing]] - [[End to end testing]] - [[Categorising automated tests is hard]] Depending on the product and underlying architecture of the software system, these categories may be named differently, or be subdivided. ## Test authoring - [[Use the Arrange-Act-Assert pattern to structure automated test cases]] - [[How to measure if a test case is worth writing]] - [[Managing test data for automated tests]] ## Test execution - [[Testing frameworks]] - [[Run tests in parallel to minimise time-to-production]] - [[Flaky tests]] - Different types of tests can be run in [[The inner and outer loops of software development workflow]], some in both and some exclusively in one loop or the other ## Architecture-specific testing concerns - [[Serverless testing MOC]] - [[Testing microservices]] ## Other test types - [[Smoke testing]] ## #OpenQuestions - How would I draw a map/diagram overview of the software testing landscape WRT the different forms of testing and how they inter-relate? - The term "form" of testing (or "type" or "category") is not sufficiently specific for a lot of concepts I wish to convey. These "form"s vary across different dimensions. There are so many different ways testing can be sliced and diced. I want to get a better handle on the inter-relations of these dimensions. Are they a hierarchy or graph? Are there some natural groupings I can put these into? Some examples of these dimensions are: - WHAT — scope of the [[System under test|SUT]] (unit vs integration vs e2e) - WHEN a particular test is run (at dev time, pre-deployCICD, post-deploy CICD, production only) - WHERE a particular test is run (against which environment) - HOW — what techniques are employed in implementing the test (e.g. fuzzing, pentest, load test, [[Test double]]) - I think there's a concept of identifying the right boundary for a test. I'd like to find the correct terminology for this - [[When is hexagonal architecture a good fit for Lambda functions]] --- ## References - [Pain-riddled Twitter thread discussing opinions on testing](https://twitter.com/EmmaBostian/status/1397121064279416833) - [On the Diverse And Fantastical Shapes of Testing](https://martinfowler.com/articles/2021-test-shapes.html) by [[@Martin Fowler]] - [Test Heuristics cheat sheet](https://testobsessed.com/wp-content/uploads/2011/04/testheuristicscheatsheetv1.pdf) by [[@Elizabeth Hendrickson]] - [Twitter thread of testing resources](https://twitter.com/NicolaLindgren/status/1493947173733548041) shared by [[@Nicola Lindgren]] - [“WHY ARE MY TESTS SO SLOW?” A LIST OF LIKELY SUSPECTS, ANTI-PATTERNS, AND UNRESOLVED PERSONAL TRAUMA.](https://charity.wtf/2020/12/31/why-are-my-tests-so-slow-a-list-of-likely-suspects-anti-patterns-and-unresolved-personal-trauma/) by [[@Charity Majors]] --- tags: #SoftwareTesting, #SoftwareEngineering