Test-Driven Development with ABAP Objects
eBook - ePub

Test-Driven Development with ABAP Objects

  1. 594 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Test-Driven Development with ABAP Objects

About this book

Better, cleaner code—every developer's dream. Test-driven development is how you'll achieve it! From creating a robust test infrastructure to designing methods, classes, and packages that will stand the test of time, this book provides in-depth instructions for revitalizing your programming. Whether you're writing new code or fixing legacy code, you'll learn to select test cases, use test doubles, and generate test data. With information on agile methodology to round out the development process, you'll have all the tools you need! Highlights: 1. Object-oriented design
2. Refactoring legacy code
3. Test-driven maintenance
4. Test infrastructure
5. Test pyramid
6. Test code design pattern
7. Global test doubles
8. Test class hierarchies
9. Test data classes
10. ABAP Development Tools (ADT)
11. Agile development

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Test-Driven Development with ABAP Objects by Winfried Schwarzmann in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Information

1 Introduction

How can agile development succeed? In other words, how can you design and sustainably develop your application on the one hand, and on the other train your team so that both the application and the team remain open to adaptations?
With this book, we aim not only to introduce you to generally accepted methods of agile development, but also to share our practical experiece. Our focus is on how agile methods can be applied effectively and efficiently in reality.
Section 1.1 is about sustainability, especially efficient development and maintenance using a test infrastructure. What exactly is a test infrastructure, and how can you gradually develop such a code-based infrastructure for your tests? Part I of this book answers those questions comprehensively and practically. As part of this introduction, we focus on the critical role that a test infrastructure plays for sustainability in the life cycle of a software product.
Section 1.2 deals with agility at all levels. We consider lean, Scrum, and ASE as mature and powerful frameworks in the “method stack” of a software-developing company. How much time and effort would a development team have to spend to develop similarly effective structures and processes? How many experiments and iterations would be necessary for this bottom-up process? And how unrealistic would it be to approach that theoretically well-thought-out and practically tested level? Of course, every framework restricts, and here and there an adaptation is necessary, but the frameworks mentioned together form an indispensable basis for efficient software development.
We see efficiency not just as a goal, but as a necessity for agile development. Where it is lacking or only develops in the long term, management support breaks away in the short or medium term. It may surprise you, but efficiency in application development has a lot to do with object-oriented knowledge and experience. Unfortunately, these capabilities are not widespread among ABAP developers. For this reason, the first three parts of this book deal in depth with object orientation, and in Section 1.3 we explain how efficiency depends on adherence to the associated design principles.
Effectivity has many sides. For software development, communication is crucial. To make sure that this large and complex topic does not go beyond this chapter, Section 1.4 focuses on the visualization of architecture and design, particularly on the representation of test-oriented design patterns using block diagrams.

1.1 Sustainability: Development and Maintenance with a Test Infrastructure

In this section, we introduce the basic process of efficient development and maintenance. It is based on the continuous development and extension of a test infrastructure. Put simply, this infrastructure is a collection of help classes and methods that support rapid writing of high-quality tests. The following illustrations show schematically how you can develop and use a test infrastructure.
Figure 1.1 shows a product class on the left side. There is already a test method T1 for one of the methods of this class.
Product Class with One Test Method
Figure 1.1 Product Class with One Test Method
This method contains many technical and therefore difficult-to-read statements. This is the assumed initial situation as it either presents itself or can be brought simply about by writing a first test.
To improve readability and avoid duplication, you extract statement blocks from the test method into help methods, then add these help methods either to the test class itself or to a local or global help class. These help methods may also include a readable wrapping of product methods. As Figure 1.2 shows, the test infrastructure consisting of all these help methods stands between the test method and the product class and decouples them from each other.
Test Infrastructure between Product Class and Test Method
Figure 1.2 Test Infrastructure between Product Class and Test Method
If you now write further test methods T2, T3, and T4, as shown in Figure 1.3, you can reuse some of these help methods directly or derive similar ones from them. Figure 1.3 shows this extension of the test infrastructure with a larger block and a dashed line. With the help of the test infrastructure, you can develop each new test method faster and with better quality.
Improving Test CoverageTest coverage with Further Test Methods
Figure 1.3 Improving Test Coverage with Further Test Methods
In this situation, you should reconsider your product...

Table of contents

  1. Dear Reader
  2. Notes on Usage
  3. Table of Contents
  4.   Foreword
  5.   Preface
  6. 1   Introduction
  7. Part I   Building a Test Infrastructure
  8. 2   The Sample Application
  9. 3   Code-Based Test Improvement
  10. 4   Design-Based Test Improvement
  11. 5   Robust Integration Test
  12. 6   Minimizing Dependencies
  13. 7   Isolated Component Test
  14. 8   Redesign with Unit Tests
  15. Part II   Test-Oriented ABAP Design
  16. 9   Designing Methods
  17. 10   Designing Classes
  18. 11   Designing Packages
  19. 12   Test Cases
  20. 13   Test Doubles
  21. 14   Global Test Doubles
  22. 15   Test Classes
  23. 16   Test Data
  24. 17   Test Infrastructures
  25. Part III   Agile Development of a New Application
  26. 18   Preparation for Test-Driven Development
  27. 19   Test-Driven Development
  28. Part IV   Agile Methodology
  29. 20   Scrum
  30. 21   Agile Software Engineering
  31. 22   Lean Development Model
  32. 23   Team Development
  33. 24   Backlog Development
  34. 25   Product Development
  35. Part V   Test-Oriented ABAP Tools
  36. 26   ABAP Unit
  37. 27   ABAP Development Tools
  38. 28   ABAP Tools for Test Isolation
  39. A   Naming Conventions for ABAP Code
  40. B   Bibliography
  41. C   The Author
  42. Index
  43. Service Pages
  44. Legal Notes