<?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: UNIT CLASS FOR TESTING in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222811#M1379414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THIS QUESTION IS RESOLVED&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Oct 2009 03:55:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-07T03:55:08Z</dc:date>
    <item>
      <title>UNIT CLASS FOR TESTING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222809#M1379412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts ,&lt;/P&gt;&lt;P&gt;           In se24 I am creating the  class for tesing BUT when I try to test byclicking on UNIT TEST .&lt;/P&gt;&lt;P&gt;It gives message :- &lt;/P&gt;&lt;P&gt;NO EXECUTION AS ACTUAL RISCK LEVEL IS TOO HIGH &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAN U HELP ME IN  SOLVING  THIS  PROBLEM ? &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt; class's PUBLIC SECTION IS AS FOLLOW  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class ZUNITTESTCLASS98 definition&lt;/P&gt;&lt;P&gt; public&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;final&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; create public&lt;/P&gt;&lt;P&gt;for testing "#AU Risk_Level HARMLESS&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt; public components of class ZUNITTESTCLASS98&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt; do not include other source files here!!!&lt;/P&gt;&lt;P&gt;  public section.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;PRIVATE SECTION &lt;/P&gt;&lt;P&gt;private section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  methods CHECK_REFERNCE&lt;/P&gt;&lt;P&gt;  for testing .&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;CODE FOR THE METHOD :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method CHECK_REFERNCE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA OBJ1 TYPE REF TO ZWDCSOPERATION98 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT OBJ1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;TAB1&amp;gt; TYPE STANDARD TABLE .&lt;/P&gt;&lt;P&gt;DATA  REF1 TYPE REF TO DATA .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD OBJ1-&amp;gt;GET_TABLE&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    TAB_NAME = 'SFLIGHT'&lt;/P&gt;&lt;P&gt;  RECEIVING&lt;/P&gt;&lt;P&gt;    R_TABLE  = REF1&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;CALL METHOD CL_AUNIT_ASSERT=&amp;gt;ASSERT_BOUND&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    ACT              = REF1&lt;/P&gt;&lt;P&gt;   MSG              = 'REFERENCE IS NOT POINTING TO ANYVALID DATA '&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   LEVEL            = CRITICAL&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   QUIT             = METHOD&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; RECEIVING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ASSERTION_FAILED =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 12:20:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222809#M1379412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-06T12:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: UNIT CLASS FOR TESTING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222810#M1379413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While using the class builder, try not to change the definition manually. You can set the Risk Level, to Harmless in the Properties tab. Since this #AU is the pseudo comment, it must be like "Harmless", not HARMLESS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
class ZCL_TEST_NP_TEST definition
  public
  abstract
  create public
  for testing
  "#AU Risk_Level Harmless
.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would not be able to perform the Unit test (from menu Program &amp;gt; Unit Test) on this test class. You need to create a local test class inheriting from this global test class in the production class (class on which you want to perform the test). Please refer to these discussions:&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="1458598"&gt;&lt;/A&gt;&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="1458722"&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>Tue, 06 Oct 2009 13:29:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222810#M1379413</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-10-06T13:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: UNIT CLASS FOR TESTING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222811#M1379414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THIS QUESTION IS RESOLVED&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 03:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222811#M1379414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-07T03:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: UNIT CLASS FOR TESTING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222812#M1379415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rushi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to oops concept but i am able to understand.&lt;/P&gt;&lt;P&gt;Now i have to create some Unit test plans in ABAP.We are using SAP Netwever 7.1 and WEB AS 6.0&lt;/P&gt;&lt;P&gt;I tried from SE24 but i couldn't get the correct path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explain me: if i have a Z program then where and how to write a number of Unit test classes. And how it will integrate to with our actual program/FM/any object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Umashankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2009 12:45:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unit-class-for-testing/m-p/6222812#M1379415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-12T12:45:23Z</dc:date>
    </item>
  </channel>
</rss>

