ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Cover​Me

by shauryachats ALL

A Sublime Text 3 Plugin to view code coverage for any programming language's test framework.

Details

Installs

  • Total 242
  • Win 127
  • Mac 82
  • Linux 33
Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12
Windows 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
Mac 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

CoverMe

A Sublime Text 3 Plugin to view code coverage for any programming language's test framework.

This plugin can easily be extended for any testing framework for any programming language.

Prograaming languages supported

  • Go's go test
  • Python's unittest and coverage.py

The basic paradigm followed by the plugin is: - Run the commands necessary to generate coverage output. - Parse the coverage output.

CoverMe Demo

How to install?

  1. Clone this repository in your Packages folder.
  2. Package Control (under review)

How to use?

It is pretty easy to use this plugin.

First, Go to Preferences > Package Settings > CoverMe > Settings - User.

Update the required variables according to the Settings - Default file.

For example, for Go:

"go" : {
    "GOPATH" : "your gopath goes here"
}

After this, to view code coverage, press ctrl+shift+c (you can override this in keymap) to be presented with various coverage modes, select one and coverage would be presented according to that.

Optional : Project level settings

For some projects, you would need to write your own custom coverage modes. To do that, create a new Sublime Project and in the .sublime-project file:

{
    "folders":
    [
        {
            "path": "/home/shauryachats/go/src/test_package"
        }
    ],
    "settings":
    {
        "CoverMe": {
            "go" : [
                {
                    "title": "Custom Coverage Mode",
                    "basepath" : "/home/shauryachats/go/src/test_package",
                    "commands" : [
                        "go test -coverpkg=./... ./... -coverprofile cover.out"
                    ]
                }
            ]
        }
    }
}

Under the settings key, create a CoverMe key containing the list of coverage modes for each programming type.

Each coverage mode is of the form: “json { "title” : “the title on the quick draw panel”, “basepath” : “the base path for the project, where the commands are to be run”, “commands” : “a list of shell commands, which are run to produce coverage information.” }