Slides 17 + 18 - Use Case Testing Flashcards
Use Case
A set of sequences of actions, including variants, that a system performs to yield an observable result of value to an actor
Benefits of Use Case
● Use cases are considered to systematically design test cases
● Formalization (transformation to a state/ activity diagram) discovers missing information and errors early
(deckt fehlende Informationen und Fehler frühzeitig auf)
● Drawbacks of natural language specifications are weakened
(Nachteile natürlichsprachlicher Spezifikationen werden abgeschwächt)
Test-driven development
Test driven development (TDD) is an software development approach in which a test is written before writing the code. Once the new code passes the test, it is refactored to an acceptable standard.
Test Driven Development (TDD) is
● specification and validation
● a programming technique
Refactoring
Refactoring consists of improving the internal structure
of an existing program’s source code, while preserving its external behavior.
(Refactoring besteht aus der Verbesserung der internen Struktur der Quelle eines vorhandenen Programms Code, während sein externes Verhalten beibehalten wird.)
Test Driven Development (TDD) - Benefits
Instant feedback
(Sofortige Rückmeldung)
● Developer know if new code works and if it interferes with existing code
Better development practices
(Bessere Entwicklungspraktiken)
● Encourages the developers to decompose the problem into manageable, programming tasks
● By focusing on writing only the code necessary to pass tests, code can be cleaner and clearer
Improve quality assurance
(Qualitätssicherung verbessern)
● up-to-date tests ensure a certain level of quality
● Enables continuous regression testing
● Drive programmers to write testable code
Test Driven Development (TDD) Limitations
● Hard to apply
● TDD needs an upfront design
● Difficult to write test cases for hard-to-test code