9

How to extract .csv file from Coverity server in command line.

please Explain Command cov-manage-im with example.

Is there any need to install Coverity in Windows, though I have access to the website and can manually download the .csv file

proton
  • 658
  • 1
  • 7
  • 26
panchanan
  • 170
  • 1
  • 3
  • 11

4 Answers4

8

For those who came here looking to export CSV using the web interface to the Coverity server, if you open the menu sidebar, then in the "Issues by ..." and "File" sections, each subsection has a drop-down option "Export CSV" which does the job !

MikeW
  • 5,504
  • 1
  • 34
  • 29
  • 1
    This is the trick! Specifically ISSUES: BY SNAPSHOT Then click the down arrow for any of the items in that menu. Options available: Edit Settings... Sharing... Notifications... Delete... Export CSV Export XML Get Link – John Dyer Sep 07 '21 at 13:40
4

This is clearly explained in Documentation:

Show all defects in 'proj' project

You basically need to use --mode defects to query defects and --show to output in csv format

cov-manage-im --host <host> --port <port> --user id --password pwd --mode defects --show --project proj

You can add fields as

cov-manage-im --host <host> --port <port> --user id --password pwd --mode defects --show --project proj  --fields cid,severity, classification ..

And add filters as

cov-manage-im --host <host> --port <port> --user id --password pwd --mode defects --show --project proj  --fields cid,severity, classification .. --status Fixed --class Bug --severity Major ...

and so on and so forth. Just look at detailed documentation on your Coverity Connect instance

Kara
  • 6,115
  • 16
  • 50
  • 57
  • 1
    Thank you. but if you want the impact header which is High,low value and medium, how will it be written this field – panchanan Apr 15 '16 at 13:25
  • use --show --output fields to see what field are available , then select one which will show your impact header – Waleed Mansoor Apr 18 '16 at 12:16
  • 1
    I want CID,Type,Impact,Status,First Detected,Owner,Classification,Severity,Action,Component,Category,File and Function fields in the downloaded csv . can you please give the exact command so that i can try it. I have tried it, but not able to download .csv file with all fields at the same time. – panchanan Apr 19 '16 at 07:02
  • per panchanan's comment. How can you get the "Impact" field from Coverity? cov-manage-im does not seem to support it. – Jason Templeman Mar 18 '21 at 21:40
3

As I also needed to download Coverity report as CSV, using the web-ui, I attach here a screenshot, to better explain how this is done.

At the view panel, select the view you want to export (here it is High Impact Outstanding)

select the view you want

now click on the down-arrow and select 'Export CSV' click on the down-arrow and select Export CSV

Eliyahu Machluf
  • 1,251
  • 8
  • 17
1

DC: This is not for command line, this can help when you want to download from server.

I think you can refere this link click

so the basic idea behind this is that first you save a copy of all the issues without any filter( if you want all) then download it.

Solution:-

For any unsaved view (in this case, the view by double clicking on one specific snapshot), if we want to export the result, we need to save this view with a valid name.

  1. click on the gear mark, and check "Save as a Copy".
  2. Provide a name you want, and save the view with OK button.
  3. After that, this view can be accessed via the view list, and can be exported via "Export to CSV" as other views.
sunilkj
  • 11
  • 1