How to check code coverage for the main class through test class in IBM RSA?
1 Answers
Your question is very close too being too broad/unspecific, so here comes a pretty broad answer.
First of all, adding tests after the fact (after your production code being written) isn't a great practice. Especially then when you only do that in order to meet some coverage goals somebody forces you to meet.
Then: the tool shouldn't matter a bit. RSA is an enhanced eclipse, so yo can easily go in and add a code coverage plugin, such as Eclemma to your RSA installation. Then you run whatever code you have in place, and coverage gets measured.
The really tricky part is what exactly to put into that unit test. Thing is: that totally depends on your code under test. From that point of view, you rather step back and learn how to do proper unit testing. As there is no difference between testing a main() method, or any other unit of your code.

- 137,827
- 25
- 176
- 248