2010 Jan 11 9:16 AM
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
2010 Jan 11 3:17 PM
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
2010 Jan 11 3:17 PM
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