The Application Server ABAP supports not only development, but the whole development life cycle with a rich set of integrated ABAP testing and troubleshooting tools. Using the ABAP suite of testing tools, you can verify the formal and functional correctness of your programs. ABAP Unit testing makes enables you to employ test-driven development models. In the case of problems, ABAP offers a state of the art ABAP Debugger and powerful ABAP analysis tools, which ensure high productivity of development and support tasks.
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 Test Cockpit (ATC)
- ABAP Unit
- ABAP Test Double Framework
- Coverage Analyzer
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.
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 Code Inspector Wiki
ABAP Test Cockpit (ATC)
The ABAP Test Cockpit (ATC) is a new ABAP check toolset which allows you to run static checks and unit tests for your ABAP programs. In order to ensure a smooth migration and comparable check results throughout your company, the ABAP Test Cockpit is compatible with SAP’s Code Inspector. This means you can reuse your custom Code Inspector checks and variants in the ABAP Test Cockpit. ATC is also integrated into ABAP Development Tools in Eclipse.
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.
This 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 1
By 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 2
This 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 3
This 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 4
This 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.
A Spotlight on ABAP Unit Part 5
This weblog shows how to use the ABAP Code Inspector to automate ABAP Unit testing.
Automating ABAP Unit Test Runs with the Code Inspector
This wiki provides additional information on ABAP Unit.
ABAP Unit Wiki
ABAP Test Double Framework
In ABAP Unit test environments dependent objects should be replaced with test doubles, which imitate the behavior of the real objects. This reduces the complexity and facilitates testing.
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.
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 separate eCATT page.
ABAP Analysis Tools
The ABAP Workbench offers a suite of analysis tools, which support you in troubleshooting tasks during development and in a production environment. This section introduces tools for debugging, runtime analysis and tracing, performance, dump, and memory analysis. No matter what sort of problem you face in ABAP, the analysis tools can usually help you to track down and understand the cause and to find the solution.
- ABAP Debugger
- SQL Monitor (SQLM)
- ABAP Runtime Analysis (SAT)
- Performance Trace (ST05)
- Dump Analysis (ST22)
- Memory Inspector
New ABAP Debugger
In contrast to other programming language you can run every ABAP program at any time in the debug mode. There is no need to start the server in a particular debug mode, just run a program in the debug mode and this is all. Using the ABAP debugger, you can display data objects and check the flow logic of programs. The Classic ABAP Debugger is available for SAP NetWeaver release levels up to and including 6.40. As of release 7.0 the New ABAP Debugger is the default tool. The New ABAP Debugger enables analysis of all types of ABAP programs and offers a state of the art user interface together with a set of essential features and tools like the new ABAP Editor with syntax highlighting and a data quick info window, the Diff Tool, which allows to compare for example two nested structures or internal tables or the Data Explorer, which allows you to understand the details of even complicated objects at a glance.
These recorded demos introduce all essential features of the New ABAP Debugger at a glance and teach you how to use the New ABAP Debugger:
New ABAP Debugger for Classic ABAP Debugger Users – Demo (YouTube, 10 min)
New ABAP Debugger for Newbies – Demo (YouTube, 12 min)
This presentation introduces the functionality of the New ABAP Debugger.
The New ABAP Debugger – An Introduction (PDF 1 MB)
More blogs on ABAP Debugger:
SQL Monitor (SQLM)
SQL Monitor offers complete transparency of SQL at productive operation including various display and analysis capabilities without affecting running business processes. It is able to monitor a complete system for a longer period of time while also delivering detailed performance information about SQL statements that can be linked to business processes. SQL Trace Tool (ST05) is integrated for detailed investigation.
ABAP Runtime Analysis (SAT)
The ABAP Runtime Analysis (SAT transaction) is the successor of the SE30.
SAT solves two analysis problems: tracing a program for analyzing the program flow; and performance analysis of your ABAP application. SAT is the only tool which is able to trace the flow logic of ABAP programs at statement level. You can use SAT for example to find the location of the statement you are interested in, or to compare the control flow of an ABAP application in different systems or even to trace memory consumption.
These series of blogs about SAT are suitable both for newbies and for experienced SE30 users.
Next Generation ABAP Runtime Analysis (SAT) – Introduction
Next Generation ABAP Runtime Analysis (SAT) – How to analyze program flow
Next Generation ABAP Runtime Analysis (SAT) – How to analyze performance
Next Generation ABAP Runtime Analysis (SAT) – How to analyze memory consumption
Performance Trace (ST05)
The various trace functions of a SAP system are grouped together in the test tool Performance Trace (ST05). You can use it to monitor and analyze system behavior during database calls, lock management calls, remote calls of reports and transactions, and calls of the table buffer administration. This weblog gives you a quick introduction to the SQL Trace. In particular it shows how to execute SQL trace and to interpret its results.
Dump Analysis (ST22)
Should the ABAP AS no longer be able to execute a program – because of an unhandled exception, a resource or system problem, or an error in coding – the ABAP runtime environment triggers an ABAP runtime error. The execution of the program is terminated and a detailed error log (short dump) is created and saved. This pair of weblogs explores the diagnostic aids and information resources that an ABAP short dump offers and how to get the most help out of a dump.
The Memory Inspector is a tool that analyzes memory snapshots and saves them on the application server. You can use it both to display individual memory snapshots and to compare two snapshots.