In this blog post, learn about our upcoming Rheinwerk Course entitled ABAP Unit Testing from the course instructor, Dr. Kerem Koseoglu.
Kerem is a freelance SAP software architect who specializes in ABAP programming and regularly teaches professional training courses for ABAP developers. He is the instructor of the bestselling Modern ABAP: ABAP Objects, CDS, and AMDP course from Rheinwerk Courses. Kerem is also the author of Design Patterns in ABAP Objects (SAP PRESS), SQL: The Practical Guide (Rheinwerk Computing), and the upcoming Swift: The Practical Guide. He has participated in global software development projects in a variety of roles, including lead architect, team lead, developer, technical advisor, instructor, and project manager. In addition, he has written numerous articles for technical magazines in Turkey. Kerem holds a Ph.D. in organizational behavior.
This course is about ABAP unit testing. It promises to equip you with all the necessary tools to improve the reliability and robustness of your ABAP programs: both on-premise and on SAP Business Technology Platform (SAP BTP)!
Programming is not just about writing code—it’s about writing correct and reliable code. In that regard, one of the most helpful tools is unit testing, which is the art and science of writing test code to validate your application code. In a unit test, you essentially write “tester code” that lives side by side with your “app code.” When you run your unit tests, they pressure test your “app code” to ensure that your algorithms work as intended.
Unit tests are especially useful after future modifications to your program. Once a change is made, you can simply re-run your tests to ensure that the new version of your codebase works as well as before. If that’s not the case, either a new bug has been introduced into your application’s code, or your tests need to be updated.
Nearly every programming language, such as Python, JavaScript, Swift, Java, and more, features a unit testing framework, and with good reason. ABAP is no exception. This one-day course will cover unit testing in ABAP, teaching you the concepts behind unit tests and demonstrating how to write and execute them.
ABAP unit tests are applicable to on-premise SAP systems as well as ABAP Steampunk developments on SAP BTP.
By the end of the course, you will be well equipped with all the necessary tools needed to improve the reliability and robustness of your ABAP programs via unit tests.
Both. You’ll walk away with a solid understanding of why unit testing matters—and get the necessary hands-on skills to write real tests. Best practices like test-driven development are also going to be highlighted.
We will start with a high-level introduction by defining unit tests and explaining their necessity in software development. Unit testing frameworks in other programming languages will be briefly highlighted, and ABAP’s testing tools will be explained.
Once the fundamentals are in place, we will delve into the ABAP Unit Framework, which will be our main hands-on module. We will code sample ABAP classes, followed by ABAP unit tests for code validation. Case of failed and passed tests will be shown, as well as alternative test assertion methods.
Being an essential part of unit tests, “mocking” means replacing real objects or methods with controlled fakes to isolate the code being tested. Mocking prevents side effects like database writes, speeds up tests, and isolates code for accurate results. We will discover alternatives for ABAP mocking, such as dependency injection, test doubles, and test seams.
Following this hands-on section, we will discuss the best practices of unit testing. The programming paradigm of test-driven development will be addressed; followed by how to design testable classes.
Finally, a wrap-up and Q&A section will close the day.
Since unit tests reside in classes, hands-on experience with object-oriented ABAP (OO-ABAP) is a requirement to make the most of the course. Experience with Eclipse ADT is also a plus. However, no prior experience with unit testing is necessary, as those concepts will be developed from foundational principles.
Since 2002, I've honed my skills as a professional developer, working not only with ABAP but other programming languages as well. I have worked with unit tests in countless projects on various platforms, harnessing a practical and solid approach for dependable code bases.
But knowledge is just one piece of the puzzle. Teaching is an art form in itself. Thankfully, I possess a passion for both! My PhD and global books published by Rheinwerk Publishing (as well as some domestic best-sellers) showcase my expertise in that sense.
Over the years, I've conducted countless trainings and workshops. This experience allows me to refine learning content, ensuring it's clear, practical, and immediately applicable to your daily work.
Join me, and let’s elevate the dependability and robustness of your future programs together!