You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your Jenkins project, click on Add build step and then select Execute Windows batch command.
Your tests should be run with OpenCppCoverage and --export_type=cobertura.
This flag will create a xml file named XXXCoverage.xml where XXX is the name of your program.
In the previous example, YourTest.exe is the test to run. You need to use the full path (on Jenkins machine) for OpenCppCoverage.exe or add it in the environment variable PATH. The file YourTestCoverage.xml will be created by the previous command.
Post-build Actions
The last step is to add a Post-build Actions to your project and select Publish Cobertura Coverage Report.
In the field Cobertura xml report pattern, you must enter the location of your coverage file. Note that this location is relative to your workspace folder.
You can use *Coverage.xml if you have several tests for example.
See Cobertura plugin for more information.
View Coverage
Here are some outputs. Note that the Conditionals coverage is not supported.