2009 Aug 27 5:42 PM
I created a Test Class in SE24, and created one method with the following code:
private section.
methods CREATE_ISTREAM_XSTRING_TEST
for testing .
methods SETUP .
methods TEARDOWN .
METHOD create_istream_xstring_test
CALL METHOD CL_AUNIT_ASSERT=>FAIL
EXPORTING
MSG = 'Deliberate fail'
LEVEL = 2
* QUIT = METHOD
* DETAIL =
.
ENDMETHOD.
For some reason it won't hit this code and the status window informs me that
Unit tests processed successfully; 1 programs, 0 classes, 0 methods
When I run a unit test.
Why won't the method get executed when testing?
2009 Aug 27 5:45 PM
Have you created your a Local test class inherited from this Global Test class?
Steps to consider:
1. Create a Global Test class
2. Create a Model Class which has all your main logic
3. Create a Local test class inherited from the Global Test Class (cerated in Step 1)
4. Now try to do the unit test in the Model Class
Regards,
Naimesh Patel
Have you created your a Local test class inherited from this Global Test class?
Steps to consider:
1. Create a Global Test class
2. Create a Model Class which has all your main logic
3. Create a Local test class inherited from the Global Test Class (cerated in Step 1)
4. Now try to do the unit test in the Model Class
Regards,
Naimesh Patel
2009 Aug 27 5:45 PM
Have you created your a Local test class inherited from this Global Test class?
Steps to consider:
1. Create a Global Test class
2. Create a Model Class which has all your main logic
3. Create a Local test class inherited from the Global Test Class (cerated in Step 1)
4. Now try to do the unit test in the Model Class
Regards,
Naimesh Patel
2009 Aug 28 10:30 AM
Hi,
I solved the problem by using the Wizard to crate an ABAP Unit test class.
BR,
Tony.
Edited by: Anthony Bateman on Aug 28, 2009 12:31 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |