2014 Mar 19 6:59 AM
Hello,
Im using EHP6 for SAP ERP 6.0.
In the Unit Tests there are some Codes that arent highlighted in red or green in the coverage Analyzer.
Does anybody know why this is so? And if there´s a Workaround for this?
The Codes have a lot of comments in it, i´ve seen code without comments and everything runs finde (red/green highlighting).
Is it neccessary to clean the Code from comments?
Best regards,
Timo
2014 Mar 19 1:38 PM
I´ve tried now to remove every comment line, same effect, so it seems it nothing about the comments.
It must be somethin else than the comments.
2014 Mar 19 8:43 AM
Hi Timo,
Are you aware that only executable code is highlighted (and not comments, data or type definitions, ...)? Maybe you should paste a screen shot here to illustrate the issue.
Best Regards, Randolf
2014 Mar 19 8:58 AM
Hi Randolf,
Yes i know about that. I can´t give you a Screenshot for Security Reasons.
What i´ve found so far is, that if i let the mouse curso for about 1500 ms on a line, then a popup near the cursor describes how often this code row has actually been reached and how often it was reached during the whole unit test. So it seems to me, that the process of gathering information about
how often a line of code during the unit test was reached, runs as usual.
The only annoying thing is, that this information isn´t painted in red/green on the code.
So for security reasons, i can describe the code as pseudo as follows:
- Public instance method test1
METHOD test1.
TYPES: BEGIN OF test_type,
amount TYPE i,
percentage TYPE internal_percentage,
END OF test_type.
DATA:
some Variables here....
FIELD SYMBOLS:
some Field Symbols here...
BEGIN OF METHOD LOGIC
*SOME COMMENT HERE
ANOTHER MEHTOD LOGIC
"SOME INLINE COMMENT HERE
"THE COMMENT NOW GOES ON IN THIS LINE
MORE METHOD LOGIC
*ANOTHER COMMENT WAS WRITTEN HERE
MODIFY SOME STRUCTUR "This is the Structur
*HERE WAS THE OLD MODIFY OF STRUCTURE
...
...
...
*YET ANOTHER COMMENT
CALL FUNCTION 'ROUND'
...
...
ENDMETHOD.
I hope this helps for any suggestions.
2014 Mar 19 1:38 PM
I´ve tried now to remove every comment line, same effect, so it seems it nothing about the comments.
It must be somethin else than the comments.
2014 Mar 19 2:17 PM
Hi Timo,
This is not the typical behaviour for the ABAP Coverage Analyzer. Executed code should be highlighted, especially if there is mouse-over information about the number of executions.
As Randolf mentioned, an exception to this rule is declarative code, e.g. DATA statements, and also FOR TESTING code. FOR TESTING code is not measured.
Please try and generate the code under test again. Ideally you should make some dummy change to the code under test and activate the source again. Sometimes there is a mismatch between the SCOV metadata and the ABAP load (the executed code).
If possible, you can try measuring the unit test coverage in ABAP in Eclipse. The ABAP in Eclipse coverage tool works a little differently to the SAP GUI tool w.r.t. statement highlighting.
Otherwise, if this problem persists, then you should open a customer ticket for the ABAP Coverage Analyzer (component BC-DWB-TOO-COV).
Kind regards
Chris
2014 Mar 19 3:03 PM
Hello Christiaan,
I´ve changed the code and re-activated with no effects.
Probably best, would be the customer tickets.
Thanks for your help and ideas.
Best regards,
Timo