We are trying to find code coverage of our java services using automation tests that are written in Python. We want to use jacoco for recording the coverage data using on-the-fly instrumentation.
Details of setup :
- We have our application deployed and running on Remote Machine A (Its actually in kubernetes cluster but let's just assume a remote machine for now.)
- We are executing our automation tests from another Remote Machine B.
We are able to get the code coverage data when we are running on our local system using below commands.
- Command to start the recording of coverage in tcpserver mode:-
java -javaagent:<path/to/jacoco>/jacocoagent.jar=port=9005,output=tcpserver,address=* -jar app.jar
- Below is the command to dump the execution data:-
java -jar <path/to/jacoco>/jacococli.jar dump --address localhost --port 9005 --destfile jacoco_report.exec
Now we want to move the setup to our respective machines (A & B) as mentioned above. Can anyone please help as to what would be the address we need to provide to the jacocoagent.jar whether it would be IP address or host of Machine A or Machine B?