Troubleshooting
Problem
IBM Rational Application Developer for WebSphere Software (RAD) and Rational Software Architect for WebSphere Software v8.0 - 8.0.2 Code Coverage on Java application returns 0% coverage on forced stop in console view.
Symptom
You correctly set the Properties for the Java project : Code Coverage [x] Enable Code Coverage, and package and source coverage set to 80%.
Code coverage is not up to specified maximum of 80% as expected on forced stop using red stop button in console view on a Java application with an infinite main loop.
Cause
This issue was identified as a product defect and logged under APAR PM35789. This APAR was closed as a suggestion/feature enhancement for a future release.
Resolving The Problem
This enhancement was delivered in RAD 8.0.4 and documented in RAD 8.0.4 enhancements under Code Coverage as bullet:
- You can now select an option to collect code coverage statistics if the Java program exits abnormally.
WORKAROUND:
To restore Rational Application Developer 7.5 functionality in pre RAD 8.0.4:
- Open Run Configurations and select Java Application configuration corresponding to the Java project main class
- Select the Arguments tab
- Type the following entry in the VM Arguments box:
-Dcoverage.server.mode=true
Note: Ensure no character of any kind (hidden or otherwise) prefix or postfix the above string.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21474213