Do you have any recommendation for a static code analysis tool or plugin to use with Katalon Studio ?
I would suggest that Katalon is the wrong tool for the job. If you want static code analysis or code coverage then you might want to look at unit test frameworks instead… Katalon is more like a tool for black-box testing. Happy to be corrected though
What do you want to analyse with it?
Or do you want to analyse Groovy scripts called “Test Cases” in Katalon Studio? — Well, I wonder why you feel like to do it. May be you should describe your problem first.
Or do you want to make report of unit-test coverage over Groovy classes called “Keywords” in Katalon Studio?
If yes, in case 1 where your custom classes are dependent on the
com.kms.katalon.** libraries, then you will certainly find difficulties to perform detailed unit testing, and difficult to report test coverage.
To me, it seems Katalon Studio does not offer any feature to unit-test your custom classes named Keywords. Katalon Studio assumes that your Keywords are short and simple, and that you are able to write 100% quality code without unit-testing. I think this assumption is too naive. So I developed a custom library junit4ks in order to introduce JUnit to perform unit-testing over my keywords. If you are desperate, you would need to introduce some tools like JaCoCo for yourself but I am negative if you can make it.
Case 2: If you can design your classes independent of the
com.kms.katalon.** library, I would recommend you to create a separate project for those classes outside Katalon Studio project. You want to create the new project in Eclipse or IDEA, do development with thorough unit testing, build a jar, and import the product jar into your Katalon Studio project as an External library. I have ever done this several times, like this
This is not very true.
Katalon Studio has integrated Cucumber
Perhaps, though I have never tried, you can use Cucumber to test your custom keywords at any fine grained level within Katalon Studio. @mathieu You may somehow find some way to extend this to report test coverage over your custom keywords. I am not sure.