Skip to Content

TDD in ABAP

ABAP Testing Tools

You can avoid expensive troubleshooting by verifying the formal and functional correctness of your programs during development and integration. ABAP provides you with the tools you need to move to a test-driven development paradigm, for even tighter quality control.This section focuses on the comprehensive set of ABAP Testing Tools, which help you to ensure high quality in your ABAP programs.

  • Extendend Program Check
  • Code Inspector
  • ABAP Unit
  • Coverage Analyzer
  • eCATT

Extended Program Check

Sophisticated static program checks should be part of each development process. The first step is to ensure that your ABAP program is free of syntax errors with the syntax check. The next step is to run an Extended Program Check (SLIN) . SLIN includes more time-consuming checks, which are not part of the syntax check, like validating method calls with respect to called interfaces, finding unused variables, and so on.

Code Inspector
ABAP Code Inspector Wiki
You can test even more intensively with the Code Inspector. This tool also lets you automate mass testing. It offers analysis and tips for improving potentially sub-optimal statements, such as potentially expensive SELECT statements (performance!) or potential security problems. Moreover, it provides sophisticated (mostly static) checks, suitable for mass testing as well as for testing small object sets.
This wiki provides useful information about how you can improve the quality of your code by using Code Inspector.

ABAP Unit
Unit testing is a technique that enables writing and running white box tests during development. Dedicated test classes invoke the tested program and compare the result with the expectation. ABAP Unit is integrated into both the ABAP runtime and the ABAP workbench, and supports you in writing, running, and organizing unit tests in ABAP. Together with the ABAP Coverage Analyzer, ABAP Unit provides you with the tools you need to develop according to a test-driven paradigm.

A Spotlight on ABAP Unit Part 1This weblog shows how ABAP Unit facilitates testing in ABAP. You will get a first look at a fairly simple code example that gives you an impression of how easy it is to write a test with ABAP Unit.

A Spotlight on ABAP Unit Part 2By giving a more real-world example, this weblog shows you the benefits of ABAP Unit testing in complex programs. Though unit tests themselves are pretty simple, a comprehensive test coverage enables you to detect side effects of program changes and adaptations.

A Spotlight on ABAP Unit Part 3This weblog explains and discusses the principles of unit testing. This way you learn the rules you should adhere to if you want to write good unit tests using ABAP Unit.

A Spotlight on ABAP Unit Part 4This weblog presents basic features of the ABAP Unit result display. You learn how to track down the source of an error in the code.

A Spotlight on ABAP Unit Part 5This weblog considers some prejudices which might keep developers from writing ABAP Unit tests and explains that they are mainly based on a misconceptions of what unit tests are, what they are good for and how to differentiate them from integration tests.

Automating ABAP Unit Test Runs with the Code InspectorThis weblog shows how to use the ABAP Code Inspector to automate ABAP Unit testing.

ABAP Unit Wiki
This wiki provides additional information on ABAP Unit.

Coverage Analyzer
You can use the Coverage Analyzer to check if all parts of your programs were covered by the test. Coverage Analyzer provides execution statistics for programs and program units.

eCATT
Extended Computer Aided Test Tool (eCATT) is used to create and execute function and integration tests. Its primary aim is the automatic testing of SAP business processes. Each test generates a detailed log that documents the test process and results. eCATT enables automatic testing in SAP GUI for Windows.

For all information on eCATT visit this eCATT.

To report this post you need to login first.