I am able to generate the *.test files in the go lang code and also run the
./value.test -systemTest -test.coverprofile coverage.cov
to generate various coverage.cov files and unit.cov files separately.
But I did all this in the go lang codebase.
How can I get the coverage of golang code from my python tests using above information?
Based on your description, I assume you followed https://www.elastic.co/blog/code-coverage-for-your-golang-system-tests The question you must answer first, what kind of additional tests do you want to to with the test binary that you need an additional language like python or an other language you feel comfortable in.
The typical tests here are system tests where the binary is tested from the "outside". So assuming you use python, you must implement your use case you want to test in python and instead of using the normal binary to execute, use the testing binary you created and add the above flag. In Python for the execution of the binary you can typically use args.* to create the command with all arguments (see here an example https://github.com/elastic/libbeat/blob/master/tests/system/mockbeat.py#L65 ).
So first think of what you would want to test be it with the normal binary or the coverage binary, and then you can add the coverage in a second step.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.