3
votes

I'm trying to write unit tests for my class in ABAP but when I write the code manually in Eclipse, the IDE tells me there is no test class and no executable tests. If I use the wizard in SAP GUI, the generated test works and I can replace it with my test - which then also works - but when I close the SAP GUI and reopen it again, it doesn't detect any test class or executable tests again.

It seems like a bug to me or some issue with the SAP version I am using:

SAP NETWEAVER 7.4 15 (06/2016) sap.com SAP NETWEAVER 7.4

I'm a beginner ABAP programmer but I already successfully covered another one of my classes with test and I have no problems there. The only difference is that the other class runs on a different system with higher version of SAP - 7.5.

Have you encountered issue like this?

1
Did you check if there are some patches in the SAP support website?Sandra Rossi
Posting a small example how you do this in Eclipse would be very helpful, so that all could be able reproduce your problem.Jagger

1 Answers

4
votes

After few days of light research I found out there is a SAP Note 2598526 which pretty much describes the issue I have.

For the future reference it states that:

Reason and Prerequisites: The ABAP unit test framework calls the class CL_ABAP_COMPILER to determine the test classes from the current program. However, the call of the class CL_ABAP_COMPILER terminates with an internal error.

Solution: If the description applies to your situation, please install a new kernel that contains the patch "ABAP-SYCH: Dumped TYPES table has dangling type ids".

Right now we will try to patch the kernel and I will let you know if that helps.

EDIT 06/05/2019:

So... the patch didn't help with this issue but it looks like I finally found a solution. There are three steps to it:

  1. Open SE03 and make sure the namespace is listed here with development license and in production role (P)
  2. Open report: SATC_AC_INIT_NAMESPACE_REG and register the namespace to the ATC (ABAP Test Cockpit) - otherwise the cockpit will ignore the namespace and won't scan it for test classes.
  3. The registration of the namespace will create a request so transport it and reactive the class that has unit tests.

When you do this, you should be able to run the tests - in both SAP GUI and Eclipse no problem :).