Development stack is in Python (flask) and our automation suite(API) is coded in Java.
Can we do code coverage and if Yes, which plugin to use?
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.
Sign up to join this communityDevelopment stack is in Python (flask) and our automation suite(API) is coded in Java.
Can we do code coverage and if Yes, which plugin to use?
The very basic essence of the term API is to provide an interface for external communication. That said, it is perfectly fine and possible to use your tests written in Java to test API endpoint given you respect the specifications (inputs, output). However, a good practice is to ensure consistency by documenting the API with Swagger for instance.
Coverage analysis is typically achieved by hooking the code that looks up methods or functions. A log is then created if which areas have been used, doing this across languages isn't really possible unless you are prepared to coerce them into the same runtime with something like parrot. I would not recommend this as it will be such an unusual situation that the test is unlikely to be meaningful.
You could make a simple version of this by having a log of calls between the two codebases and comparing it to as list of possible calls, this could be done with a protocol specific spy. I'm not aware of generic tools for this as this is a very unusual requirement.
Tests in a compiled language for code in interpreted language is very strange.
You can use sonarqube
for that
check this blog : https://sevastoyanov.blogspot.com/2016/09/install-and-configure-sonarqube-for.html