This document discusses test-driven development and unit testing in ABAP. It defines unit testing as testing individual units or modules of source code to determine if they are fit for use. It defines test-driven development as a process where test cases are created based on requirements first, before developing the software to pass those tests. This helps create simple code designs and improves confidence. The document discusses different types of testing techniques and how to implement unit testing in ABAP using ABAP Unit and executing tests in the SAP GUI or Eclipse. It provides an overview of the test-driven development process of writing a test, making it fail, writing code to pass the test, and refactoring and improving the code and tests.
5. Systematic testing
5
Testing techniques
Ad-hoc testingError guessing
Boundary value analysis
Path coverage testing
Intuitive testing
Semantic testing
Control flow testing Business process testing
Branch coverage testing
State transition analysis
Condition coverage testing
Cause-effect analysis Dataflow testing
Classification tree method
Compiler testing
Testing in pairs
Elementary comparison test
Weak point testing
Area analysis testing
Equivalence class partitioning analysis
Testing with a random value
Syntax testing Statement coverage testing
9. Unit-Testing
“unit testing is a software testing method
by which individual units of source code, sets of one or more computer
program modules together with associated control data, usage
procedures, and operating procedures,
are tested to determine whether they are fit for use
WIKIPEDIA:
10. Test-Driven Development
“is a software development process that relies on the repetition of a
very short development cycle: requirements are turned into very specific
test cases, then the software is improved to pass the new tests, only.
This is opposed to software development that allows software to be
added that is not proven to meet requirements.
…TDD encourages simple designs and inspires confidence.
Test-driven development is related to the test-first programming
concepts of extreme programming, begun in 1999,
but more recently has created more general interest in its own right.”
WIKIPEDIA:
14. Test Driven Development
• write a test
• make it fail
• keep it simple
• tests are examples
• tests becomes
documentation
abapcoderetreat.events ACR
RED GREEN
REFACTOR
• get to green fast
• take baby steps
• stuck? undo and start
over
• write only enough code
to pass the test
• remove duplication (in
code and tests)
• rename and clean up
• run tests and stay green
• change implementation
not behaviour
• improve structure in
small steps
you start here!