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

Local test classes / does not have any inactive versions

Sm1tje
Active Contributor
0 Likes
2,051

Hi all,

I'm trying to create local test class within a global class. First, in the local definitions part I enter the name of my test class and make it 'known' to the global class like this;


  CLASS test_class DEFINITION DEFERRED.
  CLASS global_class DEFINITION LOCAL FRIENDS test_class.

So far so good. In the next step I want to create the actual definition and implementation of the test_class. I do this (via the menu) by clicking on Goto->Local Test Classes. But I can't process this step since I get an 'error' message (displayed as a message of type 'S' in the status bar) saying:

ZCL_GLOBAL_CLASS================CCAU does not have any inactive versions

I already tried to activate the class before going to the Local Test Class, but I get an error message (which is correct) saying:

"CLASS TEST_CLASS DEFINITION DEFERRED" is missing "CLASS TEST_CLASS DEFINITION.

This is correct, since this definition I'm trying to create in the Local Test Class. The reason I want to create a unit test is because I want to do a (ABAP) Unit test.

Question: Want am I doing wrong here, or is something missing (maybe a note which I haven't been able to find yet)? How to create this Local Test Class?

Just a reminder!

Edited by: Micky Oestreich on Jan 11, 2010 3:14 PM

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
1,246

It's weird and good catch. It seems SAP by default doesn't generate the LOCAL Test class section when we create a new class. That's why we get the message "...CCAU does not have any inactive versions".

But, when we use the test class generation wizard Utilities > Test Class Generation, it Creates the "CCAU" component for the class and the template for the test class. I haven't noticed this message yet because I always use this generation wizard.

Regards,

Naimesh Patel

Hi all,

I'm trying to create local test class within a global class. First, in the local definitions part I enter the name of my test class and make it 'known' to the global class like this;


  CLASS test_class DEFINITION DEFERRED.
  CLASS global_class DEFINITION LOCAL FRIENDS test_class.

So far so good. In the next step I want to create the actual definition and implementation of the test_class. I do this (via the menu) by clicking on Goto->Local Test Classes. But I can't process this step since I get an 'error' message (displayed as a message of type 'S' in the status bar) saying:

ZCL_GLOBAL_CLASS================CCAU does not have any inactive versions

I already tried to activate the class before going to the Local Test Class, but I get an error message (which is correct) saying:

"CLASS TEST_CLASS DEFINITION DEFERRED" is missing "CLASS TEST_CLASS DEFINITION.

This is correct, since this definition I'm trying to create in the Local Test Class. The reason I want to create a unit test is because I want to do a (ABAP) Unit test.

Question: Want am I doing wrong here, or is something missing (maybe a note which I haven't been able to find yet)? How to create this Local Test Class?

Just a reminder!

Edited by: Micky Oestreich on Jan 11, 2010 3:14 PM

1 REPLY 1
Read only

naimesh_patel
Active Contributor
0 Likes
1,247

It's weird and good catch. It seems SAP by default doesn't generate the LOCAL Test class section when we create a new class. That's why we get the message "...CCAU does not have any inactive versions".

But, when we use the test class generation wizard Utilities > Test Class Generation, it Creates the "CCAU" component for the class and the template for the test class. I haven't noticed this message yet because I always use this generation wizard.

Regards,

Naimesh Patel