07-12-2017 10:16 AM
I had to remove ALL of my Test classes because it caused syntax problems in certain release levels. So annoying that the syntax has changed so much since 6.40
I dont have access to 6.40 or 7.0 systems. All of out systems are 7.2, 7.4 or 7.5 NW release level.
The eclipse default template
class ltcl_ definition final for testing duration short
risk level harmless.
private section.
methods:
first_test for testing raising cx_static_check.
endclass.
class ltcl_ implementation.
method first_test.
cl_abap_unit_assert=>fail( 'Implement your first test here' ).
endmethod.
endclass.
is not valid in 7.0 NW or earlier.
Can someone share valid syntax for a AUNIT class in 7.0 please
https://help.sap.com doesnt make it easy to access older versions of help ?
07-12-2017 10:29 AM
Besides using the old cl_aunit_... classes you also have to use the old pseudo comments for duration and risk level.
"#AU Risk_Level ...
"#AU Duration ...
Or leave those additions simply away.
07-12-2017 10:27 AM
Going from memory, if you change all cl_abap_unit* classes to cl_aunit* it should be ok. e.g. cl_abap_unit_assert --> cl_aunit_assert
The old 7.0 cl_aunit classes are still around in newer systems, so I imagine if it compiles and runs on 7.2+ it should then also work on 7.0
07-12-2017 10:44 AM
07-12-2017 12:46 PM
07-12-2017 10:29 AM
Besides using the old cl_aunit_... classes you also have to use the old pseudo comments for duration and risk level.
"#AU Risk_Level ...
"#AU Duration ...
Or leave those additions simply away.
07-12-2017 11:01 AM
"https://help.sap.com doesnt make it easy to access older versions of help ?"
In that case you're right. As a rule, ABAP Language elements are documented in the system, not in the help portal. You need system access to see the documentation.
As a "nice to have", offline versions of the ABAP Keyword Documentation are made available in the help portal, but only from 7.30 (same as 7.02) on, sorry. Only by checking the news (in that case e.g. here), you see the changes.