Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fixing ABAP Unit

Former Member
0 Likes
933

Hello

I'm having a problem getting my unit tests to run, these unit tests were working before until the server was redone a few days ago. I haven't changed anything to the test classes but now when I execute any of the unit tests ABAP Unit breaks with a OBJECTS_GLOBAL_CLASS_NOT_FOUND short dump in the SAP code.

I've tracked down the RS_AUNIT_SELFTEST program in the SABP_UNIT_CORE package and executed it to check that the ABAP Unit on the server is working correctly according to it's own unit tests. Well unfortunately it failed on a few of the test programs being executed by RS_AUNIT_SELFTEST.

Test program failures occured on the following programs: RHA_TEST_ABSTRACT, RHA_TEST_FAIL_IN_SETUP and RHA_AUST_ABORT. The error raised for these programs seems to be done with bad counters, I refer to a comment in the ABAP Unit results (* BAD COUNTERS *) following these program names. I also placed a break-point in the start-of-selection events of these programs and have established that they do not execute at all so ABAP Unit is completely disregarding them because of these bad counters (whatever that might be?).

Additionally I have failures on the CL_AUST_SHORT_DUMP_CRITICAL and CL_AUST_SHORT_DUMP_DANGEROUS test classes being executed by the self test. These tests try to raise run-time failures for testing and the unit test seems to fail since these expected run-time failures do not occur. Does anybody have some suggestions on fixing this because I assure you, I'm in way over my head with this one? Your help would be greatly appreciated...

Kind regards

Ettienne Hugo

1 ACCEPTED SOLUTION
Read only

former_member183804
Active Contributor
0 Likes
845

Hello Ettienne,

the Dump Object_Global_Class_Not_Found indicate that the byte code of a test class is during task execution not generated for the actual program. There is a known issue with the global Test Class Pools in Release 7.00 / 2004S, please kindely check out note 938732.

If it does´n´t fit open a ticket on component BC-ABA-LA. As shortterm fix you may request from your IT the alter the system parametet abap/test_Generation to ON.

Best Regards,

Klaus

4 REPLIES 4
Read only

former_member183804
Active Contributor
0 Likes
846

Hello Ettienne,

the Dump Object_Global_Class_Not_Found indicate that the byte code of a test class is during task execution not generated for the actual program. There is a known issue with the global Test Class Pools in Release 7.00 / 2004S, please kindely check out note 938732.

If it does´n´t fit open a ticket on component BC-ABA-LA. As shortterm fix you may request from your IT the alter the system parametet abap/test_Generation to ON.

Best Regards,

Klaus

Read only

0 Likes
845

Hello Klaus

Thank you for your feedback it is greatly appreciated. I've checked out the note you mention in you previous post and we will definitely try to install the kernel patch containing the appropriate fixes. We've tried to change the profile parameter unfortunately it did not solve the problem.

Once again, thanks and stay well.

Kind regards

Ettienne

Read only

0 Likes
845

The profile parameter only takes effect when generating the byte code by default. I assume you have some test class-pools in use. It is required to force byte code generation for them now. Activating them in SE24 should do.

Kind Regards,

Klaus

Read only

0 Likes
845

Hello Klaus

Thank you very much, I went in and activated both the test class and the class under test since both are dictionary classes. That solved the problem, initially I only activated the class under test under the assumption that the test class being linked to it would also be activated with it; that was obviously a wrong assumption. Well you know what they say about assumptions, guess you can't trust them :).

Stay well

Ettienne