• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • esc pour rejeter
⌘ '
raccourcis clavier

See also: ReviewsAndEvaluation.LNs.FULL, CoverageMetrics.LNs.FULL, TestingContext.LNs.FULL TestingClassification.LNs.FULL UTandTDD.Additional.LNs

Evaluations Methods

Testing Context

See also: link

Software can be:

  • Shrinkwrap or COTS
  • Internal
  • Embedded
  • Games
  • Throwaway

Defect

Also known as the flaw in the system

Error

Human mistake that introduces the said defect in the system

Failure

Manifestation of the defect while executing the system

AspectExploratory TestingSpecification-based TestingModel-based TestingFuzz TestingPartition TestingBoundary TestingCoverage-based Testing
Primary GoalDiscover unexpected issuesVerify requirements complianceGenerate systematic testsFind security/stability issuesTest equivalent input classes, or disjoint groupsFind edge case defectsEnsure code path execution
When to UseEarly development, UI/UX testingFormal systems, Safety-criticalComplex systems, Large test suitesSecurity testing, Robustness checksInput validation, Data boundariesRange limits, State transitionsCode completeness verification
Test CreationAd-hoc, During executionDerived from specificationsGenerated from modelsAutomated input generationSystematic division of inputsAnalysis of boundary conditionsBased on code structure
DocumentationLimited, Post-executionExtensive, Pre-plannedModel documentationAutomated reportsInput class definitionsBoundary condition specsCoverage reports & metrics
Automation LevelLowMedium to HighHighVery HighMediumMedium to HighVery High
CostLow initial, High expertiseHigh initial, Low runningHigh initial, Low runningMedium initial, Low runningLow initial, Medium runningMedium initial, Medium runningHigh initial, Low running
Learning CurveMediumHighHighMediumLowLowMedium to High
Testing ApproachBlack BoxGrey BoxWhite BoxNotesStaticDynamicNotesFunctionalNon-FunctionalNotes
Exploratory TestingCan be done at any level, but typically black/grey boxAlways requires running the systemCan explore both functional behavior and qualities like usability
Specification-based TestingBased on external specifications, internal code knowledge not neededCan be both - static analysis of specs or dynamic executionCan test both functional and non-functional requirements
Model-based TestingUsually black/grey box as based on system modelsStatic model analysis and dynamic test executionModels can represent both behavior and qualities
Fuzz TestingTypically done without code access, but can be enhanced with structure knowledgeRequires actual execution with generated inputsPrimarily tests robustness, security, stability
Partition TestingCan be done with or without code knowledgeCan analyze partitions statically, but usually involves executionFocuses on functional behavior through input space
Boundary TestingSimilar to partition testing, can be done at any levelCan identify boundaries statically, but usually involves executionTests functional behavior at input boundaries
Coverage-based TestingRequires access to source code to measure coverageRequires code execution to measure coveragePrimarily about functional code execution
Fault InjectionUsually requires code or binary accessRequires running the system to see effect of injected faultsTests system resilience and error handling

QA Process

Waterfall versus. V-model versus. Agile

V-model: RA syde architecture module design coding unit-testing integration-testing system testing acceptance testing

iterative: RA Analysis & Design Testing Evaluation Planning

graph TD
    A[Requirements Analysis] --> |Requirements| B[Test Planning]
    B --> |Test Strategy & Testbed & Test Plan & Traceability Matrix| C[Test Development]
    C --> |Test procedures & Test cases & Test scenarios| D[Test Execution]
    D --> |Fault reports| E[Test Reporting]
    E --> |Test report| F[Test Result Analysis]
    F --> |Faults prioritization| A

Black-Box Testing

Black-box testing focuses on the functionality of the software without considering its internal structure or implementation.

Grey-Box Testing

Grey-box testing combines elements of both black-box and white-box testing. It involves some knowledge of the internal structure but focuses on the functionality.

White-Box Testing

White-box testing involves testing the internal structure or workings of an application, as opposed to its functionality.

Fault Injection

  • Deliberately introduces faults
  • Tests system robustness
  • Types:
    • Compile-time (source code changes)
    • Runtime (dynamic triggers)
    • Mutation testing (systematic code changes)

Unit Testing and TDD

see also: https://martinfowler.com/bliki/UnitTest.html https://martinfowler.com/bliki/IntegrationTest.html

The whole purpose of TDD is to write a few test cases first, then update implementation to meet the minimal pass the tests, then incrementally add more tests to provide additional business logic to core functions.

Unit Testing

  • Definition: Unit tests focus on small parts of the software system, typically individual functions or classes.
  • Characteristics:
    • Written by programmers using regular tools and a unit testing framework.
    • Expected to be fast, allowing frequent execution during development.
    • Can be solitary (isolation) or sociable (dependent on others).
  • Purpose: To quickly identify issues in small, isolated parts of the codebase.
  • Frequency: Run frequently, often after every code change, to catch defects early.

Integration Testing

  • Definition: Integration tests check if independently developed units of software work correctly when connected.
  • Characteristics:
    • Can be broad (testing entire systems or subsystems) or narrow (testing specific interactions between units).
    • Narrow integration tests use test doubles to simulate dependencies, making them faster and easier to run.
    • Broad integration tests require live versions of all services, making them more complex and slower.
  • Purpose: To ensure that different parts of the system work together as expected.
  • Frequency: Narrow integration tests can run early in the development pipeline, providing quick feedback. Broad integration tests are often run less frequently due to their complexity.

Coverage Metrics

Goal:

  • find and fix maximum number of bugs
  • Know if we have undiscovered bugs
  • Comply with standards
  • Do testing with minimum time and costs
  • diagrams for testing flow
    figure1: diagrams for testing flow

Measurement

mapping from empirical world to formal/ relational world, or also known as symbol for a given entity

Software Metrics

standards gives some attributes of interests

Coverage would be Executed OutcomesTotal Outcomes×100\frac{\text{Executed Outcomes}}{\text{Total Outcomes}} \times 100

  • Branch
  • Condition
  • Condition/Decision
  • Modified Condition/Decision

Path coverage would be Executed Unique PathsTotal Unique Paths×100\frac{\text{Executed Unique Paths}}{\text{Total Unique Paths}}\times 100

Note

Path coverage is not the same as exhaustive testing

Statement coverage would be Executed StatementsTotal Statements×100\frac{\text{Executed Statements}}{\text{Total Statements}} \times 100

Branch coverage (each branch, or CFG edge) would be Executed BranchesTotal Branches×100\frac{\text{Executed Branches}}{\text{Total Branches}} \times 100

Condition is the same but with evaluated to either True or False

Mutiple Condition Coverage (MCC) are the combinations of each decisions to either T/F

Modified Condition/Decision Coverage (MC/DC) are achieved either 100% branch cov, 100% condition coverage, and each condition independently affect the decision outcome, each entry/exit point is executed

for nn conditions, MCC requires 2n2^n test cases, whereas MC/DC only requires n+1n+1 !!

Tip: Build a truth table for MC/DC

Important

MC/DC is less expensive that MCC, but still expensives

and Structural Coverage is NOT Structural testing

Criteria Subsumption

Criterion A subsumes criterion B if every test set that satisfies A also satisfies B

Control Flow Graph (CFG)

think of state diagrams, same thing

Testing techniques

Classified by:

  • System State
  • Code Visibility
  • System Requirements
  • Level of System Detail

static testing

testing the code system without executing it

  • detect defects early

white box

testing that systematically exploit knowledge of the system to design tests for it

  • integrating an API
  • using a COTS product

functional

correctness can be sustained over continuous period of time, and test whether system perform its functions correctly

  • To find functional defects

non-functional

Testing how the system perform (not what it does)

  • To find functional defects
Lien vers l'original