GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

TDD

fardowsa farah Englisch

Inhalt der Mindmap

TDD

  1. Definition: TDD is a software development where test is written before the class to be tested is written.

  2. Why do TDD? TDD imposes discipline is a developer, provides incremental specifications, helps avoid regression and allows for change with confidence.

  3. TDD Cycle at the Unit Testing level: Step 1: Write test code. 2: Run test code to make it fail. 3. Write Class code. 4. Run tests. 5. Tests now pass. 6. Refactor to make it better. 7. Run tests

    • step 6. Refactoring:
      • Definition: Small independent techniques to apply transformations to a program with the goal of improving design without changing functionality
      • Why refactor? To improve design, handle requirements change or to handle sloppiness by developers such copy and pasting of new methods.
        • Code Smells: A surface indication that usually corresponds to a deeper problem in system. Code smells are identified during refactoring. Code Smells also help us find problems which leads to more refactoring.
          • Where do they come from? From a rused design and disregard for technical debt - the amount of work you create when you try to save time.
          • Groups of Code smells
            • Change Preventers: smells that hinder changing or further developing the software. Solutions include extracting class/methods or moving them.
            • Dispensables: represent something unnecessary that should be removed. Problems include: a lazy class, a data class or duplicated code. Solutions include: inline class, moving/extracting methods.
            • Couplers: represent something unnecessary that should be removed. Smells include feature envy, inappropriate intimacy, middle man. Treatments to such smells include: move method/field, bidirectional to unidirectional association, inline Class
            • Bloaters: Something has grown large it cannot be effectively handled. Examples are Long method, large class, long parameter list or data clumbs. Treatment: Extract method or class, replace parameter with method call or object or preserve whole object.
            • Object- Orientation Abusers: Cases where solution does not fully exploit the possibilities of object oriented design: Smells are switch statements and refused bequest. Solutions include: Use of polymorphism, push down method and eliminating inheritance.
      • Types of refactoring: Collapsing hierarchy, consolidate conditional, decompose conditional, extract a class or a method etc
      • To refactor or Not: Refactor when you have to add a feature, during code review or when fixing a bug. Do not refactor when code is broken, a deadline is close or when there is no need to refactor.
      • Tools: ReSharper, Jetbrains Rider, IntelliJ IDEA, Stepsize
  4. Stages. TDD can be applied at different stages. Developer and Alpha which are within the organization. Beta and Product release stages of testing which are outside the organization.

  5. Testing techniques: Opaque box testing technique where the tester does not have internal knowledge product while clear box testing technique the tester is aware of the internal structure and working of the product

Informationen

Beschreibung
Mindmap am TDD, erstellt von fardowsa farah am 02/08/2024.
Erstellt von
fardowsa farah
Aufrufe
2
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck