{"id":740,"date":"2013-10-24T14:18:49","date_gmt":"2013-10-24T13:18:49","guid":{"rendered":"http:\/\/oprsteny.cz\/?p=740"},"modified":"2013-10-24T14:54:20","modified_gmt":"2013-10-24T13:54:20","slug":"test-driven-development-in-abap-unit-test-classes","status":"publish","type":"post","link":"https:\/\/oprsteny.cz\/?p=740","title":{"rendered":"Test driven development in ABAP &#8211; Unit test classes"},"content":{"rendered":"<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_TDD.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"749\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=749\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_TDD.png\" data-orig-size=\"424,252\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Test Driven Development using ABAP Unit\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_TDD.png\" class=\"alignleft size-thumbnail wp-image-749\" alt=\"Test Driven Development using ABAP Unit\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_TDD-150x150.png\" width=\"150\" height=\"150\" \/><\/a>This article provides info about creation an ABAP unit test class that might significantly reduce the future maintenance cost at the testing level. The flow is simple &#8211; you design your functional tests in advance and then you create your code. You can run the test class repeatedly to tell you which tests still didn&#8217;t pass.<!--more--><\/p>\n<h2>The main idea of test driven development<\/h2>\n<ul>\n<li>Create methods inside your class specifying just their interface, but no code inside (1. Red)<\/li>\n<li>Write tests for your class, ideally 1 test method\/1 class method (1. Red)<\/li>\n<li>Make all the test pass = implement the real code (2. Green)<\/li>\n<li>Refactoring (3. Refactor)<\/li>\n<\/ul>\n<p>It is always good to modularize our programs to achieve easier maintenance and re-usability in the future. If we want to check specific parts of our programs for correctness repeatedly, it&#8217;s the right decision to use a tool for unit testing &#8211; ABAP Unit.<\/p>\n<p>ABAP unit is based on ABAP objects where the global class CL_AUNIT_ASSERT contains methods which can be used for testing .Tests are usually implemented in local classes. Inside the local class the necessary method from the global class can be called for testing. These test classes can be written inside the program or class of function module for which the test is to be done.<\/p>\n<p>Even if it never affect your production code, you should be very careful your tests don&#8217;t modify any production data.<\/p>\n<h2><b>Few differences between Normal and Test class in ABAP<\/b><\/h2>\n<ul>\n<li>Each test class must have FOR TESTING addition<\/li>\n<li>Each method of the test class that is to be executed as unit test method must have FOR TESTING addition (the test class can of course have normal\/supporting methods)<\/li>\n<li>You should specify the risk level and duration<\/li>\n<li>To be able to call test methods directly, it&#8217;s good idea to inherit from class CL_AUNIT_ASSERT<\/li>\n<\/ul>\n<pre lang=\"abap\">\" Definition as of release 700\r\nCLASS lcl_test DEFINITION\u00a0\r\n  \"#AU Risk_Level Harmless\r\n  \"#AU Duration Short\r\n  FOR TESTING\r\n  INHERITING FROM cl_aunit_assert.\r\n\r\n  PRIVATE SECTION.\r\n    METHODS:\r\n      TEST_METHOD_A\u00a0\r\n        FOR TESTING.\r\nENDCLASS.<\/pre>\n<pre lang=\"abap\">\" Definition as of release 702\r\nCLASS lcl_test DEFINITION\u00a0FOR TESTING\r\n  RISK LEVEL HARMLESS\r\n  DURATION SHORT  \r\n  INHERITING FROM cl_aunit_assert.\r\n\r\n  PRIVATE SECTION.\r\n    METHODS:\r\n      TEST_METHOD_A\u00a0\r\n        FOR TESTING.\r\nENDCLASS.<\/pre>\n<h2>Example program with local classes<\/h2>\n<p>We will follow the test driven development approach: create dummy methods -&gt; write tests for them -&gt; implement the methods until all test are passed.<\/p>\n<h3>Create the class with dummy methods<\/h3>\n<pre lang=\"abap\">*---------------------------------------------------------------*\r\n*       CLASS LCL_MATH DEFINITION\r\n*---------------------------------------------------------------*\r\nCLASS lcl_math DEFINITION.\r\n  PUBLIC SECTION.\r\n    METHODS:\r\n      add\r\n        IMPORTING\r\n          i_val1 TYPE i\r\n          i_val2 TYPE i\r\n        RETURNING value(result) TYPE i,\r\n      divide\r\n        IMPORTING\r\n          i_val1 TYPE i\r\n          i_val2 TYPE i\r\n        RETURNING value(result) TYPE f\r\n        RAISING cx_sy_arithmetic_error,\r\n      factorial\r\n        IMPORTING\r\n          n TYPE i\r\n        RETURNING value(result) TYPE i.\r\nENDCLASS.                    \"lcl_test  DEFINITION\r\n*--------------------------------------------------------------*\r\n* CLASS lcl_math IMPLEMENTATION\r\n*--------------------------------------------------------------*\r\nCLASS lcl_math IMPLEMENTATION.\r\n  METHOD add.\r\n  ENDMETHOD. \"add\r\n\r\n  METHOD divide.\r\n  ENDMETHOD. \"divide\r\n\r\n  METHOD factorial.\r\n  ENDMETHOD. \"factorial\r\nENDCLASS. \"lcl_math IMPLEMENTATION<\/pre>\n<h3>Create the test class<\/h3>\n<pre lang=\"abap\">*--------------------------------------------------------------*\r\n*       CLASS lcl_test  DEFINITION\r\n*--------------------------------------------------------------*\r\nCLASS lcl_test DEFINITION\r\n  \"#AU Risk_Level Harmless\r\n  \"#AU Duration Short\r\n  FOR TESTING\r\n  INHERITING FROM cl_aunit_assert.\r\n\r\n  PRIVATE SECTION.\r\n    METHODS:\r\n      test_add FOR TESTING,\r\n      test_divide FOR TESTING,\r\n      test_factorial FOR TESTING.\r\nENDCLASS.                    \"lcl_test  DEFINITION\r\n*--------------------------------------------------------------*\r\n*       CLASS lcl_test IMPLEMENTATION\r\n*--------------------------------------------------------------*\r\nCLASS lcl_test IMPLEMENTATION.\r\n  METHOD test_add.\r\n    DATA:\r\n      lr_class TYPE REF TO lcl_math,\r\n      result TYPE i.\r\n\r\n    CREATE OBJECT lr_class.\r\n    result = lr_class-&gt;add( i_val1 = 5\r\n                            i_val2 = 7 ).\r\n\r\n    assert_equals( act   = result\r\n                   exp   = '12'\r\n                   msg   = 'Addition not computed correctly'\r\n                   level = critical\r\n                   quit  = no\r\n    ).\r\n  ENDMETHOD.                    \"test_add\r\n  METHOD test_divide.\r\n    DATA:\r\n      lr_class TYPE REF TO lcl_math,\r\n      l_ex TYPE REF TO cx_sy_arithmetic_error,\r\n      result TYPE i.\r\n\r\n    CREATE OBJECT lr_class.\r\n\r\n    TRY.\r\n        result = lr_class-&gt;divide( i_val1 = 32\r\n                                   i_val2 = 6 ).\r\n      CATCH cx_sy_arithmetic_error INTO l_ex.\r\n    ENDTRY.\r\n\r\n    assert_not_initial( act   = l_ex\r\n                        msg   = 'Exception was not expected'\r\n                        level = tolerable\r\n                        quit  = no\r\n    ).\r\n\r\n    assert_equals( act   = result\r\n                   exp   = '5'\r\n                   msg   = 'Division not computed correctly'\r\n                   level = critical\r\n                   quit  = no\r\n                   tol   = '0.999'\r\n    ).\r\n\r\n    TRY.\r\n        result = lr_class-&gt;divide( i_val1 = 32\r\n                                   i_val2 = 0 ).\r\n      CATCH cx_sy_arithmetic_error INTO l_ex.\r\n    ENDTRY.\r\n\r\n    assert_not_initial( act   = l_ex\r\n                        msg   = 'Exception was expected'\r\n                        level = tolerable\r\n                        quit  = no\r\n     ).\r\n  ENDMETHOD.                    \"test_divide\r\n  METHOD test_factorial.\r\n    DATA:\r\n      lr_class TYPE REF TO lcl_math,\r\n      result TYPE i.\r\n\r\n    CREATE OBJECT lr_class.\r\n    result = lr_class-&gt;factorial( 4 ).\r\n\r\n    assert_equals( act    = result\r\n                   exp    = '24'\r\n                   msg    = 'Factorial not computed correctly'\r\n                   level  = critical\r\n                   quit   = method\r\n     ).\r\n  ENDMETHOD.                    \"test_factorial\r\nENDCLASS.                    \"lcl_test IMPLEMENTATION<\/pre>\n<h3>Output 1<\/h3>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_fail.png\"><img decoding=\"async\" data-attachment-id=\"748\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=748\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_fail.png\" data-orig-size=\"\" data-comments-opened=\"1\" data-image-meta=\"[]\" data-image-title=\"ABAP Unit test &amp;#8211; failures\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_fail.png\" class=\"alignleft size-medium wp-image-748\" alt=\"ABAP Unit test - failures\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_fail.png\" \/><\/a><\/p>\n<h3>Implementing methods<\/h3>\n<pre lang=\"abap\">*--------------------------------------------------------------*\r\n* CLASS lcl_math IMPLEMENTATION\r\n*--------------------------------------------------------------*\r\nCLASS lcl_math IMPLEMENTATION.\r\n  METHOD add.\r\n    result = i_val1 + i_val2.\r\n  ENDMETHOD. \"add\r\n\r\n  METHOD divide.\r\n    result = i_val1 \/ i_val2.\r\n  ENDMETHOD. \"divide\r\n\r\n  METHOD factorial.\r\n    result = 1.\r\n    IF n = 0.\r\n      RETURN.\r\n    ELSE.\r\n      DO n TIMES.\r\n        result = result * sy-index.\r\n      ENDDO.\r\n    ENDIF.\r\n  ENDMETHOD. \"factorial\r\nENDCLASS. \"lcl_math IMPLEMENTATION<\/pre>\n<h3>Output 2<\/h3>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_success.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"747\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=747\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_success.png\" data-orig-size=\"403,30\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"ABAP Unit test &amp;#8211; successfully tested program\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_success.png\" class=\"size-medium wp-image-747 alignnone\" alt=\"ABAP Unit test - successfully tested program\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_success-300x22.png\" width=\"300\" height=\"22\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_success-300x22.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_success.png 403w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>Client specific settings for unit tests:<\/h2>\n<p>You can maintain the client based configuration for switch off Unit Test, allowed preference for Risk level and Duration in the transaction SAUNIT_CLIENT_SETUP. You must not change the settings on the fly as all of your tests may become non-executable because they are having different Risk Level and Duration than defined in the settings. Setting screen looks similar to this:<\/p>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_settings.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"742\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=742\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_settings.png\" data-orig-size=\"327,278\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Unit test client settings\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_settings.png\" class=\"size-medium wp-image-742 alignnone\" alt=\"Unit test client settings\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_settings-300x255.png\" width=\"300\" height=\"255\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_settings-300x255.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_settings.png 327w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>Execution risk levels:<\/h2>\n<ul>\n<li>HARMLESS &#8211;\u00a0The execution of this test doesn&#8217;t affect any existing processes or Database.<\/li>\n<li>DANGEROUS &#8211;\u00a0This type of test makes changes to DB or persistent Data<\/li>\n<li>CRITICAL &#8211;\u00a0This type of test would make changes to Customization as well as the Persistent data. A careful look is required.<\/li>\n<\/ul>\n<h2><strong>Duration options:<\/strong><\/h2>\n<ul>\n<li>SHORT &#8211;\u00a0Gets executed very fast. This is default setting at the client settings. Generally &lt; 1 minute<\/li>\n<li>MEDIUM \u00a0&#8211;\u00a0Gets executed in a bit. Little bit extra time than the short duration. In the range of 1 minute to 10 minutes<\/li>\n<li>LONG &#8211;\u00a0takes a while to process the test. The execution time would be more than 10 minutes<\/li>\n<\/ul>\n<h2>Special methods in test classes (FIXTURES)<\/h2>\n<p>Test fixture is the test configuration like test data or test objects. This data would be used within the test methods. Fixture would be executed before the actual test method gets executed. So when the test is getting performed, the test data or test objects setup in fixture method can be used.<\/p>\n<p>In ABAP, the test fixture is achieved using these predefined methods. These method would be called automatically by ABAP framework if they exist in the test class.<\/p>\n<ul>\n<li>SETUP \u2013 Instance method SETUP would be called\u00a0<strong>before each test<\/strong>\u00a0within the test class<\/li>\n<li>TEARDOWN \u2013 In contrary to SETUP, instance method TEARDOWN would be called\u00a0<strong>after each test<\/strong>within the test class<\/li>\n<li>CLASS_SETUP \u2013 Similar to SETUP, static method CLASS_SETUP would be used to set up the data once before the first test in the class gets executed<\/li>\n<li>CLASS_TEARDOWN \u2013 Like TEARDOWN, static method TEARDOWN would be used to clear the data once after the last test in the class gets executed<\/li>\n<\/ul>\n<h3>Method SETUP( )<\/h3>\n<p>Special method SETUP( ) is used to setup the common test data for the same test methods of the same test class or of the inherited test class. This method would be called before calling the test method by the ABAP Unit framework. So, basically it would be called as many times as many test methods are there in a single test class.<\/p>\n<p>In this method, you should generally setup your test data which can be leveraged by various different test within the same test class. Simple example, would be to setup default value for a variable, or instantiate the object for Production code.<\/p>\n<h3>Method TEARDOWN( )<\/h3>\n<p>Special method TEARDOWN( ) should be used to clear down the test data which was used by the actual test. You should use this method to clear the test data and make sure they are ready to use by the next Test method. This method would be called after calling the test method by the ABAP Unit framework. Similar to SETUP, this method would be called as many times as many test methods are there in a single test class.<\/p>\n<p>In this method, you should generally setup your test data which can be leveraged by various different test within the same test class. Simple example, would be to clear the product code objects or all attributes of the test class and make sure it is ready for next execution.<\/p>\n<h3>Method CLASS_SETUP( ) &amp; CLASS_TEARDOWN( )<\/h3>\n<p>Method CLASS_SETUP( ) is a static method. Set up the test data and save it into some temporary variable. We can use these test data into the SETUP method. The purpose of CLASS_SETUP is to set up the same data like a configuration which would be used by all test methods but NONE of the test method would be modifying it.<\/p>\n<p>Static method CLASS_TEARDOWN would to make sure you clear up all the data and related attributes used in the test class before leaving the class.<\/p>\n<h2><strong style=\"color: #000000;\">Methods available for testing in class CL_AUNIT_ASSERT\u00a0:<\/strong><\/h2>\n<ul>\n<li>ABORT &#8211;\u00a0Test terminated due to missing context<\/li>\n<li>ASSERT_BOUND &#8211;\u00a0Ensure the validity of the reference of a reference variable<\/li>\n<li>\n<p style=\"display: inline !important;\">ASSERT_CHAR_CP &#8211;\u00a0Ensure that character string fits template<\/p>\n<\/li>\n<li>ASSERT_CHAR_NP &#8211;\u00a0Ensure that character string does not fit template<\/li>\n<li>\n<p style=\"display: inline !important;\">ASSERT_DIFFERS &#8211;\u00a0Esnure difference between two (elementary) data objects<\/p>\n<\/li>\n<li>ASSERT_EQUALS &#8211;\u00a0Ensure equality of two data objects<\/li>\n<li>\n<p style=\"display: inline !important;\">ASSERT_EQUALS_F &#8211;\u00a0Save Approximate Consistency of Two Floating Point Numbers<\/p>\n<\/li>\n<li>ASSERT_INITIAL &#8211;\u00a0Ensure that object has its initial value<\/li>\n<li>ASSERT_NOT_BOUND &#8211;\u00a0Ensure invalidity of the reference of a reference variable<\/li>\n<li>\n<p style=\"display: inline !important;\">ASSERT_NOT_INITIAL &#8211;\u00a0Ensure that object does NOT have its initial value<\/p>\n<\/li>\n<li>ASSERT_SUBRC &#8211;\u00a0Request specific value of return code subrc<\/li>\n<li>\n<p style=\"display: inline !important;\">ASSERT_THAT &#8211;\u00a0Test compliance with a condition<\/p>\n<\/li>\n<li>FAIL &#8211;\u00a0Termination of Test with Error<\/li>\n<\/ul>\n<p><strong>Parameters used by the test methods above<\/strong><\/p>\n<ul>\n<li>ACT &#8211; Actual result you got using your program<\/li>\n<li>EXP &#8211; Expected result<\/li>\n<li>MSG &#8211; Message to be displayed in case of failure<\/li>\n<li>LEVEL &#8211; Level of criticality<\/li>\n<li>QUIT &#8211; Quit options<\/li>\n<li>TOL &#8211; Tolerance level for results of type F<\/li>\n<\/ul>\n<h2>Levels of criticality<\/h2>\n<ul>\n<li>0 (TOLERABLE)<\/li>\n<li>1 (CRITICAL)<\/li>\n<li>2 (FATAL)<\/li>\n<\/ul>\n<p><strong>Quit options<\/strong><\/p>\n<ul>\n<li>0 (NO) &#8211;\u00a0It will continue processing the current test method<\/li>\n<li>1 (METHOD) &#8211; Processing of the current\u00a0test method is interrupted<\/li>\n<li>2 (CLASS) &#8211; Processing of the current method and all remaining test methods of current test class is interrupted<\/li>\n<li>3 (PROGRAM) &#8211;\u00a0Cancel execution of all remaining test classes for the tested program<\/li>\n<\/ul>\n<h2>Calling ABAP Unit tests in Code Inspector<\/h2>\n<p>If you call your Code Inspector, you can include a call to your unit tests. Just run your code inspector, in Top menu go to Utilities -&gt; DEFAULT Check Variant -&gt; Maintain and select the check box at ABAP Unit<br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"744\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=744\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI.png\" data-orig-size=\"621,450\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"ABAP Unit test &amp;#8211; Code inspector settings\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI.png\" class=\"size-medium wp-image-744 alignnone\" alt=\"ABAP Unit test - Code inspector settings\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI-300x217.png\" width=\"300\" height=\"217\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI-300x217.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI-414x300.png 414w, https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI.png 621w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>After you run Code Inspector, ABAP Unit runs all your Test classes and their results will be included in the final CI report<br \/>\n<a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI_output.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"746\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=746\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI_output.png\" data-orig-size=\"1021,271\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"ABAP Unit test &amp;#8211; Code Inspector output\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI_output.png\" class=\"size-medium wp-image-746 alignnone\" alt=\"ABAP Unit test - Code Inspector output\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI_output-300x79.png\" width=\"300\" height=\"79\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI_output-300x79.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI_output-500x132.png 500w, https:\/\/oprsteny.cz\/wp-content\/uploads\/UNIT_TEST_CI_output.png 1021w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article provides info about creation an ABAP unit test class that might significantly reduce the future maintenance cost at the testing level. The flow is simple &#8211; you design your functional tests in advance and then you create your &hellip; <a href=\"https:\/\/oprsteny.cz\/?p=740\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Test driven development in ABAP - Unit test classes http:\/\/wp.me\/p3nYbe-bW","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16,9,5,1],"tags":[446,195,200,199],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry","category-abap","category-development","category-tools","category-uncategorized","tag-abap","tag-oo","tag-test-driven-development","tag-unit-test"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3nYbe-bW","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=740"}],"version-history":[{"count":9,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/740\/revisions"}],"predecessor-version":[{"id":756,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/740\/revisions\/756"}],"wp:attachment":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}