SAP ABAP Testing and Troubleshooting

 SAP ABAP Testing and Troubleshooting:

Application Server SAP ABAP supports not only development, but the all development life cycle with a rich set of a integrated SAP ABAP testing & a troubleshooting tools. While using the SAP ABAP suite of testing tools, we can verify the formal & functional correctness of our programs. SAP ABAP Unit testing makes enables you to employ test driven development model. In case of any problems, SAP ABAP offers a state of the art SAP ABAP Debugger & powerful SAP ABAP analysis tools, which ensure high productivity of development and support tasks.

ABAP Testing Tools
We can avoid expensive troubleshooting by verifying the formal & functional correctness of your programs during development & integration. SAP 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 SAP ABAP Testing Tools, which help you to ensure high quality in your SAP ABAP programs.

Extended Program Check
Code Inspector
ABAP Test Cockpit (ATC)
ABAP Unit
ABAP Test Double Framework
Coverage Analyzer
eCATT

Extended Program Check
The Sophisticated static program checks should always be a part of each development process. Then the first step is to ensure that our SAP ABAP program is free of syntax errors with the syntax check. Then the next step is to run 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 & so on.

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

ABAP Test Cockpit (ATC)
The  SAP ABAP Test Cockpit (ATC) is a new SAP ABAP check toolset which allows us to run static checks & unit tests for your ABAP programs. So in order to ensure a smooth migration & comparable check results throughout your company, the ABAP Test Cockpit(ATC) is compatible with SAP Code Inspector. Means you can reuse your custom Code Inspector checks and variants in the SAP ABAP Test Cockpit. ATC is also integrated into SAP ABAP Development Tools in Eclipse.

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

This shows how SAP ABAP Unit facilitates testing in SAP ABAP. You will get a first look at a fairly simple code for ex: this gives you an impression on how easy it is to write a test with SAP ABAP Unit.

Giving us a more real world example, this blog shows you the benefits of SAP ABAP Unit testing in complex programs. Though many unit tests themselves are pretty simple, a comprehensive test coverage enables us to detect side effects of program changes and adaptations.

The blog explains & discusses the principles of unit testing. This way you learn the rules we should adhere to if you want to write good unit tests using SAP ABAP Unit.

The blog presents the basic features of the SAP ABAP Unit result display. Now you can learn how to track down the source of an error in the code. 

The blog considers some prejudices which we might keep developers from writing SAP ABAP Unit tests & explains that they are mainly based on a mis-conceptions of what unit tests are, what they are good for & how to differentiate them from integration tests.

The blog shows how to use the SAP ABAP Code Inspector to automate SAP ABAP Unit testing.

The wiki provides an additional information on SAP ABAP Unit.

ABAP Test Double Framework
SAP ABAP Unit test environments dependent objects should be replaced only with test doubles, which imitate the behavior of the real objects. So this reduces the complexity & facilitates testing.

Coverage Analyzer
One can use the Coverage Analyzer to check if all the parts of our programs were covered by the test. So the Coverage Analyzer provides execution statistics for programs & program units.

eCATT
The Extended Computer Aided Test Tool (eCATT) are used to create & execute function & integration tests. So its primary aim is to automate the testing of SAP business processes. So each test generates a detailed log that documents the test process & results. So eCATT enables the automatic testing in the  SAP GUI for the Windows. Then for all information on eCATT visit this separate eCATT page.

ABAP Analysis Tools
SAP ABAP Workbench offers a suite of analysis tools, which support you in troubleshooting tasks during development & in a production environment. This section introduces tools for debugging, runtime analysis & tracing, performance/ dump/ memory analysis. So no matter what sort of problem we face in SAP ABAP, the analysis tools can usually help you to track down & understand the cause & to find the solution.

ABAP Debugger
SQL Monitor (SQLM)
ABAP Runtime Analysis (SAT)
Performance Trace (ST05)
Dump Analysis (ST22)
Memory Inspector
New ABAP Debugger

So in contrast to other programming language we can run every SAP ABAP program at any time in the debug mode. Then is no need to start the server in a particular debug mode, just run a program in the debug mode & this is all. Use the SAP ABAP debugger, you can display data objects & check the flow logic of programs. So the Classic SAP ABAP Debugger is available for SAP NetWeaver release levels up to and including 6.40. As of release 7.0 the New SAP ABAP Debugger is the default tool. The New SAP ABAP Debugger enables analysis of all types of SAP ABAP programs & offers a state of the art user interface together with a set of essential features & tools like the new SAP ABAP Editor with syntax highlighting & a data quick info window, the Diff Tool, which allows to compare for ex: two nested structures or the internal tables or the Data Explorer, which we allow you to understand the details of even complicated objects at a glance.

SQL Monitor (SQLM)
SQLM offers a complete transparency of SQL at productive operation including various display & analysis capabilities without affecting running business processes. So 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. The SQL Trace Tool (tcode ST05) is integrated for detailed investigation.

ABAP Runtime Analysis (SAT)
ABAP Runtime Analysis (SAT transaction) is the successor of the tcode SE30.

Tcode SAT solves two analysis problems - tracing a program for analyzing the program flow & performance analysis of our SAP ABAP application. The Tcode SAT is the only tool which is able to trace the flow logic of SAP ABAP programs at statement level. We can use SAT for example to find the location of the statement we are interested in, or to compare the control flow of an ABAP application in different systems or even to trace memory consumption.

Performance Trace (ST05)
There are various trace functions of a SAP system are grouped together in the test tool Performance Trace (Tcode ST05). We can use it to monitor & analyze system behavior during database calls, lock management calls, remote calls of reports & transactions, & calls of the table buffer administration. The web log gives you an quick introduction to the SQL Trace. So in particular it shows how to execute SQL trace & to interpret its results.

Dump Analysis (ST22)
If this should be 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 SAP ABAP runtime error. The execution of the program is terminated & a detailed error log (short dump) is created & saved. So this pair of web logs explores the diagnostic aids & information resources that an SAP ABAP short dump offers & how to get the most help out of a dump.

Memory Inspector
Memory Inspector is an tool that analyzes memory snapshots & saves them on the application server. We can use it both to display individual memory snapshots & to compare both.

Hope this helps. Thank you everyone.

Comments

Popular posts from this blog

EVENTS IN INTERACTIVE REPORTS OF SAP ABAP

SAP ABAP Fresher Resume/ CV Writing Format..

CONCEPTS OF INNER JOIN AND OUTER JOIN in SAP ABAP