5

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?

0
  • Flask:
  • API:
    • Sun's Jcov is pretty much complete. If you use Eclipse, there is a plugin called EclEmma that can be easier to setup and use than Jcov.
  • Automation tests are in Java (Rest-assured). It is a separate project which is being used to test the Python (Application) rest api's on Ci-Cd. I need coverage of the Python code only from the automation suite. Is it possible? – Aneesh Goel Jan 31 '18 at 19:11
0

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.

0

You can use sonarqube for that check this blog : https://sevastoyanov.blogspot.com/2016/09/install-and-configure-sonarqube-for.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.