<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Abap Unit Tets Question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983615#M1161113</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; just a suggestion.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Create a variant for the testing of the function module (the save icon after input the FM parameters).&lt;/P&gt;&lt;P&gt;Call always that test variant and change the only values that you have to change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2009 15:33:02 GMT</pubDate>
    <dc:creator>andrea_galluccio2</dc:creator>
    <dc:date>2009-01-14T15:33:02Z</dc:date>
    <item>
      <title>Abap Unit Tets Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983614#M1161112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do a unit test for Fm ,but the FM input have some value that always changing and other &lt;/P&gt;&lt;P&gt;Are stay the same ,and the FM output change accordingly , i can build a unit test for this kind of FM,&lt;/P&gt;&lt;P&gt;Or it's worthless ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ricardo Arona&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 15:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983614#M1161112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T15:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Unit Tets Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983615#M1161113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; just a suggestion.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Create a variant for the testing of the function module (the save icon after input the FM parameters).&lt;/P&gt;&lt;P&gt;Call always that test variant and change the only values that you have to change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 15:33:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983615#M1161113</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2009-01-14T15:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Unit Tets Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983616#M1161114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It all depends on the purpose of your Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are only selecting some records from the database into output based on your inputs, than it is not advisable to write ABAP unit test on that FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your FM invovles some kind of processing i.e. collecting table, modifying data in to internal table, filling up final table etc than you should write ABAP Unit only on that Subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this recent discussion:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1196681"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 15:37:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983616#M1161114</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-01-14T15:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Unit Tets Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983617#M1161115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your FM involves some kind of processing i.e. collecting table, modifying data in to internal table, filling up final table etc than you should write ABAP Unit only on that Subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yea , my FM get always different key.&lt;/P&gt;&lt;P&gt;the WORKITEM_ID is unique and always changing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like :&lt;/P&gt;&lt;P&gt;Import &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WORKITEM_ID	             -                      	005104574&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DECISION_KEY	     -                              	0001&lt;/P&gt;&lt;P&gt;USER_ID	                    -               	                C0267195&lt;/P&gt;&lt;P&gt;OPERATION_ID	                   -                	        EXEC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the export data is always changing accordingly .&lt;/P&gt;&lt;P&gt;What u suggest for this kind of issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 16:00:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983617#M1161115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T16:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Unit Tets Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983618#M1161116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you select DECISION_KEY, USER_ID, OPERATION_ID from the Database based on the WORKITEM_ID? If yes, than you should NOT write a Unit Test because data in the database can be changed and it leads to failure of your ABAP test in Future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;Today, For &lt;/P&gt;&lt;P&gt;WORKITEM_ID - 005104574&lt;/P&gt;&lt;P&gt;You get:&lt;/P&gt;&lt;P&gt;DECISION_KEY - 0001&lt;/P&gt;&lt;P&gt;USER_ID - C0267195&lt;/P&gt;&lt;P&gt;OPERATION_ID - EXEC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But Someone changed OPERATION_ID from EXEC to PLAN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, after the changed OPERATION_ID your test will fail because you have hardcoded the OPERATION_ID as EXEC in your ABAP Unit. This test would fail because the data got changed, not the logic. So, it doesn't serve the purpose of writing the unit test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 16:08:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unit-tets-question/m-p/4983618#M1161116</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-01-14T16:08:18Z</dc:date>
    </item>
  </channel>
</rss>

